-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rocprim: init at 2.11.0-5.3.1 #197337
rocprim: init at 2.11.0-5.3.1 #197337
Conversation
Cleaned up some things. |
Now depends on #197838 |
a1c9204
to
ce480c2
Compare
Sorry, I didn’t have much time yet to look at all the PRs, I hope I get more time next week. One thing, that I was missing for a long time is running tests for gpu packages (ROCm, amdvlk, etc.). As you noted, using the nixos test framework doesn’t work, because the VM can’t access GPUs. However, we can also run tests outside a VM and make hardware accessible to derivations with Here’s an example for a simple OpenCL test. I guess it would benefit from pulling part of that out into a “framework” like {
system ? builtins.currentSystem,
pkgs ? import ../.. { inherit system; },
...
} @ args:
let
lib = pkgs.lib;
in
pkgs.stdenv.mkDerivation {
# name = "test-run-${config.name}";
name = "test-run-rocm-opencl";
requiredSystemFeatures = [ "nixos-test" ];
# TODO Use callPackage so we can take packages as arguments?
nativeBuildInputs = with pkgs; [ clinfo ];
OCL_ICD_VENDORS = "${pkgs.rocm-opencl-icd}/etc/OpenCL/vendors/";
# TODO Testing graphics drivers also needs /dev/dri, so make this configurable?
buildCommand = ''
mkdir -p $out
if [[ ! -e /sys ]]; then
echo 'Run this test as *root* with `--option extra-sandbox-paths '/sys'` and a GPU'
exit 1
fi
# Run test
# Test fails if the number of platforms is 0
clinfo | grep -E 'Number of platforms * [1-9]'
'';
# passthru = config.passthru;
meta = with lib.maintainers; {
maintainers = [ Flakebi ];
};
} |
@Flakebi That's gonna take some doing, and may be better suited to a bigger PR concerning rocm packages. |
Yes, that sounds good to me. |
Rolled into #198770 |
Description of changes
Tracking: #197885
First part in a whole bunch of porting...
rocprim.passthru.tests
will likely always fail due to it being in a vm, but I have confirmed the tests generated do work on hardware.Depends on #197838
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes