[ROCm] Enable DBO (Dynamic Batch Optimization) on ROCm (#34726)
Signed-off-by: raviguptaamd <ravi.gupta@amd.com>
This commit is contained in:
@@ -71,8 +71,8 @@ class SMControlContextManager:
|
||||
A function that sets the number of SMs for computation.
|
||||
"""
|
||||
|
||||
assert current_platform.is_cuda(), (
|
||||
"SM control is currently only supported on CUDA"
|
||||
assert current_platform.is_cuda() or current_platform.is_rocm(), (
|
||||
"SM/CU control is supported on CUDA and ROCm platforms"
|
||||
)
|
||||
device = torch.accelerator.current_device_index()
|
||||
total_sms = num_compute_units(device)
|
||||
|
||||
Reference in New Issue
Block a user