mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-02-15 09:05:40 -05:00
set metal fast math default to 0 (disabled) (#3370)
* set metal fast math default to 0 (disabled)
It's a correctness fix because we use inf and nan. Let's see how slow it is
* skip failed onnx tests
* tmp DISABLE_COMPILER_CACHE=1 in metal benchmark
* Revert "tmp DISABLE_COMPILER_CACHE=1 in metal benchmark"
This reverts commit 22267df380.
This commit is contained in:
@@ -20,7 +20,7 @@ class MetalCompiler(Compiler):
|
||||
return subprocess.check_output(['xcrun', '-sdk', 'macosx', 'metallib', '-', '-o', '-'], input=air)
|
||||
else:
|
||||
options = Metal.MTLCompileOptions.new()
|
||||
options.setFastMathEnabled_(getenv("METAL_FAST_MATH", 1))
|
||||
options.setFastMathEnabled_(getenv("METAL_FAST_MATH"))
|
||||
library = unwrap2(self.device.device.newLibraryWithSource_options_error_(src, options, None))
|
||||
return library.libraryDataContents().bytes().tobytes()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user