From ddecf0a0a20165c1bc4543c7927af052ad7f84bf Mon Sep 17 00:00:00 2001 From: AntonOresten Date: Wed, 12 Aug 2026 14:32:48 +0200 Subject: [PATCH 1/3] Add cuDNN extension --- Project.toml | 2 ++ ext/cuDNNExt.jl | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 ext/cuDNNExt.jl diff --git a/Project.toml b/Project.toml index 849b560..152820a 100644 --- a/Project.toml +++ b/Project.toml @@ -12,9 +12,11 @@ Republic = "27243419-9dde-4721-b67c-fd63626fea7f" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [weakdeps] +cuDNN = "02a925ec-e4fe-4b08-9a7e-0d78e3d38ccd" cuTile = "0dea8319-8c4a-4662-a73d-20234d115b9a" [extensions] +cuDNNExt = "cuDNN" cuTileExt = "cuTile" [compat] diff --git a/ext/cuDNNExt.jl b/ext/cuDNNExt.jl new file mode 100644 index 0000000..a54272d --- /dev/null +++ b/ext/cuDNNExt.jl @@ -0,0 +1,16 @@ +module cuDNNExt + +import BitPacking +import cuDNN + +function cuDNN.checked_array_pointer(t::cuDNN.Tensor, a::BitPacking.NarrowArray) + parent(a) isa cuDNN.DenseCuArray || throw(ArgumentError( + "binding for $(t.name) needs GPU-backed storage, got $(typeof(parent(a)))")) + cuDNN.graph_dtype(eltype(a)) == t.dtype || throw(ArgumentError( + "binding for $(t.name) has eltype $(eltype(a)), expected $(t.dtype)")) + length(a) == prod(t.dims) || throw(DimensionMismatch( + "binding for $(t.name) has $(length(a)) elements, expected $(prod(t.dims))")) + return pointer(parent(a)) +end + +end From 67a35892b9b53425f39956a7d955240a83c46b18 Mon Sep 17 00:00:00 2001 From: AntonOresten Date: Thu, 13 Aug 2026 21:25:43 +0200 Subject: [PATCH 2/3] Update cuTile version to v1; add temporary cuDNN compat of v6.2.1 --- Project.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 152820a..e5efc40 100644 --- a/Project.toml +++ b/Project.toml @@ -23,5 +23,6 @@ cuTileExt = "cuTile" Adapt = "4.6.1" Republic = "2.2.0" StaticArrays = "1.9.18" -cuTile = "0.3.2" +cuDNN = "6.2.1" +cuTile = "1.0.0" julia = "1.10" From e7cd78659893c33d8959b68e41bd61aa30268f36 Mon Sep 17 00:00:00 2001 From: AntonOresten Date: Thu, 13 Aug 2026 21:26:24 +0200 Subject: [PATCH 3/3] Allow cuTile v0.3.2 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index e5efc40..93ed50c 100644 --- a/Project.toml +++ b/Project.toml @@ -24,5 +24,5 @@ Adapt = "4.6.1" Republic = "2.2.0" StaticArrays = "1.9.18" cuDNN = "6.2.1" -cuTile = "1.0.0" +cuTile = "0.3.2, 1.0.0" julia = "1.10"