Fix Mac M1 build#16763
Conversation
|
It would be great if this could be tested in CI going forward (possibly in a follow-up PR?). In the meantime, Edit: Fixed ambiguous wording |
Please try it out and let me know. I agree that a Mac M1 CI test would be nice but I don't know if we have Mac M1 build agents. Will try to set something up if possible. Edit: Sorry, I think I misunderstood - you've confirmed that this change works locally. In that case, good to know. :) |
|
This also fixes the SIGILL for me on my 2020 13" M1 MBP. It does expose a test failure in the Java CoreML test as CoreML is less precise than the expected value, I'll put a small patch in for that, though I don't think any of the CI runs have both |
### Description Reduces precision on the CoreML provider test as it returns slightly different answers than the other tested providers. Checked on a 2020 13" M1 MBP. ### Motivation and Context Fixes Java CoreML test failure after #16763.
- Add ifndef `__APPLE__` to skip lines which cause EXC_BAD_INSTRUCTION error. - Fix floatToHalf/doubleToHalf conversion issue and add tests.
### Description Reduces precision on the CoreML provider test as it returns slightly different answers than the other tested providers. Checked on a 2020 13" M1 MBP. ### Motivation and Context Fixes Java CoreML test failure after #16763.
### Description Reduces precision on the CoreML provider test as it returns slightly different answers than the other tested providers. Checked on a 2020 13" M1 MBP. ### Motivation and Context Fixes Java CoreML test failure after microsoft#16763.
Description
Add ifndef
__APPLE__to skip lines which cause EXC_BAD_INSTRUCTION error.Fix floatToHalf/doubleToHalf conversion issue and add tests.
Eigen was updated and the type of
__half_raw.xchanged to__fp16. See this commit. From here, "Operators that expect arithmetic operands immediately promote__fp16operands tofloat." Apparently, the__fp16result was promoted tofloatbefore assignment touint16_t. Copying the bytes over with something likestd::bit_castdoes what we want here.Motivation and Context
Fix Mac M1 build issues.
Fix #16496.
Fix #16230.