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.
triton.testing.get_dram_gbps
1 parent abe34a7 commit 77709d3Copy full SHA for 77709d3
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