Skip to content

Commit 079f169

Browse files
author
Katharine Hyatt
committed
Fixes
1 parent be64674 commit 079f169

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/tensor/operations.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ function plan_elementwise_binary(
186186
plan_pref = Ref{hiptensorPlanPreference_t}()
187187
hiptensorCreatePlanPreference(handle(), plan_pref, algo, jit)
188188

189-
plan = hipTensorPlan(desc[], plan_pref[]; workspacePref=workspace, compute_type = actual_compute_type)
189+
plan = hipTensorPlan(desc[], plan_pref[]; workspacePref=workspace)
190190
hiptensorDestroyOperationDescriptor(desc[])
191191
hiptensorDestroyPlanPreference(plan_pref[])
192192
return plan
@@ -207,7 +207,6 @@ function permute!(
207207
else
208208
plan
209209
end
210-
@show plan
211210
permute!(actual_plan, alpha, A, B)
212211

213212
if plan === nothing
@@ -255,7 +254,7 @@ function plan_permutation(
255254
plan_pref = Ref{hiptensorPlanPreference_t}()
256255
hiptensorCreatePlanPreference(handle(), plan_pref, algo, jit)
257256

258-
plan = hipTensorPlan(desc[], plan_pref[]; workspacePref=workspace, compute_type = actual_compute_type)
257+
plan = hipTensorPlan(desc[], plan_pref[]; workspacePref=workspace)
259258
hiptensorDestroyOperationDescriptor(desc[])
260259
hiptensorDestroyPlanPreference(plan_pref[])
261260
return plan
@@ -345,7 +344,7 @@ function plan_contraction(
345344
plan_pref = Ref{hiptensorPlanPreference_t}()
346345
hiptensorCreatePlanPreference(handle(), plan_pref, algo, jit)
347346

348-
plan = hipTensorPlan(desc[], plan_pref[]; workspacePref=workspace, compute_type = actual_compute_type)
347+
plan = hipTensorPlan(desc[], plan_pref[]; workspacePref=workspace)
349348
hiptensorDestroyOperationDescriptor(desc[])
350349
hiptensorDestroyPlanPreference(plan_pref[])
351350
return plan

src/tensor/types.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const elementwise_trinary_compute_types = Dict(
3838
const elementwise_binary_compute_types = Dict(
3939
# typeA, typeC => typeCompute
4040
(Float16, Float16) => Float16,
41+
(Float16, Float32) => Float32,
4142
(Float32, Float32) => Float32,
4243
(Float64, Float64) => Float64,
4344
(ComplexF32, ComplexF32) => Float32,

test/hiptensor/contractions.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ eltypes = [(Float32, Float32, Float32, Float32),
9191
end
9292

9393
@testset "simple case with plan storage and JIT compilation" begin
94-
plan = hipTENSOR.plan_contraction(dA, indsA, opA, dB, indsB, opB, dC, indsC, opC, opOut; jit=hipTENSOR.JIT_MODE_DEFAULT)
95-
dC = hipTENSOR.contract!(plan, 1, dA, dB, 0, dC)
94+
plan = AMDGPU.hipTENSOR.plan_contraction(dA, indsA, opA, dB, indsB, opB, dC, indsC, opC, opOut; jit=hipTENSOR.JIT_MODE_DEFAULT)
95+
dC = contract!(plan, 1, dA, dB, 0, dC)
9696
C = collect(dC)
9797
mC = reshape(permutedims(C, ipC), (loA, loB))
9898
@test mC mA * mB

0 commit comments

Comments
 (0)