Skip to content

Commit ee1eff6

Browse files
committed
Extract compute capability from output
1 parent af0a842 commit ee1eff6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

init/eessi_archdetect.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,11 @@ accelpath() {
219219
amd-smi static --asic | grep TARGET_GRAPHICS_VERSION 2>&1 > $amd_smi_out
220220
if [[ $? -eq 0 ]]; then
221221
amd_smi_info=$(head -n 1 $amd_smi_out)
222-
log "DEBUG" "accelpath: '${amd_smi_info}' derived from amd-smi output"
222+
amdgcn_cc=$(echo $amd_smi_info | sed 's/.*: //')
223+
log "DEBUG" "accelpath: AMDGCN compute capability '${amdgcn_cc}' derived from amd-smi output '${amd_smi_info}'"
224+
res="accel/amd/${amdgcn_cc}"
225+
echo $res
226+
rm -f $amd_smi_out
223227
else
224228
log "DEBUG" "accelpath: ami-smi command failed, see output in $amd_smi_out"
225229
exit 3

0 commit comments

Comments
 (0)