We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
cuda
triton.testing.get_dram_gbps
1 parent cbd5d48 commit 449e014Copy full SHA for 449e014
python/triton/testing.py
@@ -420,11 +420,10 @@ def perf_report(benchmarks):
420
421
def get_dram_gbps(device=None):
422
''' return DRAM bandwidth in GB/s '''
423
- import torch
424
425
from .runtime import driver
426
- if not device:
427
- device = torch.cuda.current_device()
+ if device is None:
+ device = driver.active.get_device_interface().current_device()
428
mem_clock_khz = driver.active.utils.get_device_properties(device)["mem_clock_rate"] # in kHz
429
bus_width = driver.active.utils.get_device_properties(device)["mem_bus_width"]
430
bw_gbps = mem_clock_khz * bus_width * 2 / 1e6 / 8 # In GB/s
0 commit comments