Skip to content

Commit 2952cb0

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

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

src/mlir/Dialects/EnzymeXLA.jl

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,51 @@ function gpu_error(; result::IR.Type, region::Region, location=Location())
166166
)
167167
end
168168

169+
function gpu_kernel_address(; result::IR.Type, fn, location=Location())
170+
op_ty_results = IR.Type[result,]
171+
operands = Value[]
172+
owned_regions = Region[]
173+
successors = Block[]
174+
attributes = NamedAttribute[namedattribute("fn", fn),]
175+
176+
return create_operation(
177+
"enzymexla.gpu_kernel_address",
178+
location;
179+
operands,
180+
owned_regions,
181+
successors,
182+
attributes,
183+
results=op_ty_results,
184+
result_inference=false,
185+
)
186+
end
187+
188+
function gpu_occupancy(
189+
blockSize::Value,
190+
dynamicSMemSize::Value,
191+
flags::Value;
192+
result::IR.Type,
193+
fn,
194+
location=Location(),
195+
)
196+
op_ty_results = IR.Type[result,]
197+
operands = Value[blockSize, dynamicSMemSize, flags]
198+
owned_regions = Region[]
199+
successors = Block[]
200+
attributes = NamedAttribute[namedattribute("fn", fn),]
201+
202+
return create_operation(
203+
"enzymexla.gpu_occupancy",
204+
location;
205+
operands,
206+
owned_regions,
207+
successors,
208+
attributes,
209+
results=op_ty_results,
210+
result_inference=false,
211+
)
212+
end
213+
169214
function gpu_thread(
170215
threadIndexX::Value,
171216
threadIndexY::Value,

0 commit comments

Comments
 (0)