You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia>import Brutus
julia>emit_lowered(f, tt...) =
Brutus.emit(typeof(f), tt,
emit_llvm=false, #TODO: change to true when ready
dump_options=[Brutus.DumpLowered])
emit_lowered (generic function with 1 method)
julia>emit_lowered(+, Float64, Float64)
module {
llvm.func @"+"(%arg0:!llvm.double, %arg1:!llvm.double) ->!llvm.double {
%0= llvm.mlir.undef :!llvm.void
llvm.br ^bb1
^bb1:// pred:^bb0
%1= llvm.fadd %arg0, %arg1 :!llvm.double
llvm.return%1:!llvm.double
}
}
julia>functionAmulB!(C, A, B)
@inbounds@fastmathfor m ∈1:size(A,1), n ∈1:size(B,2)
Cₘₙ =zero(eltype(C))
for k ∈1:size(A,2)
Cₘₙ += A[m,k] * B[k,n]
end
C[m,n] = Cₘₙ
endend
AmulB! (generic function with 1 method)
julia>emit_lowered(AmulB!, Matrix{Float64}, Matrix{Float64}, Matrix{Float64})
julia:/home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/mlir/lib/IR/MLIRContext.cpp:430: static mlir::Identifier mlir::Identifier::get(llvm::StringRef, mlir::MLIRContext*): Assertion `str.find('\0') == StringRef::npos && "Cannot create an identifier with a nul character"' failed.signal (6): Abortedin expression starting at REPL[5]:1gsignal at /usr/lib64/haswell/libc.so.6 (unknown line)abort at /usr/lib64/haswell/libc.so.6 (unknown line)unknown function (ip: 0x7fa3a2083753)__assert_fail at /usr/lib64/haswell/libc.so.6 (unknown line)get at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/mlir/lib/IR/MLIRContext.cpp:430OperationName at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/mlir/lib/IR/Operation.cpp:43OperationState at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/mlir/lib/IR/OperationSupport.cpp:24rewrite at /home/chriselrod/Documents/languages/juliamlir/brutus/lib/Dialect/Julia/CallOp.cpp:46matchAndRewrite at /home/chriselrod/Documents/languages/juliamlir/brutus/build/../llvm-project/llvm/../mlir/include/mlir/IR/PatternMatch.h:204 [inlined]matchAndRewrite at /home/chriselrod/Documents/languages/juliamlir/brutus/build/../llvm-project/llvm/../mlir/include/mlir/IR/PatternMatch.h:190matchAndRewrite at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/mlir/lib/IR/PatternMatch.cpp:189simplify at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp:198 [inlined]applyPatternsGreedily at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp:241runOnOperation at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/mlir/lib/Transforms/Canonicalizer.cpp:34run at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/mlir/lib/Pass/Pass.cpp:80run at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/mlir/lib/Pass/Pass.cpp:233 [inlined]runPipeline at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/mlir/lib/Pass/Pass.cpp:309 [inlined]operator() at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/mlir/lib/Pass/Pass.cpp:466for_each<llvm::SmallVector<mlir::OpPassManager, 1>*, mlir::detail::OpToOpPassAdaptorParallel::runOnOperation()::<lambda(llvm::MutableArrayRef<mlir::OpPassManager>)> > at /usr/include/c++/9/bits/stl_algo.h:3876 [inlined]parallel_for_each<llvm::SmallVector<mlir::OpPassManager, 1>*, mlir::detail::OpToOpPassAdaptorParallel::runOnOperation()::<lambda(llvm::MutableArrayRef<mlir::OpPassManager>)> > at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/llvm/include/llvm/Support/Parallel.h:143 [inlined]for_each<llvm::SmallVector<mlir::OpPassManager, 1>*, mlir::detail::OpToOpPassAdaptorParallel::runOnOperation()::<lambda(llvm::MutableArrayRef<mlir::OpPassManager>)> > at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/llvm/include/llvm/Support/Parallel.h:210 [inlined]runOnOperation at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/mlir/lib/Pass/Pass.cpp:445run at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/mlir/lib/Pass/Pass.cpp:80run at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/mlir/lib/Pass/Pass.cpp:233 [inlined]run at /home/chriselrod/Documents/languages/juliamlir/brutus/llvm-project/mlir/lib/Pass/Pass.cpp:588brutus_codegen at /home/chriselrod/Documents/languages/juliamlir/brutus/lib/Codegen/Codegen.cpp:415#emit#1 at /home/chriselrod/Documents/languages/juliamlir/brutus/Brutus/src/Brutus.jl:30unknown function (ip: 0x7fa37a1dfe55)emit##kw at /home/chriselrod/Documents/languages/juliamlir/brutus/Brutus/src/Brutus.jl:21 [inlined]emit_lowered at ./REPL[2]:1jl_apply at /home/chriselrod/Documents/languages/juliamlir/julia/src/julia.h:1691 [inlined]do_call at /home/chriselrod/Documents/languages/juliamlir/julia/src/interpreter.c:369eval_value at /home/chriselrod/Documents/languages/juliamlir/julia/src/interpreter.c:458eval_stmt_value at /home/chriselrod/Documents/languages/juliamlir/julia/src/interpreter.c:409 [inlined]eval_body at /home/chriselrod/Documents/languages/juliamlir/julia/src/interpreter.c:809jl_interpret_toplevel_thunk at /home/chriselrod/Documents/languages/juliamlir/julia/src/interpreter.c:921jl_toplevel_eval_flex at /home/chriselrod/Documents/languages/juliamlir/julia/src/toplevel.c:823jl_toplevel_eval_flex at /home/chriselrod/Documents/languages/juliamlir/julia/src/toplevel.c:773jl_toplevel_eval_flex at /home/chriselrod/Documents/languages/juliamlir/julia/src/toplevel.c:773jl_toplevel_eval at /home/chriselrod/Documents/languages/juliamlir/julia/src/toplevel.c:832 [inlined]jl_toplevel_eval_in at /home/chriselrod/Documents/languages/juliamlir/julia/src/toplevel.c:863eval at ./boot.jl:331eval_user_input at /home/chriselrod/Documents/languages/juliamlir/julia/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:132repl_backend_loop at /home/chriselrod/Documents/languages/juliamlir/julia/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:193start_repl_backend at /home/chriselrod/Documents/languages/juliamlir/julia/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:178#run_repl#35 at /home/chriselrod/Documents/languages/juliamlir/julia/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:290run_repl at /home/chriselrod/Documents/languages/juliamlir/julia/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:286#803 at ./client.jl:384unknown function (ip: 0x7fa37a18316f)jl_apply at /home/chriselrod/Documents/languages/juliamlir/julia/src/julia.h:1691 [inlined]do_apply at /home/chriselrod/Documents/languages/juliamlir/julia/src/builtins.c:650jl_f__apply at /home/chriselrod/Documents/languages/juliamlir/julia/src/builtins.c:664 [inlined]jl_f__apply_latest at /home/chriselrod/Documents/languages/juliamlir/julia/src/builtins.c:700#invokelatest#1 at ./essentials.jl:710 [inlined]invokelatest at ./essentials.jl:709 [inlined]run_main_repl at ./client.jl:368exec_options at ./client.jl:306_start at ./client.jl:491jfptr__start_52697 at /home/chriselrod/Documents/languages/juliamlir/julia/usr/lib/julia/sys.so (unknown line)jl_apply at /home/chriselrod/Documents/languages/juliamlir/julia/ui/../src/julia.h:1691 [inlined]true_main at /home/chriselrod/Documents/languages/juliamlir/julia/ui/repl.c:96main at /home/chriselrod/Documents/languages/juliamlir/julia/ui/repl.c:217__libc_start_main at /usr/lib64/haswell/libc.so.6 (unknown line)_start at ../../../julia/julia (unknown line)Allocations: 23267833 (Pool: 23261179; Big: 6654); GC: 23fish: “../../../julia/julia --project=…” terminated by signal SIGABRT (Abort)
If I remove the @fastmath, I instead get error: module lowering failed:
The text was updated successfully, but these errors were encountered:
chriselrod
changed the title
Assertion `str.find('\0') == StringRef::npos && "Cannot create an identifer with a nul character"' failed.
FastMath results in Assertion `str.find('\0') == StringRef::npos && "Cannot create an identifer with a nul character"' failed.
Apr 20, 2020
Thanks for your issue! Brutus is still very much a work in progress right now--we're just not there yet on many things, including array support. But hopefully things like this will work soon!
If I remove the
@fastmath
, I instead geterror: module lowering failed
:The text was updated successfully, but these errors were encountered: