`issymmetric` throws a kernel exception for a symmetric `2×2` `JLSparseMatrixCSC`

Đang mở
#880 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
58/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
julia
Lĩnh vực
backend, databases

Hướng nghiên cứu

The issue points to src/host/sparse.jl and the issymmetric call, with broadcast materialization and a JLArrays kernel launch in the reported stack. Start by reading that method and reproducing the supplied Float32 CSC case on JLArrays; compare its result with CUDA. Done means issymmetric returns true for the symmetric matrix without a kernel exception.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Description

Calling issymmetric on a Float32 CSC matrix with equal off-diagonal entries throws a kernel exception on JLArrays. The CUDA sparse backend returns true for the same input.

Reproduction

Run in a Julia project with the package versions listed below and a CUDA-capable GPU.

using CUDA, JLArrays
using JLArrays: JLSparseMatrixCSC
using CUDA.cuSPARSE: CuSparseMatrixCSC
using SparseArrays: sparse
using LinearAlgebra: issymmetric

for (backend, array) in (("JLArrays", JLSparseMatrixCSC), ("CUDA", CuSparseMatrixCSC))
    try
        a = array(sparse(Float32[0 2; 2 0]))
        result = issymmetric(a)
        println(backend, ": ", result)
    catch err
        println(backend, ": ", first(eachsplit(sprint(showerror, err), '\n')))
    end
end

Observed output

ERROR: exception during kernel execution on work-item (1, 1, 1).
Run Julia on debug level 2 for a device stack trace.
JLArrays: KernelException: exception thrown during kernel execution on device cpu-skylake-avx512-11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz
CUDA: true

Expected behavior

The two off-diagonal entries both equal 2 and both diagonal entries are 0, so issymmetric(a) should return true.

Additional context

The sparse matrix is constructed successfully. The exception occurs during issymmetric(a). On GPUArrays 12.3.0, the host stack includes issymmetric and copy in src/host/sparse.jl, followed by broadcast materialization and a JLArrays kernel launch.

Environment

  • Julia 1.13.4 on Debian GNU/Linux 13 (x86_64, Docker)
  • GPUArrays.jl 12.3.0, JLArrays.jl 0.5.0, CUDA.jl 6.5.1
  • JLArrays CPU device: Intel Core i7-11700
  • CUDA device: NVIDIA GeForce RTX 4090, CUDA runtime 12.9.0, NVIDIA driver 595.99.02
Ngôn ngữ chính
Julia
Star
462
Fork
109
Merge trung bình
4 ngày 11 giờ
Pull request đã merge (30 ngày)
26

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của JuliaGPU/GPUArrays.jl

Tất cả issue của JuliaGPU/GPUArrays.jl

Issue tương tự

Thêm issue về Julia

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.