Merge pull request #21494 from dfm:mac-arm-x86

PiperOrigin-RevId: 640613602
This commit is contained in:
jax authors 2024-06-05 12:36:00 -07:00
commit 0cbd0a023d

View File

@ -77,9 +77,19 @@ static int GetXCR0EAX() {
static void ReportMissingCpuFeature(const char* name) {
PyErr_Format(
PyExc_RuntimeError,
#if defined(__APPLE__)
"This version of jaxlib was built using %s instructions, which your "
"CPU and/or operating system do not support. This error is frequently "
"encountered on macOS when running an x86 Python installation on ARM "
"hardware. In this case, try installing an ARM build of Python. "
"Otherwise, you may be able work around this issue by building jaxlib "
"from source.",
#else
"This version of jaxlib was built using %s instructions, which your "
"CPU and/or operating system do not support. You may be able work around "
"this issue by building jaxlib from source.", name);
"this issue by building jaxlib from source.",
#endif
name);
}
static PyObject *CheckCpuFeatures(PyObject *self, PyObject *args) {