From 89cd380bfc34ceb7a535b2ec4d6083f95778cdc0 Mon Sep 17 00:00:00 2001 From: George Hotz <72895+geohot@users.noreply.github.com> Date: Fri, 1 Sep 2023 22:02:30 -0700 Subject: [PATCH] add nvidia CI (#1737) * add nvidia * speed(nvidia) --- .github/workflows/benchmark.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 7a28ce2108..c90ea1b107 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -62,9 +62,37 @@ jobs: matmul.txt sd.txt + testnvidiabenchmark: + name: NVIDIA Benchmark + runs-on: [self-hosted, Linux, CUDA] + if: github.repository_owner == 'tinygrad' + env: + PYTHONPATH: . + steps: + - name: Checkout Code + uses: actions/checkout@v3 + - name: Run model inference benchmark + run: CUDA=1 python3 test/external/external_model_benchmark.py + - name: Test speed vs torch + run: CUDA=1 BIG=2 TORCHCUDA=1 python3 test/test_speed_v_torch.py | tee torch_speed.txt + shell: bash + - name: Run GPT2 + run: | + CUDA=1 python3 examples/gpt2.py --prompt "Hello." --count 10 --temperature 0 --timing | tee gpt2_unjitted.txt + CUDA=1 JIT=1 python3 examples/gpt2.py --prompt "Hello." --count 10 --temperature 0 --timing | tee gpt2_jitted.txt + shell: bash + - uses: actions/upload-artifact@v3 + with: + name: Speed (NVIDIA) + path: | + onnx_inference_speed.csv + torch_speed.txt + gpt2_unjitted.txt + gpt2_jitted.txt + testamdbenchmark: name: AMD Benchmark - runs-on: [self-hosted, Linux] + runs-on: [self-hosted, Linux, ROCM] if: github.repository_owner == 'tinygrad' env: PYTHONPATH: .