CUDA.jl compiles to 15GB

Hi.
I’m trying to use PackageCompiler and CUDA. PackageCompiler makes even the smallest program around 150MB because it adds almost all of Julia to it. But when using CUDA, the smallest program seems to have 15GB in the artifacts folder.
That’s a bit much and I don’t really understand where it’s all coming from. Any way to reduce that?
Thanks a lot!

2 Likes

Yes, that’s a bug/feature of PackageCompiler where it gathers all artifacts. CUDA.jl has lazy artifacts for all versions of CUDA, so PackageCompiler should probably skip lazy artifacts.

Thanks! Is there a way to fix it? Even if it means manually (I’d make a script) deleting some of the stuff that’s not used? Is there a way to figure out what is really needed?
Thanks again!

I think you can just delete the CUDA artifacts, it’ll redownload them at run time. Or patch PackageCompiler, the logic processing artifacts is pretty simple.

You’re right, deleting everything under artifacts makes the code download a subset of them at runtime (15GB to 4GB! Progress!). You’re saying I should try to patch the code so that less artifacts get in there. Maybe I can look into CUDA.jl at some point to do that, to see what dependencies I need (maybe create a subset of CUDA.jl). My objective would be to have a reasonably sized compiled folder, so I’d want to reduce the stuff that gets downloaded at run time as well.
Thanks!