EnzymeAD / Reactant.jl

MIT License
26 stars 2 forks source link

Fix precompilation in macOS #33

Open mofeing opened 1 week ago

mofeing commented 1 week ago

When running the example in the README, it crashes with the following error.

julia> f=Reactant.compile(sinsum_add, (input1,input2))
F0626 06:23:06.397895 67363613 simple_orc_jit.cc:311] Check failed: target_machine != nullptr 
*** Check failure stack trace: ***
    @        0x30f082cc0  absl::lts_20230802::log_internal::LogMessage::SendToLog()
    @        0x30f0826bc  absl::lts_20230802::log_internal::LogMessage::Flush()
    @        0x30f08309c  absl::lts_20230802::log_internal::LogMessageFatal::~LogMessageFatal()
    @        0x30f0830bc  absl::lts_20230802::log_internal::LogMessageFatal::~LogMessageFatal()
    @        0x30b62c0b0  xla::cpu::SimpleOrcJIT::InferTargetMachineForJIT()
    @        0x30b5976ec  xla::cpu::CpuCompiler::RunHloPasses()
    @        0x30b4328f0  xla::TfrtCpuClient::Compile()
    @        0x30b433678  xla::TfrtCpuClient::Compile()
    @        0x30af44610  ClientCompile
    @        0x1463a015c  0x0
    @        0x135b5ccd0  0x0
    @        0x135b840bc  0x0
    @        0x10309a484  do_call
    @        0x103098c80  eval_body
    @        0x1030992a0  jl_interpret_toplevel_thunk
    @        0x1030b17e4  jl_toplevel_eval_flex
    @        0x1030b15ac  jl_toplevel_eval_flex
    @        0x1030b15ac  jl_toplevel_eval_flex
    @        0x1030b15ac  jl_toplevel_eval_flex
    @        0x1030b2494  ijl_toplevel_eval_in
    @        0x1382f2268  japi1_eval_user_input_91784.4
    @        0x136bb6474  julia_YY.run_replYY.59_91871.3
    @        0x13606e5d4  julia_YY.1013_82830.3
    @        0x10308e1c8  jl_f__call_latest
    @        0x138301228  julia_run_main_repl_82800.4
    @        0x1030dd910  true_main
    @        0x1030dd804  jl_repl_entrypoint
    @        0x10266bf6c  main
    @        0x1951020e0  start

[92763] signal (6): Abort trap: 6
in expression starting at REPL[5]:1
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
Allocations: 8223320 (Pool: 8215026; Big: 8294); GC: 13
fish: Job 1, 'julia --project=.' terminated by signal SIGABRT (Abort)

The error seems to originate from XLA's and Julia's LLVM symbols getting mixed.