Skip to content

Commit ea64522

Browse files
committed
incorporate more comments
1 parent 700a237 commit ea64522

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

mlir/lib/Bindings/Python/MainModule.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#include "IRModule.h"
1313
#include "Pass.h"
1414

15-
#include <tuple>
16-
1715
namespace py = pybind11;
1816
using namespace mlir;
1917
using namespace py::literals;

mlir/test/python/dialects/python_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ def __str__(self):
428428
d = tensor.EmptyOp([1, 2, 3], IntegerType.get_signless(5)).result
429429
# CHECK: Value(%{{.*}} = tensor.empty() : tensor<1x2x3xi5>)
430430
print(d)
431-
# CHECK: <importlib._bootstrap.TestTensorValue object at
431+
# CHECK: TestTensorValue
432432
print(repr(d))
433433

434434

mlir/test/python/lib/PythonTestModule.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ PYBIND11_MODULE(_mlirPythonTest, m) {
9494
py::object capsule = mlirApiObjectToCapsule(valueObj);
9595
MlirValue v = mlirPythonCapsuleToValue(capsule.ptr());
9696
MlirType t = mlirValueGetType(v);
97+
// This is hyper-specific in order to exercise/test registering a
98+
// value caster from cpp (but only for a single test case; see
99+
// testTensorValue python_test.py).
97100
if (mlirShapedTypeHasStaticShape(t) &&
98101
mlirShapedTypeGetDimSize(t, 0) == 1 &&
99102
mlirShapedTypeGetDimSize(t, 1) == 2 &&

0 commit comments

Comments
 (0)