Skip to content

unsupported call to an unknown function (call to __nv_fabsf) #3147

@kshyatt

Description

@kshyatt

MWE:

using CUDA                                                                                                                                                                                                           
                                                                                                                                                                                                                     
A = CUDA.cuRAND.randn(64)                                                                                                                                                                                            
                                                                                                                                                                                                                     
B = abs.(A)

Full trace:

ERROR: LoadError: InvalidIRError: compiling MethodInstance for (::GPUArrays.var"#gpu_broadcast_kernel_linear#_copyto!##1")(::KernelAbstractions.CompilerMetadata{KernelAbstractions.NDIteration.DynamicSize, KernelAbstractions.NDIteration.DynamicCheck, Nothing, CartesianIndices{1, Tuple{Base.OneTo{Int64}}}, KernelAbstractions.NDIteration.NDRange{1, KernelAbstractions.NDIteration.DynamicSize, KernelAbstractions.NDIteration.DynamicSize, CartesianIndices{1, Tuple{Base.OneTo{Int64}}}, CartesianIndices{1, Tuple{Base.OneTo{Int64}}}}}, ::CuDeviceVector{Float32, 1}, ::Base.Broadcast.Broadcasted{CUDACore.CuArrayStyle{1, CUDACore.DeviceMemory}, Tuple{Base.OneTo{Int64}}, typeof(abs), Tuple{Base.Broadcast.Extruded{CuDeviceVector{Float32, 1}, Tuple{Bool}, Tuple{Int64}}}}) resulted in invalid LLVM IR                                                          
Reason: unsupported call to an unknown function (call to __nv_fabsf)                                                                                                                                                 
Stacktrace:                                                                                                                                                                                                          
 [1] abs                                                                                                                                                                                                             
   @ ~/.julia/dev/CUDA/CUDACore/src/device/intrinsics/math.jl:316                                                                                                                                                    
 [2] _broadcast_getindex_evalf                                                                                                                                                                                       
   @ ./broadcast.jl:699                                                                                                                                                                                              
 [3] _broadcast_getindex                                                                                                                                                                                             
   @ ./broadcast.jl:672                                                                                                                                                                                              
 [4] _getindex                                                                                                                                                                                                       
   @ ./broadcast.jl:620                                                                                                                                                                                              
 [5] getindex                                                                                                                                                                                                        
   @ ./broadcast.jl:616                                                                                                                                                                                              
 [6] macro expansion                                                                                                                                                                                                 
   @ ~/.julia/packages/KernelAbstractions/ecO4B/src/macros.jl:332                                                                                                                                                    
 [7] gpu_broadcast_kernel_linear                                                                                                                                                                                     
   @ ./none:0                          

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds informationFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions