d027f0a543
Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
39 lines
678 B
Nix
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
|
|
'';
|
|
}
|