Skip to content

Probe rocSPARSE with Libdl only - #1051

Open
luraess wants to merge 1 commit into
mainfrom
lr/verinf
Open

Probe rocSPARSE with Libdl only#1051
luraess wants to merge 1 commit into
mainfrom
lr/verinf

Conversation

@luraess

@luraess luraess commented Aug 25, 2026

Copy link
Copy Markdown
Member

Relates to #1040. Follow-up to #1001.

#1001 moved the rocSPARSE version query into a subprocess so a segfault on a broken ROCm install (#920) degrades to err instead of killing the session. But the child ran using AMDGPU under the active project which is expensive.

The child now uses Base.Libc.Libdl only: it dlopens librocsparse by the absolute path the parent already knows and calls rocsparse_create_handle / rocsparse_get_version directly. The result is memoized for the session.

cc @simeonschaub

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AMDGPU.jl Benchmarks

Details
Benchmark suite Current: b05f351 Previous: 16f5974 Ratio
amdgpu/synchronization/context/device 550 ns 755 ns 0.73
amdgpu/synchronization/stream/blocking 230 ns 317.5 ns 0.72
amdgpu/synchronization/stream/nonblocking 310 ns 432.25 ns 0.72
array/accumulate/Float32/1d 73244 ns 97092.25 ns 0.75
array/accumulate/Float32/dims=1 248444.5 ns 299718.5 ns 0.83
array/accumulate/Float32/dims=1L 79688.75 ns 121446.75 ns 0.66
array/accumulate/Float32/dims=2 71968.75 ns 130896.75 ns 0.55
array/accumulate/Float32/dims=2L 2617124.75 ns 2806321.5 ns 0.93
array/accumulate/Int64/1d 77849 ns 113217 ns 0.69
array/accumulate/Int64/dims=1 242724.5 ns 269376.25 ns 0.90
array/accumulate/Int64/dims=1L 84306.5 ns 144501.75 ns 0.58
array/accumulate/Int64/dims=2 83984 ns 127879.25 ns 0.66
array/accumulate/Int64/dims=2L 2892025.5 ns 2948585.75 ns 0.98
array/broadcast 73151.25 ns 64054.75 ns 1.14
array/construct 2027.5 ns 3220 ns 0.63
array/copy 36905.5 ns 39815 ns 0.93
array/copyto!/cpu_to_gpu 111524.75 ns 94539.5 ns 1.18
array/copyto!/gpu_to_cpu 110772.25 ns 95039.5 ns 1.17
array/copyto!/gpu_to_gpu 48313.25 ns 42115 ns 1.15
array/iteration/findall/bool 138179.25 ns 198036.5 ns 0.70
array/iteration/findall/int 150259.5 ns 207411.5 ns 0.72
array/iteration/findfirst/bool 146234.5 ns 167311.75 ns 0.87
array/iteration/findfirst/int 145174.5 ns 155156.75 ns 0.94
array/iteration/findmin/1d 112614 ns 179444.25 ns 0.63
array/iteration/findmin/2d 108961.5 ns 161089.25 ns 0.68
array/iteration/logical 247388.25 ns 317088.25 ns 0.78
array/iteration/scalar 296551.5 ns 343653.25 ns 0.86
array/permutedims/2d 72169 ns 82694.75 ns 0.87
array/permutedims/3d 71301.25 ns 82232.25 ns 0.87
array/permutedims/4d 73846.25 ns 84369.75 ns 0.88
array/random/rand/Float32 45208.5 ns 53677.5 ns 0.84
array/random/rand/Int64 54011 ns 66274.75 ns 0.81
array/random/rand!/Float32 65121.25 ns 49389.75 ns 1.32
array/random/rand!/Int64 53471 ns 59654.75 ns 0.90
array/random/randn/Float32 79321.5 ns 93112.25 ns 0.85
array/random/randn!/Float32 80596.5 ns 69269.75 ns 1.16
array/reductions/mapreduce/Float32/1d 97961.25 ns 141249.25 ns 0.69
array/reductions/mapreduce/Float32/dims=1 84738.75 ns 105462 ns 0.80
array/reductions/mapreduce/Float32/dims=1L 830031 ns 862533.5 ns 0.96
array/reductions/mapreduce/Float32/dims=2 84221.25 ns 108059.5 ns 0.78
array/reductions/mapreduce/Float32/dims=2L 142407.75 ns 155446.75 ns 0.92
array/reductions/mapreduce/Int64/1d 97658.75 ns 140932 ns 0.69
array/reductions/mapreduce/Int64/dims=1 83453.5 ns 104764.5 ns 0.80
array/reductions/mapreduce/Int64/dims=1L 831688.25 ns 860696 ns 0.97
array/reductions/mapreduce/Int64/dims=2 84576 ns 107757 ns 0.78
array/reductions/mapreduce/Int64/dims=2L 145124.25 ns 163496.75 ns 0.89
array/reductions/reduce/Float32/1d 98161.25 ns 145184.25 ns 0.68
array/reductions/reduce/Float32/dims=1 86813.75 ns 105042 ns 0.83
array/reductions/reduce/Float32/dims=1L 829623.5 ns 856898.25 ns 0.97
array/reductions/reduce/Float32/dims=2 84368.75 ns 106659.5 ns 0.79
array/reductions/reduce/Float32/dims=2L 144459.5 ns 161129.25 ns 0.90
array/reductions/reduce/Int64/1d 98753.75 ns 141302 ns 0.70
array/reductions/reduce/Int64/dims=1 84486 ns 105144.5 ns 0.80
array/reductions/reduce/Int64/dims=1L 834881 ns 851721 ns 0.98
array/reductions/reduce/Int64/dims=2 84691.25 ns 107839.5 ns 0.79
array/reductions/reduce/Int64/dims=2L 144876.75 ns 162989.25 ns 0.89
array/reverse/1d 45693 ns 53687.25 ns 0.85
array/reverse/1dL 70586 ns 78502.25 ns 0.90
array/reverse/1dL_inplace 80313.5 ns 62952.25 ns 1.28
array/reverse/1d_inplace 60795.75 ns 45130 ns 1.35
array/reverse/2d 50175.75 ns 55499.75 ns 0.90
array/reverse/2dL 82723.5 ns 111822 ns 0.74
array/reverse/2dL_inplace 75833.5 ns 74057 ns 1.02
array/reverse/2d_inplace 55493.25 ns 49312.25 ns 1.13
array/sorting/1d 336523.25 ns 359238.75 ns 0.94
integration/byval/reference 38900 ns 41860 ns 0.93
integration/byval/slices=1 39881 ns 42700 ns 0.93
integration/byval/slices=2 155333 ns 133939 ns 1.16
integration/byval/slices=3 238334 ns 239880 ns 0.99
integration/volumerhs 5013417 ns 4916200 ns 1.02
kernel/indexing 49345.5 ns 44594.75 ns 1.11
kernel/indexing_checked 59145.75 ns 47782.25 ns 1.24
kernel/launch 1422.5 ns 1785 ns 0.80
kernel/rand 98486.25 ns 110472 ns 0.89
latency/import 1706991022 ns 2242598207 ns 0.76
latency/precompile 40075227986 ns 52102215931 ns 0.77
latency/ttfp 2333714860 ns 3070234127 ns 0.76

This comment was automatically generated by workflow using github-action-benchmark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant