Skip to content

Commit

Permalink
try amdgpu.jl info() directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Dale-Black committed Jan 20, 2025
1 parent 3f6ea2e commit 1d04ece
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions benchmarks/setup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ function monitor_gpu_memory(backend::String, duration=0.1)
# For now, just return total memory since free memory isn't easily accessible
return Float64(props.totalSize) / (1024 * 1024)
elseif backend == "AMDGPU"
free_mem, total_mem = AMDGPU.Runtime.Mem.info() # Use the correct memory info function
return Float64(total_mem - free_mem) / (1024 * 1024)
free, total = AMDGPU.info()
return (total - free) / (1024 * 1024)
elseif backend == "CUDA"
free, total = CUDA.memory_info()
return (total - free) / (1024 * 1024)
Expand Down Expand Up @@ -92,6 +92,7 @@ elseif BENCHMARK_GROUP == "CUDA"
CUDA.versioninfo()
elseif BENCHMARK_GROUP == "AMDGPU"
using AMDGPU
using AMDGPU.Runtime.Mem # Add explicit import of Runtime.Mem
AMDGPU.versioninfo()
elseif BENCHMARK_GROUP == "oneAPI"
using oneAPI
Expand Down

0 comments on commit 1d04ece

Please sign in to comment.