AMDMIGraphX icon indicating copy to clipboard operation
AMDMIGraphX copied to clipboard

[Issue]: failed at hipMemGetInfo(&free, &total)

Open Alice1069 opened this issue 1 year ago • 0 comments

Problem Description

when i run: model.compile(migraphx.get_target("gpu"))

it gives error: AMDMIGraphX/src/targets/gpu/hip.cpp:67: get_available_gpu_memory: Failed getting available memory: invalid argument

hip.cpp:67 std::size_t get_available_gpu_memory() { size_t free; size_t total; auto status = hipMemGetInfo(&free, &total);
if(status != hipSuccess) MIGRAPHX_THROW("Failed getting available memory: " + hip_error(status)); //line67 return free; }

Operating System

20.04.6 LTS (Focal Fossa)

CPU

AMD EPYC 7313 16-Core Processor

GPU

AMD Instinct MI250X

Other

No response

ROCm Version

ROCm 6.0.0

Steps to Reproduce

git clone MIGRAPHX code git checkout -b 6.1 origin/release/rocm-rel-6.1 docker build -t migraphx . docker run --device='/dev/kfd'--device='/dev/dri'-v=pwd:/code/AMDMIGraphX -w /code/AMDMIGraphX --group-add video -it migraphx rbuild prepare -d depend (------this failed, so change to next command------) ./tools/install_prereqs.sh. mkdir build cdbuild CXX=/opt/rocm/llvm/bin/clang++ cmake .. -DGPU_TARGETS=$(/opt/rocm/bin/rocminfo |grep -o -m1 'gfx.*') make -j$(nproc) make install make package dpkg -i <path_to_deb_file>

convert inception.onnx

run below python code import migraphx import numpy as np model = migraphx.parse_onnx("inceptioni1.onnx")
model.compile(migraphx.get_target("gpu")) - get error: AMDMIGraphX/src/targets/gpu/hip.cpp:67: get_available_gpu_memory: Failed getting available memory: invalid argument

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

items get inside docker:

root@3f0f44652a81:/code/AMDMIGraphX# echo "OS:" && cat /etc/os-release | grep -E "^(NAME=|VERSION=)"; OS: NAME="Ubuntu" VERSION="20.04.6 LTS (Focal Fossa)" root@3f0f44652a81:/code/AMDMIGraphX# echo "CPU: " && cat /proc/cpuinfo | grep "model name" | sort --unique; CPU: model name : AMD EPYC 7313 16-Core Processor root@3f0f44652a81:/code/AMDMIGraphX# echo "GPU:" && /opt/rocm/bin/rocminfo | grep -E "^\s*(Name|Marketing Name)"; GPU: Name: AMD EPYC 7313 16-Core Processor Marketing Name: AMD EPYC 7313 16-Core Processor Name: AMD EPYC 7313 16-Core Processor Marketing Name: AMD EPYC 7313 16-Core Processor Name: gfx90a Marketing Name: Name: amdgcn-amd-amdhsa--gfx90a:sramecc+:xnack- Name: gfx90a Marketing Name: Name: amdgcn-amd-amdhsa--gfx90a:sramecc+:xnack- Name: gfx90a Marketing Name: Name: amdgcn-amd-amdhsa--gfx90a:sramecc+:xnack- Name: gfx90a Marketing Name: Name: amdgcn-amd-amdhsa--gfx90a:sramecc+:xnack- Name: gfx90a Marketing Name: Name: amdgcn-amd-amdhsa--gfx90a:sramecc+:xnack- Name: gfx90a Marketing Name: Name: amdgcn-amd-amdhsa--gfx90a:sramecc+:xnack- Name: gfx90a Marketing Name: Name: amdgcn-amd-amdhsa--gfx90a:sramecc+:xnack- Name: gfx90a Marketing Name: Name: amdgcn-amd-amdhsa--gfx90a:sramecc+:xnack-

Alice1069 avatar May 30 '24 07:05 Alice1069