Commit f32b0cd
authored
Use the underlying memory pointer to determine where memory resides in ToDlPack (#1093)
* Use the underlying memory pointer to determine where memory resides
For tensor slices, ToDlPack was previously incorrectly assigning the device_type
because Data() pointed to the offset. When using MATX_MANAGED_MEMORY, cuPointerGetAttributes
cannot tell the difference between CPU and GPU memory
* Fixup - add const method to GetStorage()
* Revert "Fixup - add const method to GetStorage()"
This reverts commit c4314f6.
* Add const to GetStorage call1 parent 4b43915 commit f32b0cd
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1470 | 1470 | | |
1471 | 1471 | | |
1472 | 1472 | | |
1473 | | - | |
1474 | | - | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
1475 | 1476 | | |
1476 | 1477 | | |
1477 | 1478 | | |
| |||
0 commit comments