Files
Connor Baker d027f0a543 cudaPackages.tests.cudnn-frontend: init
Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
2025-10-22 13:14:49 -07:00

39 lines
678 B
Nix

{
cudaNamePrefix,
cudnn-frontend,
jq,
lib,
writeShellApplication,
}:
let
inherit (lib.meta) getExe';
in
writeShellApplication {
derivationArgs = {
__structuredAttrs = true;
strictDeps = true;
};
name = "${cudaNamePrefix}-tests-cudnn-frontend-samples";
runtimeInputs = [
cudnn-frontend.samples
jq
];
text = ''
args=( "${getExe' cudnn-frontend.samples "samples"}" )
if (( $# != 0 ))
then
args+=( "$@" )
"''${args[@]}"
else
args+=(
--success
--rng-seed=0
--reporter=json
)
echo "Running with default arguments: ''${args[*]}" >&2
"''${args[@]}" | jq
fi
'';
}