-
Notifications
You must be signed in to change notification settings - Fork 747
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
PyTorch Apple Silicon / macosx-arm64 support #1459
Comments
Do you mean that the generated |
Yes I have ~15 I need to a diff later when I have access to the machine but I've checked already that the /// Construct an ArrayRef from a std::vector.
// The enable_if stuff here makes sure that this isn't used for
// std::vector<bool>, because ArrayRef can't work on a std::vector<bool>
// bitfield.
template <typename A>
/* implicit */ ArrayRef(const std::vector<T, A>& Vec)
: Data(Vec.data()), Length(Vec.size()) {
static_assert(
!std::is_same<T, bool>::value,
"ArrayRef<bool> cannot be constructed from a std::vector<bool> bitfield.");
} Since I'm using the maven build from javacpp-presets and therefore |
Yes, that's quite weird. |
I need to check the exact commit later but it should be current master. I'll also try #1455. I also just ran a local build of cf80024 on a Linux machine, and I'm seeing the same behavior. So I suspect it might not be macos specific, but perhaps due to recent changes in the parser? Could it perhaps be related to what @benshiffman has seen for templated operator overloads? bytedeco/javacpp#732 (comment)
|
Perhaps. |
Still the same result. cd javacpp
git pull
mvn install Should be enough that |
RIght. And if you build now PR #1455 ? |
Yes that's it. With #1455 the constructors are mapped again! Tested sucessfully on Linux and on macosx-arm64. |
Duplicate of #1069 |
I recently got access to a Apple silicon machine, so I started to look into getting a native macosx-arm64 build for PyTorch. While we'll need to cross-build this in CI eventually, I've tried a native local build first so I can immediately run and test it.
I'm able to build cpython and libtorch with minimal changes. I ran into issues with OpenMP which I still need to figure out, so I've disabled it for now (I've seen that there's some special treatment of libomp in the native build).
One thing I'm currently struggling with is that the conversion from
Vector
toArrayRef
is missing in my local build, i.e.pytorch/src/gen/java/org/bytedeco/pytorch/TensorIndexArrayRef.java
Which causes all kinds of trouble as calling code now silently uses the
Pointer
constructor instead.Could this be due to the newer version of clang?
If I add these constructors manually back to the bindings, I get linking errors.
Any hints appreciated.
#1069
The text was updated successfully, but these errors were encountered: