[ROCm] Enable DBO (Dynamic Batch Optimization) on ROCm (#34726)

Signed-off-by: raviguptaamd <ravi.gupta@amd.com>
This commit is contained in:
raviguptaamd
2026-05-01 09:18:30 +00:00
committed by GitHub
parent 0dbaf9daad
commit 7075df79b3
2 changed files with 14 additions and 5 deletions
+2 -2
View File
@@ -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)