candle icon indicating copy to clipboard operation
candle copied to clipboard

Lost support for MacOS < 15.0 Sequoia

Open jacobgorm opened this issue 3 weeks ago • 7 comments

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?

jacobgorm avatar Nov 13 '25 16:11 jacobgorm

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)

ivarflakstad avatar Nov 14 '25 14:11 ivarflakstad

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 :-)

jacobgorm avatar Nov 14 '25 15:11 jacobgorm

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.

ivarflakstad avatar Nov 14 '25 15:11 ivarflakstad

Sorry, env var doesn't need to be compile time evaluated. Normal env var would do.

ivarflakstad avatar Nov 14 '25 15:11 ivarflakstad

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?

jacobgorm avatar Nov 14 '25 15:11 jacobgorm

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)

ivarflakstad avatar Nov 14 '25 15:11 ivarflakstad

I was thinking something like this

ivarflakstad avatar Nov 20 '25 19:11 ivarflakstad