2023-10-19 13:55:26 +00:00
|
|
|
{ lib
|
|
|
|
, makeImpureTest
|
|
|
|
, clinfo
|
|
|
|
, clr
|
|
|
|
, rocm-smi
|
|
|
|
}:
|
2022-11-27 09:42:12 +00:00
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
makeImpureTest {
|
|
|
|
name = "rocm-smi";
|
|
|
|
testedPackage = "rocmPackages_5.clr";
|
2022-11-27 09:42:12 +00:00
|
|
|
nativeBuildInputs = [ clinfo rocm-smi ];
|
2023-10-19 13:55:26 +00:00
|
|
|
OCL_ICD_VENDORS = "${clr.icd}/etc/OpenCL/vendors";
|
2022-11-27 09:42:12 +00:00
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
# Test fails if the number of platforms is 0
|
|
|
|
clinfo | grep -E 'Number of platforms * [1-9]'
|
|
|
|
rocm-smi | grep -A1 GPU
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
maintainers = teams.rocm.members;
|
|
|
|
};
|
|
|
|
}
|