CUDAgraph block/grid size dependent on previous node's result?

cudaGraphKernelNodeSetGridDim allows you to set the grid dimentions of a kernel node from the device as long as you set that node to be updatable & have a reference to its device node handle.

https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__GRAPH.html#group__CUDART__GRAPH_1g646ec1a2a562a5a759b668d10cf0f95d