Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add support for OpenRISC/or1k architecture #4743

Closed
manuelafm opened this issue May 25, 2014 · 4 comments
Closed

Please add support for OpenRISC/or1k architecture #4743

manuelafm opened this issue May 25, 2014 · 4 comments

Comments

@manuelafm
Copy link

Forwarding the bug from Debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749195

Hi,

The patch provided (against version 1.8.1-1) allows to get this package compiled in OpenRISC/or1k architecture that Christian and I are creating in Debian.

After installing python-numpy and python-nose, most of the unit tests seem to pass, and the ones that do not pass might be due to underlying problems in blas or others (e.g. threading issues in the platform) that we still have to work out.

Cheers.

@manuelafm
Copy link
Author

Patch:

--- a/numpy/core/include/numpy/npy_cpu.h
+++ b/numpy/core/include/numpy/npy_cpu.h
@@ -66,6 +66,8 @@
     #define NPY_CPU_MIPSEL
 #elif defined(__MIPSEB__)
     #define NPY_CPU_MIPSEB
+#elif defined(__or1k__)
+    #define NPY_CPU_OR1K
 #elif defined(__aarch64__)
     #define NPY_CPU_AARCH64
 #elif defined(__mc68000__)
--- a/numpy/core/include/numpy/npy_endian.h
+++ b/numpy/core/include/numpy/npy_endian.h
@@ -37,6 +37,7 @@
             || defined(NPY_CPU_ARMEB)   \
             || defined(NPY_CPU_SH_BE)   \
             || defined(NPY_CPU_MIPSEB)  \
+            || defined(NPY_CPU_OR1K)    \
             || defined(NPY_CPU_M68K)
         #define NPY_BYTE_ORDER NPY_BIG_ENDIAN
     #else

@rgommers
Copy link
Member

Hi @manuelafm, thanks for the patch. Would you care to submit this as a pull request? If you're not set up for that, I can send one.

@juliantaylor
Copy link
Contributor

anything special about the platform?
what are the alignment requirements?
how do doubles and complex numbers need to be aligned?
what is the binary format of floating point numbers (float, double, long double)?

@manuelafm
Copy link
Author

@rgommers: I would appreciate if you could do it, I will not have access to computers with good bandwidth for a few days.

@juliantaylor: it's 32 bits and big endian, similar to mips (MIPSEB). I don't know many details about the architecture, but a person with more knowledge of this told me (see link to Debian bug report at the start of this thread) that the implementation details provided for other arches should work for this one. I will forward the questions to him just in case, but if you don't receive more info about this, assume that the provided patch is enough.

Thanks.

juliantaylor added a commit that referenced this issue May 26, 2014
BLD: add support for OpenRISC architecture.  Closes gh-4743.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants