-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not support partialsortperm
?
#485
Comments
i think in this case we might to use |
you are right, just use At first, I didn't understand what you meant by Lines 917 to 920 in ca98c17
julia> using Reactant
julia> x = ConcreteRArray([123,456,789,121])
4-element ConcreteRArray{Int64, 1}:
123
456
789
121
julia> f_top2_from4 = @compile Reactant.Ops.top_k(x, 2)
2025-01-12 21:27:53.904248: I external/xla/xla/service/llvm_ir/llvm_command_line_options.cc:50] XLA (re)initializing LLVM with options fingerprint: 5867536532833239782
Reactant.Compiler.Thunk{typeof(Reactant.Ops.top_k), Symbol("##top_k_reactant#264"), Tuple{ConcreteRArray{Int64, 1}, Int64}, false}(Reactant.Ops.top_k)
julia> f_top2_from4(x, 2)
(values = ConcreteRArray{Int64, 1}([789, 456]), indices = ConcreteRArray{Int32, 1}(Int32[2, 1]))
julia> |
Reactant is still in a very experimental phase. We are thinking on doing a publication first and then, when it starts to stabilize, to write the documentation. The main reason why we don't have a proper documentation yet is that we are still breaking a lot of stuff and refactoring. CHLO, StableHLO, MHLO... are like the MLIR dialects used by XLA (they didn't start as MLIR dialects, but moving into there); i.e. the primitives in the IR that XLA accepts as input. CHLO is actually a high-level dialect that lowers to StableHLO. It has no stability guarantees but they should offer that functionality always. The MLIR.jl API requires setting up a lot of code to generate the IR. The methods in the In principle, you shouldn't call |
Thank you for your detailed explanation! |
Does it feel a bit non-standard? The indices returned by this start from 0, and I initially thought they started from 1.
|
mmm Julia is 1-indexed, but MLIR is 0-indexed. it could be a bug in the |
Code
Outputs
The text was updated successfully, but these errors were encountered: