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

Abierto
#877 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

@timholy ya está trabajando en esto.

Desde el 3/12/2026.

  • #645 de @timholy — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
julia
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Julia
Estrellas
462
Forks
109
Merge medio
4 d 11 h
PR fusionados (30 d)
26

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de JuliaGPU/GPUArrays.jl

Todos los issues de JuliaGPU/GPUArrays.jl

Issues similares

Más issues de Julia

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.