depot/third_party/nixpkgs/pkgs/development/libraries/rocm-opencl-icd/test.nix
Default email a71eb02b76 Project import generated by Copybara.
GitOrigin-RevId: a115bb9bd56831941be3776c8a94005867f316a7
2022-11-27 10:42:12 +01:00

19 lines
465 B
Nix

{ lib, makeImpureTest, clinfo, rocm-opencl-icd, rocm-smi }:
makeImpureTest {
name = "rocm-opencl";
testedPackage = "rocm-opencl-icd";
nativeBuildInputs = [ clinfo rocm-smi ];
OCL_ICD_VENDORS = "${rocm-opencl-icd}/etc/OpenCL/vendors/";
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;
};
}