denzp / rust-ptx-builder

Convenient `build.rs` helper for NVPTX crates
MIT License
53 stars 9 forks source link

npvtx-nvidia-cuda #9

Open gnzlbg opened 6 years ago

gnzlbg commented 6 years ago

I only see nvptx64-nvidia-cuda as a supported target, is it also possible to use rust-ptx-builder from a 32-bit host ? (e.g. i686-unknown-linux-gnu or i686-apple-darwin ?)

denzp commented 6 years ago

There is no technical limitation for that, simply I didn't find enough energy to support them both. Choosing a main supported target, I considered a fact that CUDA and HPC systems usually operate with big amounts of data, so there is no serious chance of running them on a 32-bit host OS.

I'm not sure how can we automatically distinguish between 32-bit and 64-bit target from build.rs script. I think it only can get info about host target, which can differ from actual target in case of cross-compilation.

So if we decide to support both targets, I think we will have to go with manual specification the expected target.

gnzlbg commented 6 years ago

I think it only can get info about host target, which can differ from actual target in case of cross-compilation.

Inside a build script, HOST is the triple of the system in which compilation is happening, and TARGET is the triple of the system being actually target.