Closed flanggut closed 3 months ago
Hi all -- sorry for the inactivity. The upcoming rewrite (nanobind_v2
branch) will also have an ARM packet backend. Let's leave this PR open until this branch is merged in case others are looking for this.
The changes on nanobind_v2
have made their way onto master
, I think it entirely covers this PR.
Adding overloads for a neon intrinsics backend. The code is a ported version of the backend from the enoki repo. Tested via unit tests on an M1 mac. See also #63.
I had to add some "hacky" changes to make sure all tests compile and run. I'm happy to incorporate better ways to fix those issues:
changing the seed for the random generator in
validate_horizontal
intest.h
This is becauseassert_close
doesn't really work for floats ifresult_ref
is0
andresult
is something like1e-7
. I was hitting exactly that case on my system. Changing the seed doesn't fix it it just avoids it.Adding
<ostream>
tohalf.h
, and including half inpacket_neon.h
This is just sohalf
is defined inpacket_neon
when the conversion is instantiated.half.h
also includes an operator overload for ostreams so this needs to be defined as well.