Skip to content

Commit bf0fb61

Browse files
Regenerate MLIR Bindings (#686)
Co-authored-by: enzyme-ci-bot[bot] <78882869+enzyme-ci-bot[bot]@users.noreply.github.com>
1 parent 9339756 commit bf0fb61

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

src/mlir/Dialects/EnzymeXLA.jl

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,61 @@ import ...IR:
1313
import ..Dialects: namedattribute, operandsegmentsizes
1414
import ...API
1515

16+
function get_stream(; result::IR.Type, location=Location())
17+
op_ty_results = IR.Type[result,]
18+
operands = Value[]
19+
owned_regions = Region[]
20+
successors = Block[]
21+
attributes = NamedAttribute[]
22+
23+
return create_operation(
24+
"enzymexla.get_stream",
25+
location;
26+
operands,
27+
owned_regions,
28+
successors,
29+
attributes,
30+
results=op_ty_results,
31+
result_inference=false,
32+
)
33+
end
34+
35+
function jit_call(
36+
inputs::Vector{Value};
37+
result_0::Vector{IR.Type},
38+
fn,
39+
backend_config=nothing,
40+
operand_layouts=nothing,
41+
result_layouts=nothing,
42+
output_operand_aliases=nothing,
43+
location=Location(),
44+
)
45+
op_ty_results = IR.Type[result_0...,]
46+
operands = Value[inputs...,]
47+
owned_regions = Region[]
48+
successors = Block[]
49+
attributes = NamedAttribute[namedattribute("fn", fn),]
50+
!isnothing(backend_config) &&
51+
push!(attributes, namedattribute("backend_config", backend_config))
52+
!isnothing(operand_layouts) &&
53+
push!(attributes, namedattribute("operand_layouts", operand_layouts))
54+
!isnothing(result_layouts) &&
55+
push!(attributes, namedattribute("result_layouts", result_layouts))
56+
!isnothing(output_operand_aliases) &&
57+
push!(attributes, namedattribute("output_operand_aliases", output_operand_aliases))
58+
59+
return create_operation(
60+
"enzymexla.jit_call",
61+
location;
62+
operands,
63+
owned_regions,
64+
successors,
65+
attributes,
66+
results=op_ty_results,
67+
result_inference=false,
68+
)
69+
end
70+
1671
function kernel_call(
1772
gridx::Value,
1873
gridy::Value,

0 commit comments

Comments
 (0)