Skip to content

armgit / uzu

Public Imported from GitHub
0

A high-performance inference engine for AI models

opt workaround

uuuvnc84ee17c7337
diff --git a/Cargo.toml b/Cargo.toml
index e6b72f308..e772382bd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,7 +16,4 @@ authors = ["Mirai Tech <https://trymirai.com>"]
repository = "https://github.com/trymirai/uzu"
[profile.release]
-lto = true
-
-[profile.test]
-inherits = "release"
+lto = "thin"
diff --git a/crates/uzu/build.rs b/crates/uzu/build.rs
index aa2258fba..8f6ce42b6 100644
--- a/crates/uzu/build.rs
+++ b/crates/uzu/build.rs
@@ -428,7 +428,7 @@ fn compile_metal_files(
// Optimization level: Metal supports up to -O2
let opt = env::var("OPT_LEVEL").unwrap_or_else(|_| "0".into());
let metal_opt_flag = match opt.as_str() {
- "0" => "-O0",
+ "0" => "-O1", // NOTE TODO FIXME WORKAROUND: matmul kernels compiled with -O0 are broken and require a reboot to unfreeze the os
"1" => "-O1",
_ => "-O2", // treat levels 2,3,s,z as O2 for metal
};