Skip to content

jacksonlmr/CS-479-Assignment-2

Repository files navigation

CS-479-Assignment-2

Running Code

Create a Python virtual environment:

python -m venv .venv

Activate it:

  • Windows (PowerShell)
.venv\Scripts\Activate.ps1
  • Windows (bash)
source .venv/Scripts/activate
  • macOS/Linux
source .venv/bin/activate

GPU Requirements

GPU acceleration requires a CUDA-compatible NVIDIA GPU with the matching CUDA Toolkit installed.

First, check your CUDA version:

nvcc --version

Update requirements.txt file to reflect the version you have installed.

Verify CuPy can see your GPU:

python gpu_check.py

If you see a DLL load failed error, the installed cupy version does not match your CUDA toolkit — uninstall cupy and reinstall with the correct version above, or use --cpu.

Running the Experiments

Install dependencies:

pip install -r requirements.txt

By default, the experiment auto-detects GPU availability and falls back to CPU if unavailable.

  • Default:
python experiment_1.py
  • Force CPU (NumPy):
python experiment_1.py --cpu
  • Force GPU (CuPy) — exits with an error if unavailable:
python experiment_1.py --gpu

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors