Open kmp5VT opened 3 weeks ago
As a followup the code does run successfully with an element type of ComplexF64
using CUDA, cuTENSOR, LinearAlgebra
elt = ComplexF64
A = CuArray(randn(elt, 5))
B = CuArray(randn(elt, 1))
C = CuArray(randn(elt, 5))
vA = @view A[2:5]
vB = @view B[1:1]
vC = @view C[2:5]
tA = CuTensor(reshape(vA, (4,1)), [1,2])
tB = CuTensor(reshape(vB, (1,1)), [2,3])
tC = CuTensor(reshape(vC, (4,1)), [1,3])
mul!(reshape(vC, (4,1)), reshape(vA, (4,1)), reshape(vB, (1,1)))
mul!(tC, tA, tB)
vC ≈ tC.data # true
Describe the bug
Occasionally, there is an issue when contracting sub-matrices from views of CuArrays using the cuTENSOR backend. The contractions work fine with cuBLAS but fail with
To reproduce
The Minimal Working Example (MWE) for this bug:
Manifest.toml
``` (jl_HrbN51) pkg> st Status `/tmp/jl_HrbN51/Project.toml` [052768ef] CUDA v5.4.2 ```
Version info
Details on Julia:
Details on CUDA: