mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-02-12 15:45:27 -05:00
docs: add warning message for conda users when using METAL (#3917)
* docs: add warning message for conda users when using METAL * fix: conda metal warning too long. disabled line length check * docs: changed conda METAL warning to include DISABLE_COMPILER_CACHE=1 * fix(metal): now detecting invalid library magic * format: removed noqa E501 * fix(metal): conda error line len * fix: typo --------- Co-authored-by: Léo Paillé <leo.paille@enseirb-matmeca.fr>
This commit is contained in:
@@ -36,6 +36,7 @@ class MetalProgram:
|
||||
shader.write(lib)
|
||||
shader.flush()
|
||||
os.system(f"cd {pathlib.Path(__file__).parents[2]}/disassemblers/applegpu && python3 compiler_explorer.py {shader.name}")
|
||||
assert lib[:4] == b"MTLB", "Invalid Metal library. Could be due to using conda. Try system python or METAL_XCODE=1 DISABLE_COMPILER_CACHE=1."
|
||||
data = libdispatch.dispatch_data_create(lib, len(lib), None, None)
|
||||
self.library = unwrap2(self.device.device.newLibraryWithData_error_(data, None))
|
||||
self.fxn = self.library.newFunctionWithName_(name)
|
||||
|
||||
Reference in New Issue
Block a user