JLArrays 0.5: `erfcx`, `logerfc`, `logerfcx` fail (worked in 0.4)

Đang mở
#877 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

@timholy đang làm issue này rồi.

Từ ngày 3/12/2026.

  • #645 của @timholy — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/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

Hướng nghiên cứu

Start by reading the SPIRVIntrinsicsSpecialFunctionsExt special function overrides mentioned in the issue and the reproducer using erfcx on a JLArray. Check how erf, erfc, and gamma are handled, then investigate how to support erfcx and its logerfc and logerfcx callers without the unsupported ccall. Done when the reproducer works on JLArrays 0.5 and the related functions no longer fail.

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

Mô tả

using JLArrays, SpecialFunctions
erfcx.(JLArray([1.0, 2.0]))
# JLArrays 0.4.2: [0.427583576155807, 0.2553956763105058]
# JLArrays 0.5.0: InvalidIRError: unsupported use of a non-constant global (OpenSpecFun_jll.libopenspecfun)

logerfc and logerfcx fail the same way (they call erfcx internally); erfc works.

Versions: JLArrays 0.5.0, GPUArrays 12.3.0, KernelAbstractions 0.10.9, SPIRVIntrinsics 1.6.1, SpecialFunctions 2.9.2, Julia 1.13.4.

Claude explanation below.

JLArrays 0.5 compiles kernels through POCL, and SPIRVIntrinsicsSpecialFunctionsExt overrides erf, erfc, gamma and loggamma but not erfcx, whose host method is a ccall into libopenspecfun. CUDA.jl covers it with __nv_erfcx. OpenCL C has no erfcx, so an override would need a Julia implementation, e.g. exp(x^2) * erfc(x) for moderate x and a continued fraction for large x.

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.