Skip to content

Default build system support for CUDA/PTX #19302

@maleadt

Description

@maleadt

As master is getting closer to be compatible with CUDAnative.jl, I'd like to discuss how we make the default build and/or the binary releases compatible with it. I think it would be a great addition for users to be able to target GPUs without too much effort.

  1. I've been using LLVM 3.9 on my branch, including some patches to get rid of some PTX-specific bugs. I guess Upgrade to LLVM 3.9 #19123 is bound to happen before, at which point including some extra patches shouldn't hurt?

  2. The next obvious change is to enable the PTX back-end in the default build of LLVM. I'm not sure how hard we try to keep libLLVM small (vs. eg. the effort to keep sysimg small), but FWIW enabling the PTX target next to X86 increases the LLVM library file size from 36624 to 37664 kB (Linux x64), a mere 3% increase.

  3. Lastly, CUDAnative.jl uses LLVM.jl, which wraps and extends the C API. This requires llvm-config as well as the LLVM headers, both of which aren't part of the binary build. @vtjnash suggested creating both a regular build tarball, and a extras or tools archive containing non-critical headers and tools (this could also include, eg., libclang for Cxx.jl).

cc @vchuravy @tkelman @staticfloat

Added a tentative 0.6.0 milestone, it would be nice to have experimental GPU support in that version.
But I haven't been on the triage calls, so please change if that has already been decided against.

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildingBuild system, or building Julia or its dependenciesgpuAffects running Julia on a GPU

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions