MuGdxy / muda

μ-Cuda, COVER THE LAST MILE OF CUDA. With features: intellisense-friendly, structured launch, automatic cuda graph generation and updating.
https://mugdxy.github.io/muda-doc/
Apache License 2.0
144 stars 7 forks source link

GraphVar update safety check #32

Closed MuGdxy closed 11 months ago

MuGdxy commented 11 months ago

We need to record a cudaEvent after every graph's launch. The user could check var.is_using() to know if any graphs are using this var, so we can't update it now.
And a var.sync() to allow users to wait until all graphs finish accessing.

MuGdxy commented 11 months ago

For performance reason, we need add a sync(vars) api to ComputGraphVarManager, to collect all related graphs w.r.t the vars and sync them once.

MuGdxy commented 11 months ago

450e62294f9e1c96a3ddf9a284128fbf232d428d done.