CUDA.jl v5 compatibility and precompilation fixes#31
Open
nicolamos wants to merge 9 commits into
Open
Conversation
… v5 compatibility
…compilation error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: CUDA.jl v5 compatibility and precompilation fixes
Branch:
fix-cuda-wrapper-calls→pc2/GPUInspector.jlmainUpstream: https://github.com/pc2/GPUInspector.jl
Summary
Fixes breakages when loading GPUInspector with CUDA.jl v5: renamed NVML probe wrappers, deprecated device memory API, duplicate method definitions that block precompilation, and broken
savefig_monitoring_resultsdispatch in the CairoMakie extension.Problem
After updating to CUDA.jl v5, GPUInspector fails at precompile or runtime:
UndefVarErroronNVML.unsafe_nvml*(renamed upstream in CUDA.jl)CUDA.total_memory()ingpus()clear_gpu_memory/clear_all_gpus_memorydefined in both stubs andCUDAExt/utility.jlsavefig_monitoring_results: infinite recursion on multi-symbol calls; stub/extension signature clashKey Changes
1. NVML capability probes (
ext/CUDAExt/cuda_wrappers.jl)Use
NVML.unchecked_nvmlDeviceGetTemperature,unchecked_nvmlDeviceGetPowerUsage,unchecked_nvmlDeviceGetUtilizationRatesinstead of removedunsafe_nvml*names.2. Device memory query (
ext/CUDAExt/implementations/gpuinfo.jl)Replace deprecated
CUDA.total_memory()withCUDA.totalmem(dev)ingpus().3. Precompilation — memory cleanup (
ext/CUDAExt/utility.jl)Remove duplicate
clear_gpu_memory/clear_all_gpus_memoryfrom CUDAExt (already provided via stubs); avoids method overwrite during precompile.4. CairoMakie extension —
savefig_monitoring_results(ext/CairoMakieExt.jl, stubs)StackOverflow)filenameandprefixkeyword arguments5. Minor
CUDAExt.jl,implementations/general.jl,stubs_general.jl,stubs_monitoring.jl,Project.tomlcompat adjustments.Files Changed
10 files, +118 / −48 lines vs
main. No merge conflicts with upstreammain.Test plan
gpus()works with CUDA.jl v5supports_get_temperature, etc.) do not throw on capable hardwaresavefig_monitoring_results(r, :temperature)and multi-symbol form complete without stack overflowPkg.test())Open PR
Suggested PR title: Fix CUDA.jl v5 compatibility (NVML wrappers, totalmem, precompile, savefig dispatch)