You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: init/eessi_archdetect.sh
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -179,13 +179,14 @@ accelpath() {
179
179
# If EESSI_ACCELERATOR_TARGET_OVERRIDE is set, use it
180
180
log "DEBUG""accelpath: Override variable set as '$EESSI_ACCELERATOR_TARGET_OVERRIDE' "
181
181
if [ !-z$EESSI_ACCELERATOR_TARGET_OVERRIDE ];then
182
-
if [[ "$EESSI_ACCELERATOR_TARGET_OVERRIDE"=~ ^accel/nvidia/cc[0-9]+$ ]];then
183
-
echo${EESSI_ACCELERATOR_TARGET_OVERRIDE}
182
+
# Regex that allows both NVIDIA and AMD overrides
183
+
if [[ "$EESSI_ACCELERATOR_TARGET_OVERRIDE"=~ ^accel/(nvidia/cc[0-9]+|amd/gfx[0-9a-f]+)$ ]];then
184
+
echo"$EESSI_ACCELERATOR_TARGET_OVERRIDE"
184
185
return 0
185
186
else
186
-
log "ERROR""Value of \$EESSI_ACCELERATOR_TARGET_OVERRIDE should match 'accel/nvidia/cc[0-9]+', but it does not: '$EESSI_ACCELERATOR_TARGET_OVERRIDE'"
187
+
log "ERROR""Value of \$EESSI_ACCELERATOR_TARGET_OVERRIDE should match 'accel/nvidia/cc[0-9]+' or 'accel/amd/gfx[0-9a-f]+', but it does not: '$EESSI_ACCELERATOR_TARGET_OVERRIDE'"
0 commit comments