`sin(Float16)` returns `NaN`
Open
Nobody has claimed this yet.
bug
float16
upstream
- Dominant language
- Julia
- Stars
- 344
- Forks
- 79
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 27
Description
On #163 as seen on a Vega 10 XL/XT [Radeon RX Vega 56/64] (gfx900)
function f(a)
@inbounds a[1] = AMDGPU.sin(a[1])
nothing
end
A = ROCArray([Float16(1.0)])
@roc f(A)
ModuleID = 'text'
source_filename = "text"
target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-ni:7-ni:10:11:12:13"
target triple = "amdgcn-amd-amdhsa"
; @ REPL[7]:1 within `f'
define amdgpu_kernel void @_Z12julia_f_438514ROCDeviceArrayI7Float16Li1ELi1EE({ [1 x i64], i8 addrspace(1)* } %0) local_unnamed_addr !dbg !50 {
entry:
%.fca.1.extract = extractvalue { [1 x i64], i8 addrspace(1)* } %0, 1
; @ REPL[7]:2 within `f'
; ┌ @ /home/vchuravy/src/AMDGPU/src/device/array.jl:70 within `getindex'
; │┌ @ /home/vchuravy/.julia/packages/LLVM/wnejv/src/interop/pointer.jl:81 within `unsafe_load'
; ││┌ @ /home/vchuravy/.julia/packages/LLVM/wnejv/src/interop/pointer.jl:9 within `pointerref'
; │││┌ @ /home/vchuravy/.julia/packages/LLVM/wnejv/src/interop/pointer.jl:9 within `macro expansion' @ /home/vchuravy/.julia/packages/LLVM/wnejv/src/interop/base.jl:45
%1 = bitcast i8 addrspace(1)* %.fca.1.extract to half addrspace(1)*, !dbg !52
%2 = load half, half addrspace(1)* %1, align 2, !dbg !52, !tbaa !66
; └└└└
; ┌ @ /home/vchuravy/src/AMDGPU/src/device/gcn/math.jl:63 within `sin'
; │┌ @ /home/vchuravy/src/AMDGPU/src/device/gcn/helpers.jl:5 within `_intr'
; ││┌ @ /home/vchuravy/src/AMDGPU/src/device/gcn/helpers.jl:5 within `macro expansion' @ /home/vchuravy/.julia/packages/LLVM/wnejv/src/interop/base.jl:45
%3 = call fastcc half @__ocml_sin_f16(half %2), !dbg !69
; └└└
; ┌ @ /home/vchuravy/src/AMDGPU/src/device/array.jl:76 within `setindex!'
; │┌ @ /home/vchuravy/.julia/packages/LLVM/wnejv/src/interop/pointer.jl:84 within `unsafe_store!'
; ││┌ @ /home/vchuravy/.julia/packages/LLVM/wnejv/src/interop/pointer.jl:44 within `pointerset'
; │││┌ @ /home/vchuravy/.julia/packages/LLVM/wnejv/src/interop/pointer.jl:44 within `macro expansion' @ /home/vchuravy/.julia/packages/LLVM/wnejv/src/interop/base.jl:45
store half %3, half addrspace(1)* %1, align 2, !dbg !78, !tbaa !66
ret void
; └└└└
}
; Function Attrs: convergent norecurse nounwind readnone
define internal fastcc half @__ocml_sin_f16(half %0) unnamed_addr #0 {
%2 = tail call half @llvm.fabs.f16(half %0)
%3 = tail call fastcc i32 @__ocmlpriv_trigred_f16(half %2) #4
%4 = trunc i32 %3 to i16
%5 = bitcast i16 %4 to half
%6 = tail call fastcc i32 @__ocmlpriv_sincosred_f16(half %5) #5
%7 = lshr i32 %6, 16
%8 = and i32 %3, 65536
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i32 %6, i32 %7
%11 = icmp sgt i32 %3, 131071
%12 = select i1 %11, i32 32768, i32 0
%13 = bitcast half %0 to i16
%14 = and i16 %13, -32768
%15 = zext i16 %14 to i32
%16 = xor i32 %12, %15
%17 = xor i32 %16, %10
%18 = trunc i32 %17 to i16
%19 = tail call i1 @llvm.amdgcn.class.f16(half %2, i32 504)
%20 = bitcast i16 %18 to half
%21 = select i1 %19, half 0xH7E00, half %20
ret half %21
}
; Function Attrs: nounwind readnone speculatable willreturn
declare half @llvm.fabs.f16(half) #1
; Function Attrs: convergent norecurse nounwind readnone
define internal fastcc i32 @__ocmlpriv_trigred_f16(half %0) unnamed_addr #2 {
%2 = fpext half %0 to float
%3 = fmul float %2, 0x3FE45F3060000000
%4 = tail call float @llvm.rint.f32(float %3)
%5 = tail call fastcc float @__ocml_fmuladd_f32(float %4, float 0xBFF9200000000000, float %2) #5
%6 = tail call fastcc float @__ocml_fmuladd_f32(float %4, float 0xBF3FA00000000000, float %5) #5
%7 = tail call fastcc float @__ocml_fmuladd_f32(float %4, float 0xBEB54442E0000000, float %6) #5
%8 = fptrunc float %7 to half
%9 = fptosi float %4 to i32
%10 = bitcast half %8 to i16
%11 = shl i32 %9, 16
%12 = and i32 %11, 196608
%13 = zext i16 %10 to i32
%14 = or i32 %12, %13
ret i32 %14
}
; Function Attrs: norecurse nounwind readnone
define internal fastcc i32 @__ocmlpriv_sincosred_f16(half %0) unnamed_addr #3 {
%2 = fmul half %0, %0
%3 = tail call half @llvm.fma.f16(half %2, half 0xH202C, half 0xHB155)
%4 = fmul half %2, %3
%5 = tail call half @llvm.fma.f16(half %0, half %4, half %0)
%6 = tail call half @llvm.fma.f16(half %2, half 0xH292D, half 0xHB7FF)
%7 = tail call half @llvm.fma.f16(half %2, half %6, half 0xH3C00)
%8 = bitcast half %5 to i16
%9 = bitcast half %7 to i16
%10 = zext i16 %9 to i32
%11 = shl nuw i32 %10, 16
%12 = zext i16 %8 to i32
%13 = or i32 %11, %12
ret i32 %13
}
; Function Attrs: nounwind readnone speculatable willreturn
declare i1 @llvm.amdgcn.class.f16(half, i32) #1
; Function Attrs: nounwind readnone speculatable willreturn
declare half @llvm.fma.f16(half, half, half) #1
; Function Attrs: nounwind readnone speculatable willreturn
declare float @llvm.rint.f32(float) #1
; Function Attrs: norecurse nounwind readnone
define internal fastcc float @__ocml_fmuladd_f32(float %0, float %1, float %2) unnamed_addr #3 {
%4 = tail call float @llvm.fmuladd.f32(float %0, float %1, float %2)
ret float %4
}
; Function Attrs: nounwind readnone speculatable willreturn
declare float @llvm.fmuladd.f32(float, float, float) #1
attributes #0 = { convergent norecurse nounwind readnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+16-bit-insts" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind readnone speculatable willreturn }
attributes #2 = { convergent norecurse nounwind readnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #3 = { norecurse nounwind readnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #4 = { convergent nounwind readnone }
attributes #5 = { nounwind readnone }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.dbg.cu = !{!4, !7, !9, !11, !12, !13, !15, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27, !28, !29, !30, !31, !32, !33, !34, !35, !36, !37, !38, !39, !40, !41, !42, !43, !44, !45, !46, !47}
!opencl.ocl.version = !{!48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48, !48}
!llvm.ident = !{!49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49, !49}
!0 = !{i32 2, !"Dwarf Version", i32 4}
!1 = !{i32 2, !"Debug Info Version", i32 3}
!2 = !{i32 1, !"wchar_size", i32 4}
!3 = !{i32 7, !"PIC Level", i32 1}
!4 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !5, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!5 = !DIFile(filename: "abstractarray.jl", directory: ".")
!6 = !{}
!7 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !8, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!8 = !DIFile(filename: "REPL[7]", directory: ".")
!9 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!10 = !DIFile(filename: "/home/vchuravy/.julia/packages/GPUCompiler/fG3xK/src/runtime.jl", directory: ".")
!11 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!12 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!13 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !14, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!14 = !DIFile(filename: "/home/vchuravy/src/AMDGPU/src/device/runtime.jl", directory: ".")
!15 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !16, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!16 = !DIFile(filename: "/home/vchuravy/src/AMDGPU/src/device/gcn/memory_dynamic.jl", directory: ".")
!17 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!18 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!19 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !14, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!20 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !14, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!21 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !16, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!22 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !16, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!23 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!24 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!25 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !14, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!26 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!27 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !14, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!28 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!29 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!30 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!31 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!32 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!33 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!34 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!35 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!36 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!37 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!38 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!39 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!40 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!41 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!42 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !10, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!43 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !16, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!44 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !14, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!45 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !14, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!46 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !16, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!47 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !16, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !6, nameTableKind: None)
!48 = !{i32 2, i32 0}
!49 = !{!"clang version 11.0.1 (/home/ec2-user/.julia/dev/BinaryBuilderBase/deps/downloads/llvm-project.git 43ff75f2c3feef64f9d73328230d34dac8832a91)"}
!50 = distinct !DISubprogram(name: "f", linkageName: "julia_f_4385", scope: null, file: !8, line: 1, type: !51, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !7, retainedNodes: !6)
!51 = !DISubroutineType(types: !6)
!52 = !DILocation(line: 45, scope: !53, inlinedAt: !55)
!53 = distinct !DISubprogram(name: "macro expansion;", linkageName: "macro expansion", scope: !54, file: !54, type: !51, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !7, retainedNodes: !6)
!54 = !DIFile(filename: "/home/vchuravy/.julia/packages/LLVM/wnejv/src/interop/base.jl", directory: ".")
!55 = !DILocation(line: 9, scope: !56, inlinedAt: !58)
!56 = distinct !DISubprogram(name: "macro expansion;", linkageName: "macro expansion", scope: !57, file: !57, type: !51, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !7, retainedNodes: !6)
!57 = !DIFile(filename: "/home/vchuravy/.julia/packages/LLVM/wnejv/src/interop/pointer.jl", directory: ".")
!58 = !DILocation(line: 9, scope: !59, inlinedAt: !60)
!59 = distinct !DISubprogram(name: "pointerref;", linkageName: "pointerref", scope: !57, file: !57, type: !51, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !7, retainedNodes: !6)
!60 = !DILocation(line: 81, scope: !61, inlinedAt: !62)
!61 = distinct !DISubprogram(name: "unsafe_load;", linkageName: "unsafe_load", scope: !57, file: !57, type: !51, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !7, retainedNodes: !6)
!62 = !DILocation(line: 70, scope: !63, inlinedAt: !65)
!63 = distinct !DISubprogram(name: "getindex;", linkageName: "getindex", scope: !64, file: !64, type: !51, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !7, retainedNodes: !6)
!64 = !DIFile(filename: "/home/vchuravy/src/AMDGPU/src/device/array.jl", directory: ".")
!65 = !DILocation(line: 2, scope: !50)
!66 = !{!67, !67, i64 0, i64 0}
!67 = !{!"custom_tbaa_addrspace(1)", !68, i64 0}
!68 = !{!"custom_tbaa"}
!69 = !DILocation(line: 45, scope: !53, inlinedAt: !70)
!70 = !DILocation(line: 5, scope: !71, inlinedAt: !73)
!71 = distinct !DISubprogram(name: "macro expansion;", linkageName: "macro expansion", scope: !72, file: !72, type: !51, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !7, retainedNodes: !6)
!72 = !DIFile(filename: "/home/vchuravy/src/AMDGPU/src/device/gcn/helpers.jl", directory: ".")
!73 = !DILocation(line: 5, scope: !74, inlinedAt: !75)
!74 = distinct !DISubprogram(name: "_intr;", linkageName: "_intr", scope: !72, file: !72, type: !51, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !7, retainedNodes: !6)
!75 = !DILocation(line: 63, scope: !76, inlinedAt: !65)
!76 = distinct !DISubprogram(name: "sin;", linkageName: "sin", scope: !77, file: !77, type: !51, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !7, retainedNodes: !6)
!77 = !DIFile(filename: "/home/vchuravy/src/AMDGPU/src/device/gcn/math.jl", directory: ".")
!78 = !DILocation(line: 45, scope: !53, inlinedAt: !79)
!79 = !DILocation(line: 44, scope: !56, inlinedAt: !80)
!80 = !DILocation(line: 44, scope: !81, inlinedAt: !82)
!81 = distinct !DISubprogram(name: "pointerset;", linkageName: "pointerset", scope: !57, file: !57, type: !51, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !7, retainedNodes: !6)
!82 = !DILocation(line: 84, scope: !83, inlinedAt: !84)
!83 = distinct !DISubprogram(name: "unsafe_store!;", linkageName: "unsafe_store!", scope: !57, file: !57, type: !51, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !7, retainedNodes: !6)
!84 = !DILocation(line: 76, scope: !85, inlinedAt: !65)
!85 = distinct !DISubprogram(name: "setindex!;", linkageName: "setindex!", scope: !64, file: !64, type: !51, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !7, retainedNodes: !6)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/device/gcn/math.jl and src/device/gcn/helpers.jl, then reproduce the provided Float16 sin call on the reported gfx900 device and inspect the generated LLVM around __ocml_sin_f16. Done means sin(Float16(1.0)) no longer produces NaN in the shown GPU kernel.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100