Skip to content
This repository was archived by the owner on Oct 11, 2025. It is now read-only.

Commit c3d5b0d

Browse files
authored
[mlir][gpu] Add py binding for AsyncTokenType (#96466)
The PR adds py binding for `AsyncTokenType`
1 parent db9c9aa commit c3d5b0d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

DialectGPU.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,20 @@ using namespace mlir::python::adaptors;
2525

2626
PYBIND11_MODULE(_mlirDialectsGPU, m) {
2727
m.doc() = "MLIR GPU Dialect";
28+
//===-------------------------------------------------------------------===//
29+
// AsyncTokenType
30+
//===-------------------------------------------------------------------===//
31+
32+
auto mlirGPUAsyncTokenType =
33+
mlir_type_subclass(m, "AsyncTokenType", mlirTypeIsAGPUAsyncTokenType);
34+
35+
mlirGPUAsyncTokenType.def_classmethod(
36+
"get",
37+
[](py::object cls, MlirContext ctx) {
38+
return cls(mlirGPUAsyncTokenTypeGet(ctx));
39+
},
40+
"Gets an instance of AsyncTokenType in the same context", py::arg("cls"),
41+
py::arg("ctx") = py::none());
2842

2943
//===-------------------------------------------------------------------===//
3044
// ObjectAttr

0 commit comments

Comments
 (0)