Skip to content

Commit 6639166

Browse files
authored
[NDTensors] Bump to TypeParameterAccessors.jl v0.3 (#1617)
1 parent c4c02ba commit 6639166

File tree

4 files changed

+11
-29
lines changed

4 files changed

+11
-29
lines changed

NDTensors/Project.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "NDTensors"
22
uuid = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
33
authors = ["Matthew Fishman <[email protected]>"]
4-
version = "0.4.0"
4+
version = "0.4.1"
55

66
[deps]
77
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
@@ -45,13 +45,13 @@ TBLIS = "48530278-0828-4a49-9772-0f3830dfa1e9"
4545
cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1"
4646

4747
[extensions]
48-
NDTensorsAMDGPUExt = ["AMDGPU", "GPUArraysCore"]
49-
NDTensorsCUDAExt = ["CUDA", "GPUArraysCore"]
48+
NDTensorsAMDGPUExt = ["AMDGPU", "GPUArraysCore", "TypeParameterAccessors"]
49+
NDTensorsCUDAExt = ["CUDA", "GPUArraysCore", "TypeParameterAccessors"]
5050
NDTensorsGPUArraysCoreExt = "GPUArraysCore"
5151
NDTensorsHDF5Ext = "HDF5"
5252
NDTensorsJLArraysExt = ["GPUArraysCore", "JLArrays"]
5353
NDTensorsMappedArraysExt = ["MappedArrays"]
54-
NDTensorsMetalExt = ["GPUArraysCore", "Metal"]
54+
NDTensorsMetalExt = ["GPUArraysCore", "Metal", "TypeParameterAccessors"]
5555
NDTensorsOctavianExt = "Octavian"
5656
NDTensorsTBLISExt = "TBLIS"
5757
NDTensorscuTENSORExt = "cuTENSOR"
@@ -90,7 +90,7 @@ StridedViews = "0.2.2, 0.3"
9090
TBLIS = "0.2"
9191
TimerOutputs = "0.5.5"
9292
TupleTools = "1.2.0"
93-
TypeParameterAccessors = "0.2"
93+
TypeParameterAccessors = "0.3"
9494
VectorInterface = "0.4.2, 0.5"
9595
cuTENSOR = "2"
9696
julia = "1.10"
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
# TypeParameterAccessors definitions
2-
using NDTensors.TypeParameterAccessors:
3-
TypeParameterAccessors, Position, default_type_parameters
1+
using AMDGPU: ROCArray
42
using NDTensors.GPUArraysCoreExtensions: storagemode
5-
using AMDGPU: AMDGPU, ROCArray
6-
7-
function TypeParameterAccessors.default_type_parameters(::Type{<:ROCArray})
8-
return (default_type_parameters(AbstractArray)..., AMDGPU.Mem.HIPBuffer)
9-
end
3+
using TypeParameterAccessors: TypeParameterAccessors, Position
104

115
TypeParameterAccessors.position(::Type{<:ROCArray}, ::typeof(storagemode)) = Position(3)
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
# TypeParameterAccessors definitions
2-
using CUDA: CUDA, CuArray
3-
using NDTensors.TypeParameterAccessors:
4-
TypeParameterAccessors, Position, default_type_parameters
1+
using CUDA: CuArray
52
using NDTensors.GPUArraysCoreExtensions: storagemode
3+
using TypeParameterAccessors: TypeParameterAccessors, Position
64

75
function TypeParameterAccessors.position(::Type{<:CuArray}, ::typeof(storagemode))
86
return Position(3)
97
end
10-
11-
function TypeParameterAccessors.default_type_parameters(::Type{<:CuArray})
12-
return (default_type_parameters(AbstractArray)..., CUDA.Mem.DeviceBuffer)
13-
end
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
using Metal: Metal, MtlArray
2-
# `TypeParameterAccessors.jl` definitions.
3-
4-
using NDTensors.TypeParameterAccessors: TypeParameterAccessors, Position
1+
using Metal: MtlArray
52
using NDTensors.GPUArraysCoreExtensions: storagemode
3+
using TypeParameterAccessors: TypeParameterAccessors, Position
64

75
function TypeParameterAccessors.position(::Type{<:MtlArray}, ::typeof(storagemode))
86
return Position(3)
97
end
10-
11-
function TypeParameterAccessors.default_type_parameters(::Type{<:MtlArray})
12-
return (Float32, 1, Metal.DefaultStorageMode)
13-
end

0 commit comments

Comments
 (0)