candle
candle copied to clipboard
Lost support for MacOS < 15.0 Sequoia
The commit 06387ae55 adds a call to compile_options.setMathMode() that is only supported from MacOS 15.0 and up. I am using Candle for an application that requires support for older MacOS version, so I am wondering if it would be possible to check for an older version of the SDK and use the deprecated setFastMathEnabled on those versions, to preserve backwards-compatibility?
Absolutely. Would you like to open a PR, or do you want us to handle it? (not sure I'll be available to fix this right away)
I don't have much experience doing ifdef-like equivalents in Rust on something like SDK versions, so if you guys would be able to provide at fix at some point it definitely would be much appreciated :-)
Right.
A simpler impl could be to add a compile time env flag ala CANDLE_METAL_FAST_MATH, and only set fast math if it is truthy.
Then I could revisit with a more sophisticated approach later.
Sorry, env var doesn't need to be compile time evaluated. Normal env var would do.
For now I can just use an older version of the code, and it seems like fast math should ideally still be enabled, just with the older now-deprecated way of doing, right?
Yes, but I want that env flag to toggle fast math anyway, so if you're up for it we solve two issues in one. (One temporarily ofc, the real fix will arrive eventually)
I was thinking something like this