You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Perf: Reduce StridedMemoryView construction time #449
Among the 3.4 us run time, a rough capture of major components is
calling CuPy's __dlpack_device__() and __dlpack__(): 1.23 us
constructing Python objects like shape, strides, and dtype: ~1 us
So it seems to me we are talking about pre-mature optimization here... We could defer the Python object construction but then 50% of the run time is out of cuda.core's control.
It'd be interesting to see if lazily populating the attributes of StridedMemoryView could help reduce the construction time. A lot of times we don't need the full information, just pointer and shape/strides.
Activity
leofang commentedon Feb 18, 2025
Among the 3.4 us run time, a rough capture of major components is
__dlpack_device__()and__dlpack__(): 1.23 usSo it seems to me we are talking about pre-mature optimization here... We could defer the Python object construction but then 50% of the run time is out of cuda.core's control.
leofang commentedon Jul 15, 2025
cc @NaderAlAwar for vis
leofang commentedon Jul 25, 2025
It'd be interesting to see if lazily populating the attributes of
StridedMemoryViewcould help reduce the construction time. A lot of times we don't need the full information, just pointer and shape/strides.Fix NVIDIA#449: Delay construction of Python attributes
Merge pull request #847 from mdboom/issue449-2