Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.

Fixes for 0.7 #69

Merged
merged 4 commits into from
Jun 10, 2017
Merged

Fixes for 0.7 #69

merged 4 commits into from
Jun 10, 2017

Conversation

maleadt
Copy link
Member

@maleadt maleadt commented Jun 7, 2017

No description provided.

@maleadt
Copy link
Member Author

maleadt commented Jun 7, 2017

Still need to fix the jlapi1 issue. Probably some corrupted state:

julia> using CUDAnative

julia> exec_dummy() = return nothing
exec_dummy (generic function with 1 method)

julia> CUDAnative.@code_llvm exec_dummy()

; Function Attrs: nounwind
define void @julia_exec_dummy_62667() local_unnamed_addr #0 !dbg !5 {
top:
  %ptls_i8 = tail call i8* asm "movq %fs:0, $0;\0Aaddq $$-10928, $0", "=r,~{dirflag},~{fpsr},~{flags}"() #1
; Filename: REPL[2]
; Source line: 1
  ret void, !dbg !7
}

julia> CUDAnative.@code_llvm exec_dummy()

; Function Attrs: nounwind
define void @julia_exec_dummy_62726() local_unnamed_addr #0 !dbg !5 {
top:
  %ptls_i8 = tail call i8* asm "movq %fs:0, $0;\0Aaddq $$-10928, $0", "=r,~{dirflag},~{fpsr},~{flags}"() #1
; Filename: REPL[2]
; Source line: 1
  ret void, !dbg !7
}

julia> CUDAnative.@code_llvm exec_dummy()
WARNING: source_filename = "exec_dummy"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

define i8** @japi1_exec_dummy_62726(i8**, i8***, i32) #0 !dbg !5 {
top:
  %3 = alloca i8***
  store volatile i8*** %1, i8**** %3
  %4 = call i8**** @jl_get_ptls_states()
  %5 = bitcast i8**** %4 to i8***
  %6 = getelementptr i8**, i8*** %5, i64 3
  %7 = bitcast i8*** %6 to i64**
  %8 = load i64*, i64** %7, !tbaa !7
; Filename: REPL[2]
; Source line: 1
  ret i8** inttoptr (i64 140339731484680 to i8**), !dbg !10
}

declare i8**** @jl_get_ptls_states()

attributes #0 = { "no-frame-pointer-elim"="true" }

!llvm.module.flags = !{!0, !1}
!llvm.dbg.cu = !{!2}

!0 = !{i32 2, !"Dwarf Version", i32 4}
!1 = !{i32 1, !"Debug Info Version", i32 3}
!2 = distinct !DICompileUnit(language: DW_LANG_C89, file: !3, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4)
!3 = !DIFile(filename: "REPL[2]", directory: ".")
!4 = !{}
!5 = distinct !DISubprogram(name: "exec_dummy", linkageName: "japi1_exec_dummy_62726", scope: null, file: !3, type: !6, isLocal: false, isDefinition: true, isOptimized: true, unit: !2, variables: !4)
!6 = !DISubroutineType(types: !4)
!7 = !{!8, !8, i64 0, i64 1}
!8 = !{!"jtbaa_const", !9, i64 0}
!9 = !{!"jtbaa"}
!10 = !DILocation(line: 1, scope: !5)
ERROR: could not find entry-point function (got japi1_exec_dummy_62726 and jl_get_ptls_states)
Stacktrace:
 [1] irgen(::Any, ::Any) at /home/tbesard/Projects/Julia-CUDA/CUDAnative/src/jit.jl:94
 [2] #code_llvm#58(::Bool, ::Bool, ::VersionNumber, ::Function, ::Base.TTY, ::Any, ::Any) at /home/tbesard/Projects/Julia-CUDA/CUDAnative/src/reflection.jl:34
 [3] code_llvm(::Base.TTY, ::Any, ::Any) at /home/tbesard/Projects/Julia-CUDA/CUDAnative/src/reflection.jl:34
 [4] #code_llvm#59 at /home/tbesard/Projects/Julia-CUDA/CUDAnative/src/reflection.jl:44 [inlined]
 [5] code_llvm(::Any, ::Any) at /home/tbesard/Projects/Julia-CUDA/CUDAnative/src/reflection.jl:44
 [6] code_llvm_cputyped(::Function, ::Type{T} where T<:Tuple) at /home/tbesard/Projects/Julia-CUDA/CUDAnative/src/reflection.jl:116

@maleadt
Copy link
Member Author

maleadt commented Jun 8, 2017

ref JuliaLang/julia#22290

@maleadt maleadt closed this Jun 10, 2017
@maleadt maleadt reopened this Jun 10, 2017
@maleadt maleadt changed the title WIP: fixes for 0.7 Fixes for 0.7 Jun 10, 2017
@maleadt maleadt merged commit d2d7e28 into master Jun 10, 2017
@maleadt maleadt deleted the tb/fix_07 branch June 10, 2017 16:05
@maleadt
Copy link
Member Author

maleadt commented Jun 10, 2017

@Keno Should be working on master again now (after JuliaLang/julia#22313).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant