updating rocprof script for supported hw check

Change-Id: I41a8571682fd4c9ab227cc7d964f86d027d5c964


[ROCm/rocprofiler commit: 1bc98d806d]
Bu işleme şunda yer alıyor:
gobhardw
2023-10-05 15:09:21 +05:30
işlemeyi yapan: Gopesh Bhardwaj
ebeveyn 54208cd7d0
işleme 8f5a295356
2 değiştirilmiş dosya ile 24 ekleme ve 0 silme
+1
Dosyayı Görüntüle
@@ -302,3 +302,4 @@ Example for file plugin output:
- Automatic ISA dumping for ATT. See README.
- CSV mode for ATT. See README.
- Added option to control kernel name truncation.
- Limit rocprof(v1) srcipt usage to only supported architectures.
+23
Dosyayı Görüntüle
@@ -36,6 +36,29 @@ TTLIB_PATH=$ROOT_DIR/lib/roctracer
ROCM_LIB_PATH=$ROOT_DIR/lib
PROF_BIN_DIR=$ROOT_DIR/libexec/rocprofiler
# check if rocprof is supportd on this gpu arch
V1_SUPPORTED_GPU_ARCHS=("gfx80x","gfx90x","gfx10xx")
CURRENT_AGENTS_LIST=$($BIN_DIR/rocm_agent_enumerator)
IS_SUPPORTED="false"
# split the CURRENT_AGENTS_LIST array into individual elements.
current_gpus=(${CURRENT_AGENTS_LIST[@]})
for gpu in "${current_gpus[@]}"; do
# Check first 5 characters of gpu strings.
if [[ "${V1_SUPPORTED_GPU_ARCHS[@]:0:5}" =~ "${gpu:0:5}" ]]; then
IS_SUPPORTED="true"
fi
done
if [[ $IS_SUPPORTED == "false" ]]; then
echo "rocprof(v1) is not supported on this device."
echo "Please refer project's README for a list of supported architecures or use rocprofv2"
exit 1
fi
if [ -z "$ROCP_PYTHON_VERSION" ] ; then
ROCP_PYTHON_VERSION=python3
fi