We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa8a838 commit d00aee6Copy full SHA for d00aee6
1 file changed
rocminfo.cc
@@ -1201,9 +1201,14 @@ int CheckInitialState(void) {
1201
return -1;
1202
}
1203
} else {
1204
- printf("%sROCk module is NOT loaded, possibly no GPU devices%s\n",
+ int module_dir;
1205
+ module_dir = open("/sys/module/amdgpu", O_DIRECTORY);
1206
+ if (module_dir < 0) {
1207
+ printf("%sROCk module is NOT loaded, possibly no GPU devices%s\n",
1208
COL_RED, COL_RESET);
- return -1;
1209
+ return -1;
1210
+ }
1211
+ close(module_dir);
1212
1213
1214
// Check if user belongs to the group for /dev/kfd (e.g. "video" or
0 commit comments