I am hoping to use graphs to launch some dependent operations to leave host as little occupied as possible. At one point in my graph I do need to call an OptiX Prime query and a Delaunay triangulation method written using Thrust (both can be assigned to streams).
(1) Do I need to define them as host nodes? The documentation of cudaGraphAddHostNode specifies the following:
- Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback.
Does that mean what I am trying to do cannot be done?
(2) If I can call them as host nodes, both OptiX Prime query and Thrust code can be defined to work on streams. In order to make sure that they do not block default stream and possibly everything, should I assign some arbitrary streams as their parameters?
If I cannot use graphs I will end up defining multiple streams synchronizing at some points and that will be uglier and possibly more demanding on my host.