Commit 184b7ff
committed
feat(core): add host, pinned, and device memory management utilities
- Implement memory wrappers for host (`malloc`), pinned host (`cudaMallocHost`), and aligned device allocations (`cudaMalloc`).
- Enforce strict memory layout by rounding up device bytes to `QX_MEM_ALIGN`.
- Add `tensor_alloc_device` and `tensor_alloc_host` factory allocators with automatic initialization.
- Implement unified `tensor_free` handling safe deallocations across all memory spaces.
- Add async Host-to-Device (`tensor_h2d`) copy routine.1 parent 98dce09 commit 184b7ff
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments