Conversation
Generalize device handling so third-party accelerators registered via the
privateuse1 mechanism can run the benchmark, instead of hardcoding CUDA
- Detect and append the registered privateuse1 backend to SUPPORT_DEVICE_LIST
- Replace torch.cuda.synchronize() with backend-agnostic
torch.get_device_module(device).synchronize() in timing/memory paths
- Add register_deterministic_backend() and thread `device` through
save/load_deterministic_dict() to apply backend-specific determinism flags
- Gate gpu_peak_mem on max_memory_allocated availability instead of device == "cuda"
- Generalize OOM detection from torch.cuda.OutOfMemoryError to torch.OutOfMemoryError
- Use get_device_module for empty_cache / amp / device-name resolution
|
Hi @markc-614! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
@xuzhao9 @benjaminglass1 @retonym Could you please review this PR when you get a chance? Thanks! |
Generalize device handling so third-party accelerators registered via the privateuse1 mechanism can run the benchmark, instead of hardcoding CUDA
devicethrough save/load_deterministic_dict() to apply backend-specific determinism flags