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
Update on "[ET Device Support] DeviceMemoryBuffer RAII class for device memory lifetime management"
Introduces DeviceMemoryBuffer, an RAII wrapper that owns a single device
memory allocation. On destruction, it automatically calls
DeviceAllocator::deallocate() to free the memory. This mirrors the role of
std::vector<uint8_t> for CPU planned buffers, but for non-cpu device memory (CUDA, etc.).
Key features:
- Static factory create(size, type, index) looks up DeviceAllocator from registry
- Move-only semantics (no copy) to enforce single ownership
- as_span() accessor wraps device pointer for use with HierarchicalAllocator
- Destructor is no-op for default-constructed or moved-from instances
Differential Revision: [D97850709](https://our.internmc.facebook.com/intern/diff/D97850709/)
[ghstack-poisoned]
RUNNER_ARGS="$RUNNER_ARGS --tokenizer_path ${MODEL_DIR}/$TOKENIZER_FILE --prompt 'What is the capital of France?' --max_new_tokens 128 --temperature 0"
0 commit comments