You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
463B

  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. CUDA_ROOT="${CUDA_ROOT:-/usr/local/cuda}"
  4. SRC="internal/demod/gpudemod/kernels.cu"
  5. OUT_DIR="internal/demod/gpudemod/build"
  6. OUT_OBJ="$OUT_DIR/kernels.o"
  7. mkdir -p "$OUT_DIR"
  8. if [[ ! -x "$CUDA_ROOT/bin/nvcc" ]]; then
  9. echo "nvcc not found at $CUDA_ROOT/bin/nvcc" >&2
  10. exit 1
  11. fi
  12. echo "Building CUDA kernel artifacts for Linux..."
  13. "$CUDA_ROOT/bin/nvcc" -c "$SRC" -o "$OUT_OBJ" -I "$CUDA_ROOT/include"
  14. echo "Built: $OUT_OBJ"