Skip to content

Commit

Permalink
small quality off life improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostyTheSouthernSnowman committed Aug 29, 2023
1 parent 715047a commit d0b9f68
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions tinygrad/runtime/ops_metal.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# pip3 install pyobjc-framework-Metal pyobjc-framework-Cocoa pyobjc-framework-libdispatch
import os, subprocess, pathlib, functools, ctypes
import Metal, Cocoa, libdispatch # type: ignore
from typing import List, Any
from tinygrad.codegen.linearizer import LinearizerOptions
from tinygrad.renderer.cstyle import uops_to_cstyle, CStyleLanguage
from tinygrad.helpers import prod, getenv, DEBUG, DType, dtypes
from tinygrad.ops import Compiled
from tinygrad.runtime.lib import RawBufferMapped, LRUAllocator
try:
import os, subprocess, pathlib, functools, ctypes
import Metal, Cocoa, libdispatch # type: ignore
from typing import List, Any
from tinygrad.codegen.linearizer import LinearizerOptions
from tinygrad.renderer.cstyle import uops_to_cstyle, CStyleLanguage
from tinygrad.helpers import prod, getenv, DEBUG, DType, dtypes
from tinygrad.ops import Compiled
from tinygrad.runtime.lib import RawBufferMapped, LRUAllocator
except ImportError as e:
raise ImportError(f"{e.name}. \n If you may want to try:\n\tpip3 install pyobjc-framework-Metal pyobjc-framework-Cocoa pyobjc-framework-libdispatch\n")

METAL_XCODE = getenv("METAL_XCODE")

Expand Down

0 comments on commit d0b9f68

Please sign in to comment.