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.
2 parents ef9b173 + 77709d3 commit 1584fcfCopy full SHA for 1584fcf
python/triton/testing.py
@@ -434,11 +434,10 @@ def perf_report(benchmarks):
434
435
def get_dram_gbps(device=None):
436
''' return DRAM bandwidth in GB/s '''
437
- import torch
438
439
from .runtime import driver
440
- if not device:
441
- device = torch.cuda.current_device()
+ if device is None:
+ device = driver.active.get_device_interface().current_device()
442
mem_clock_khz = driver.active.utils.get_device_properties(device)["mem_clock_rate"] # in kHz
443
bus_width = driver.active.utils.get_device_properties(device)["mem_bus_width"]
444
bw_gbps = mem_clock_khz * bus_width * 2 / 1e6 / 8 # In GB/s
0 commit comments