Skip to content

feat: xla/mhlo export passes #1463

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

Draft
wants to merge 4 commits into
base: ap/jll_changes
Choose a base branch
from
Draft

feat: xla/mhlo export passes #1463

wants to merge 4 commits into from

Conversation

avik-pal
Copy link
Collaborator

@avik-pal avik-pal commented Jul 18, 2025

@avik-pal
Copy link
Collaborator Author

julia> @code_xla before_xla_optimizations=true fn_test(x_ra)
HloModule reactant_fn_test, entry_computation_layout={(f32[128]{0})->c64[16]{0}}

ENTRY %main.11 (Arg_0.1: f32[128]) -> c64[16] {
  %Arg_0.1 = f32[128]{0} parameter(0), metadata={op_name="arg1 (path=(:args, 1))"}
  %topk.4 = (f32[16]{0}, s32[16]{0}) topk(%Arg_0.1), k=16, largest=true, metadata={op_name="top_k" source_file="/mnt2/avik-pal/reactant/Reactant.jl/src/Ops.jl" source_line=1225}
  %get-tuple-element.6 = s32[16]{0} get-tuple-element(%topk.4), index=1, metadata={op_name="top_k" source_file="/mnt2/avik-pal/reactant/Reactant.jl/src/Ops.jl" source_line=1225}
  %get-tuple-element.5 = f32[16]{0} get-tuple-element(%topk.4), index=0, metadata={op_name="top_k" source_file="/mnt2/avik-pal/reactant/Reactant.jl/src/Ops.jl" source_line=1225}
  %negate.7 = f32[16]{0} negate(%get-tuple-element.5), metadata={op_name="negate" source_file="/mnt2/avik-pal/reactant/Reactant.jl/src/Ops.jl" source_line=293}
  %constant.2 = f32[] constant(1)
  %broadcast.3 = f32[16]{0} broadcast(%constant.2), dimensions={}
  %add.8 = f32[16]{0} add(%negate.7, %broadcast.3), metadata={op_name="add" source_file="/mnt2/avik-pal/reactant/Reactant.jl/src/Ops.jl" source_line=376}
  %negate.9 = f32[16]{0} negate(%add.8), metadata={op_name="conj" source_file="/mnt2/avik-pal/reactant/Reactant.jl/src/Ops.jl" source_line=315}
  ROOT %complex.10 = c64[16]{0} complex(%get-tuple-element.5, %negate.9), metadata={op_name="conj" source_file="/mnt2/avik-pal/reactant/Reactant.jl/src/Ops.jl" source_line=315}
}

@avik-pal avik-pal changed the base branch from main to ap/jll_changes July 18, 2025 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant