Skip to content

More tests and a matmatmul fix#2697

Merged
kshyatt merged 1 commit intomasterfrom
ksh/sparse_tests
Mar 17, 2025
Merged

More tests and a matmatmul fix#2697
kshyatt merged 1 commit intomasterfrom
ksh/sparse_tests

Conversation

@kshyatt
Copy link
Copy Markdown
Member

@kshyatt kshyatt commented Mar 16, 2025

Need the copyto! for the COO method to correctly do the in-place modification.

@kshyatt kshyatt added bugfix This gets something working again. cuda libraries Stuff about CUDA library wrappers. tests Adds or changes tests. labels Mar 16, 2025
@github-actions
Copy link
Copy Markdown
Contributor

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic master) to apply these changes.

Click here to view the suggested changes.
diff --git a/test/libraries/cusparse.jl b/test/libraries/cusparse.jl
index 4e4a46995..e5b2bb9f0 100644
--- a/test/libraries/cusparse.jl
+++ b/test/libraries/cusparse.jl
@@ -108,7 +108,7 @@ blockdim = 5
     @test CuSparseMatrixCOO(d_x) === d_x
     @test length(d_x) == m*n
     @test size(d_x)   == (m,n)
-    @test size(d_rx)  == (n,m)
+    @test size(d_rx) == (n, m)
     @test size(d_x,1) == m
     @test size(d_x,2) == n
     @test size(d_x,3) == 1
@@ -124,10 +124,10 @@ blockdim = 5
         @test d_x[end]             == x[end]
         @test d_tx[:, 1]           == transpose(x)[:, 1]
         @test d_ax[1, :]           == adjoint(x)[1, :]
-        @test d_tcx[:, 1]          == transpose(x)[:, 1]
-        @test d_acx[1, :]          == adjoint(x)[1, :]
-        @test d_rx[:, 1]           == transpose(x)[:, 1]
-        @test d_rx[1, :]           == transpose(x)[1, :]
+        @test d_tcx[:, 1] == transpose(x)[:, 1]
+        @test d_acx[1, :] == adjoint(x)[1, :]
+        @test d_rx[:, 1] == transpose(x)[:, 1]
+        @test d_rx[1, :] == transpose(x)[1, :]
         @test d_x[firstindex(d_x), firstindex(d_x)] == x[firstindex(x), firstindex(x)]
         @test d_x[div(end, 2), div(end, 2)]         == x[div(end, 2), div(end, 2)]
         @test d_x[end, end]        == x[end, end]

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.38%. Comparing base (4df814c) to head (d5b842f).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2697      +/-   ##
==========================================
+ Coverage   83.19%   83.38%   +0.18%     
==========================================
  Files         153      153              
  Lines       13605    13606       +1     
==========================================
+ Hits        11319    11345      +26     
+ Misses       2286     2261      -25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

CUDA.jl Benchmarks

Details
Benchmark suite Current: d5b842f Previous: 4df814c Ratio
latency/precompile 46553118469 ns 46259331296 ns 1.01
latency/ttfp 7047011971 ns 7101267034 ns 0.99
latency/import 3715679733 ns 3747845800 ns 0.99
integration/volumerhs 9614349 ns 9616966 ns 1.00
integration/byval/slices=1 146659 ns 147004 ns 1.00
integration/byval/slices=3 425056 ns 425132.5 ns 1.00
integration/byval/reference 144834 ns 144971 ns 1.00
integration/byval/slices=2 286054 ns 286030 ns 1.00
integration/cudadevrt 103139 ns 103437 ns 1.00
kernel/indexing 13984 ns 14052 ns 1.00
kernel/indexing_checked 14356 ns 14687 ns 0.98
kernel/occupancy 686.825806451613 ns 642.1705882352941 ns 1.07
kernel/launch 2042.3 ns 2082.1 ns 0.98
kernel/rand 17678 ns 15366 ns 1.15
array/reverse/1d 19559 ns 19836 ns 0.99
array/reverse/2d 23734 ns 23708 ns 1.00
array/reverse/1d_inplace 10128 ns 10304 ns 0.98
array/reverse/2d_inplace 11179 ns 11633 ns 0.96
array/copy 20907 ns 21384.5 ns 0.98
array/iteration/findall/int 158087 ns 157650 ns 1.00
array/iteration/findall/bool 138836 ns 138713 ns 1.00
array/iteration/findfirst/int 154356 ns 153306 ns 1.01
array/iteration/findfirst/bool 155281.5 ns 154985 ns 1.00
array/iteration/scalar 71239 ns 71844 ns 0.99
array/iteration/logical 212894 ns 213346 ns 1.00
array/iteration/findmin/1d 41807 ns 41486 ns 1.01
array/iteration/findmin/2d 93973.5 ns 94252 ns 1.00
array/reductions/reduce/1d 40096 ns 36083 ns 1.11
array/reductions/reduce/2d 43757.5 ns 41306 ns 1.06
array/reductions/mapreduce/1d 37973.5 ns 33401 ns 1.14
array/reductions/mapreduce/2d 51146 ns 41277 ns 1.24
array/broadcast 20672 ns 20684 ns 1.00
array/copyto!/gpu_to_gpu 11969 ns 13946 ns 0.86
array/copyto!/cpu_to_gpu 208444 ns 208068 ns 1.00
array/copyto!/gpu_to_cpu 242747 ns 243583 ns 1.00
array/accumulate/1d 108900 ns 108492 ns 1.00
array/accumulate/2d 80163 ns 80106 ns 1.00
array/construct 1318.15 ns 1292 ns 1.02
array/random/randn/Float32 49605 ns 44847 ns 1.11
array/random/randn!/Float32 26512 ns 26564 ns 1.00
array/random/rand!/Int64 26984 ns 27174 ns 0.99
array/random/rand!/Float32 8614 ns 8731.666666666666 ns 0.99
array/random/rand/Int64 35749 ns 35317 ns 1.01
array/random/rand/Float32 13023 ns 13279 ns 0.98
array/permutedims/4d 61009 ns 61551 ns 0.99
array/permutedims/2d 55341 ns 55398 ns 1.00
array/permutedims/3d 56143.5 ns 56402 ns 1.00
array/sorting/1d 2777530 ns 2777475.5 ns 1.00
array/sorting/by 3368261 ns 3367837 ns 1.00
array/sorting/2d 1086222 ns 1085345 ns 1.00
cuda/synchronization/stream/auto 1030.1 ns 1021.2 ns 1.01
cuda/synchronization/stream/nonblocking 6492.6 ns 6526.2 ns 0.99
cuda/synchronization/stream/blocking 856.2933333333333 ns 830.5833333333334 ns 1.03
cuda/synchronization/context/auto 1203.8 ns 1191.2 ns 1.01
cuda/synchronization/context/nonblocking 6719.2 ns 6765.8 ns 0.99
cuda/synchronization/context/blocking 947.8709677419355 ns 958.9655172413793 ns 0.99

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

@kshyatt kshyatt merged commit e656414 into master Mar 17, 2025
3 checks passed
@kshyatt kshyatt deleted the ksh/sparse_tests branch March 17, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This gets something working again. cuda libraries Stuff about CUDA library wrappers. tests Adds or changes tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants