Closed Twinklebear closed 5 years ago
I've worked around the ISPC crash (https://github.com/ispc/ispc/issues/1408) in https://github.com/Twinklebear/ispc-rs/commit/ad3d01cb24a266479a1744159b5a3add1483089f, released in ispc_compile 1.0.2
Awesome! Thank you
This PR uses the newly split ispc-rs crates, ispc_compile and ispc_rs to feature gate the compilation of the ISPC code to fix #2 . The compiled library are portable across vector ISAs by compiling them for multiple ISAs, then ISPC internally will pick the right backend to dispatch the function calls too, based on the host ISA. There's an existing issue in the ISPC compiler which seems to give an ICE if I compile for the KNL and SKX targets as well with optimization enabled, so I just have SSE through AVX2 on the list. I'll open an issue on the ISPC repo shortly with a smaller repro case (this may be a windows specific thing, or fixed in 1.10.0, I'm still looking into this some).
To compile the ISPC libraries and bindings compile with the optional feature enabled,
cargo build --features ispc
. To build with the existing bindings, just compile withcargo build
. This will select the right pre-compiled library for the corresponding host triple, so to distribute this library you'll need to build the bindings on each OS and package the libraries into the repo. The generated Rust bindings can be taken from any host OS though.