Skip to content

milanfusco/mcFramework-GPU

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcFramework-GPU

CPU (NumPy) vs GPU (PyTorch/CUDA) Monte Carlo pi estimation demos + benchmarks.

Setup

  • Python: 3.11+

Using uv (recommended):

uv sync

Using pip:

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Run

  • Simple demo:
python -m examples.simple_demo
  • Benchmark (writes JSON into results/):
python -m pi_estimation.benchmark
  • Plots (reads JSON and writes PNGs into results/):
python -m pi_estimation.visualize

GPU / CUDA

If torch.cuda.is_available() is False, everything will still run in CPU-only mode. To use CUDA, install a CUDA-enabled PyTorch build appropriate for your system (see PyTorch install instructions).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages