← back to Exo
check gpu usage
afe71c01da21703171cc3cce52d0d3ae6d29c64e · 2024-12-11 15:28:57 +0000 · Alex Cheema
Files touched
Diff
commit afe71c01da21703171cc3cce52d0d3ae6d29c64e
Author: Alex Cheema <alexcheema123@gmail.com>
Date: Wed Dec 11 15:28:57 2024 +0000
check gpu usage
---
.github/bench.py | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/.github/bench.py b/.github/bench.py
index f26dc4fb..dd9e8e99 100644
--- a/.github/bench.py
+++ b/.github/bench.py
@@ -6,6 +6,20 @@ import os
import boto3
from typing import Dict, Any
from datetime import datetime
+import subprocess
+
+
+def check_gpu_access():
+ try:
+ # Check if MLX can see the GPU
+ import mlx.core as mx
+ print("MLX device info:", mx.default_device())
+
+ # Check Metal device availability
+ result = subprocess.run(['system_profiler', 'SPDisplaysDataType'], capture_output=True, text=True)
+ print("GPU Info:", result.stdout)
+ except Exception as e:
+ print(f"Failed to check GPU access: {e}")
async def measure_performance(api_endpoint: str, prompt: str, model: str) -> Dict[str, Any]:
@@ -144,4 +158,5 @@ async def main() -> None:
if __name__ == "__main__":
+ check_gpu_access()
asyncio.run(main())
\ No newline at end of file
← 23158a42 add branch name to results
·
back to Exo
·
more robust configure_mlx.sh cb40eb23 →