This is a epo for performance testing a backend for Python and machine learning development.. Contains some simple Python scripts.
- Python Matrix Multiplication
- GPU Benchmarking (Pytorch) (Notebook)
# This example uses python 3.11
cd app
poetry install
poetry shell
python ./scripts/matrix_multiplication.py
Results: Matrix multiplication of size 16000x16000 took 16.08 seconds
- Open Activity Monitor
- Right Click the Activity Monitor Dock Icon
- Select Monitor -> Show CPU History
- Open Activity Monitor
- Select Window in the Menu Bar -> GPU History
You can view the notebook here. This notebook runs 30 samples of matrix multiplication of size 50,000x50,000 tensor on both the CPU and GPU. The GPU is ~10x faster than the CPU for machine learning workloads using Pytorch.
I am currently using a 2023 MacBook Pro with a M1 Max Ultra Configuration with 16 core CPU and 40 core GPU and 128GB of unified memory (RAM).
cd app
poetry install
poetry run jupyter lab
Here are the notebook results: