Page MenuHomePhabricator

zhanghb97 (ZHANG Hongbin)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 8 2020, 4:20 AM (41 w, 1 d)

Recent Activity

Yesterday

zhanghb97 added inline comments to D89856: [mlir] Expose affine expression to C API.
Wed, Oct 21, 8:46 AM · Restricted Project
zhanghb97 requested review of D89856: [mlir] Expose affine expression to C API.
Wed, Oct 21, 12:52 AM · Restricted Project

Sat, Oct 17

zhanghb97 added inline comments to D89363: [mlir][Python] Add python binding to create DenseElementsAttribute..
Sat, Oct 17, 6:40 PM · Restricted Project

Wed, Oct 14

zhanghb97 added inline comments to D89363: [mlir][Python] Add python binding to create DenseElementsAttribute..
Wed, Oct 14, 4:05 AM · Restricted Project

Sat, Oct 10

zhanghb97 added a comment to D89167: [mlir] Make Python bindings installable..

This should work:
cmake --build . --target install-MLIRBindingsPythonSources install-MLIRBindingsPythonExtension

Sat, Oct 10, 5:34 PM · Restricted Project

Fri, Oct 9

zhanghb97 added a comment to D89167: [mlir] Make Python bindings installable..

LGTM, I use the following commands in the build directory:

cmake --build . --target check-mlir
cmake --build . --target install

I have a question that if I only want to install MLIRBindingsPythonExtension and MLIRBindingsPythonSources in (without installing llvm, llvm-c, mlir, mlir-c, etc.), what should I do?

Fri, Oct 9, 11:09 PM · Restricted Project

Fri, Oct 2

zhanghb97 committed rG2fc0d4a8e838: [mlir] Add Float Attribute, Integer Attribute and Bool Attribute subclasses to… (authored by zhanghb97).
[mlir] Add Float Attribute, Integer Attribute and Bool Attribute subclasses to…
Fri, Oct 2, 9:34 AM
zhanghb97 closed D88531: [mlir] Add Float Attribute, Integer Attribute and Bool Attribute subclasses to python bindings..
Fri, Oct 2, 9:34 AM · Restricted Project
zhanghb97 updated the diff for D88531: [mlir] Add Float Attribute, Integer Attribute and Bool Attribute subclasses to python bindings..
  • Modify the comment for mlirFloatAttrDoubleGetChecked.
  • Drop the _typed suffix for FloatAttr and IntegerAttr get methods.
  • Change the parameter type of BoolAttr.get method to bool.
  • Add get_f32 and get_f64 methods to FloatAttr.
Fri, Oct 2, 1:47 AM · Restricted Project

Thu, Oct 1

zhanghb97 added inline comments to D88531: [mlir] Add Float Attribute, Integer Attribute and Bool Attribute subclasses to python bindings..
Thu, Oct 1, 1:51 AM · Restricted Project

Tue, Sep 29

zhanghb97 removed a reviewer for D88531: [mlir] Add Float Attribute, Integer Attribute and Bool Attribute subclasses to python bindings.: jdoerfert.
Tue, Sep 29, 11:26 PM · Restricted Project
zhanghb97 requested review of D88531: [mlir] Add Float Attribute, Integer Attribute and Bool Attribute subclasses to python bindings..
Tue, Sep 29, 11:23 PM · Restricted Project

Mon, Sep 28

zhanghb97 added inline comments to D88416: Add FunctionType to MLIR C and Python bindings..
Mon, Sep 28, 8:30 PM · Restricted Project

Sep 21 2020

zhanghb97 accepted D87958: Add Operation to python bindings..

LGTM, thanks!

Sep 21 2020, 2:03 AM · Restricted Project

Sep 20 2020

zhanghb97 added inline comments to D87958: Add Operation to python bindings..
Sep 20 2020, 7:54 PM · Restricted Project

Sep 18 2020

zhanghb97 added inline comments to D87617: [mlir] expose affine map to C API.
Sep 18 2020, 2:00 AM · Restricted Project

Sep 17 2020

zhanghb97 added inline comments to D87617: [mlir] expose affine map to C API.
Sep 17 2020, 5:59 PM · Restricted Project

Sep 16 2020

zhanghb97 added a comment to D87617: [mlir] expose affine map to C API.

Hi @ftynse - After pushing this patch, I received en email said that:

Sep 16 2020, 7:46 PM · Restricted Project
zhanghb97 committed rGb76f523be6ea: [mlir] expose affine map to C API (authored by zhanghb97).
[mlir] expose affine map to C API
Sep 16 2020, 6:51 PM
zhanghb97 closed D87617: [mlir] expose affine map to C API.
Sep 16 2020, 6:51 PM · Restricted Project
zhanghb97 updated the diff for D87617: [mlir] expose affine map to C API.
  • Use intptr_t * for the `resultPos parameter in mlirAffineMapGetSubMap function.
  • Use a vector to cast the element of resultPos from intptr_t to unsigned.
Sep 16 2020, 5:59 AM · Restricted Project
zhanghb97 added inline comments to D87617: [mlir] expose affine map to C API.
Sep 16 2020, 2:42 AM · Restricted Project

Sep 15 2020

zhanghb97 added inline comments to D87617: [mlir] expose affine map to C API.
Sep 15 2020, 8:13 PM · Restricted Project
zhanghb97 added inline comments to D87617: [mlir] expose affine map to C API.
Sep 15 2020, 8:07 PM · Restricted Project
zhanghb97 updated the diff for D87617: [mlir] expose affine map to C API.
  • unsigned -> intptr_t
  • Place all the affine map C API back to AffineMap.h/.cpp
  • Add Utils.h and move CallbackOstream to Utils.h to make sure it is available to mlirAffineMapPrint.
Sep 15 2020, 8:07 PM · Restricted Project
zhanghb97 added inline comments to D87617: [mlir] expose affine map to C API.
Sep 15 2020, 12:21 AM · Restricted Project
zhanghb97 updated the diff for D87617: [mlir] expose affine map to C API.
  • Modify name of mlirAffineMap***Get functions.
  • Use intptr_t for parameters related to sizes.
  • Add details for the comments of the mlirAffineMapPermutationMapGet.
Sep 15 2020, 12:20 AM · Restricted Project

Sep 14 2020

zhanghb97 requested review of D87617: [mlir] expose affine map to C API.
Sep 14 2020, 9:02 AM · Restricted Project

Sep 7 2020

zhanghb97 added inline comments to D87213: Preliminary python API for constructing operations..
Sep 7 2020, 8:55 AM · Restricted Project

Sep 6 2020

zhanghb97 accepted D87208: Extend PyConcreteType to support intermediate base classes..

Thanks for extending the PyConcreteType!

Sep 6 2020, 11:06 PM · Restricted Project
zhanghb97 added a comment to D87208: Extend PyConcreteType to support intermediate base classes..

There are redundant init implementations for PyRankedTensorType and PyUnrankedTensorType (see inline comments).

Sep 6 2020, 7:03 PM · Restricted Project
zhanghb97 added inline comments to D87091: [mlir] Add Shaped Type, Tensor Type and MemRef Type to python bindings..
Sep 6 2020, 8:41 AM · Restricted Project
zhanghb97 updated the diff for D87091: [mlir] Add Shaped Type, Tensor Type and MemRef Type to python bindings..
  • Add a helper method requireHasRank().
  • Change comments and self arguments.
  • Add TODO for location and swithing back to bindDerived.
Sep 6 2020, 8:41 AM · Restricted Project

Sep 4 2020

zhanghb97 added inline comments to D87091: [mlir] Add Shaped Type, Tensor Type and MemRef Type to python bindings..
Sep 4 2020, 7:59 AM · Restricted Project
zhanghb97 updated the diff for D87091: [mlir] Add Shaped Type, Tensor Type and MemRef Type to python bindings..
  • Add ***GetChecked C API.
  • Bind the "get_***" python methods with the corresponding ***GetChecked C API.
  • Add TODO to rework to error reporting.
  • Add PyShapedType class as the base class of the PyVectorType, PyRankedTensorType, PyUnrankedTensorType, PyMemRefType and PyUnrankedMemRefType.
Sep 4 2020, 7:56 AM · Restricted Project
zhanghb97 updated the summary of D87091: [mlir] Add Shaped Type, Tensor Type and MemRef Type to python bindings..
Sep 4 2020, 7:05 AM · Restricted Project

Sep 3 2020

zhanghb97 requested review of D87091: [mlir] Add Shaped Type, Tensor Type and MemRef Type to python bindings..
Sep 3 2020, 6:53 AM · Restricted Project

Sep 1 2020

zhanghb97 added a comment to D86785: [mlir] Add Complex Type, Vector Type and Tuple Type subclasses to python bindings.

Hi @mehdi_amini - If there is no problem with the code, could you please help me land them, I don't have commit access so far. Thanks!

Sep 1 2020, 2:14 AM · Restricted Project
zhanghb97 updated the diff for D86785: [mlir] Add Complex Type, Vector Type and Tuple Type subclasses to python bindings.

Rebase.

Sep 1 2020, 12:43 AM · Restricted Project

Aug 30 2020

zhanghb97 added a reviewer for D86785: [mlir] Add Complex Type, Vector Type and Tuple Type subclasses to python bindings: mehdi_amini.
Aug 30 2020, 9:52 PM · Restricted Project
zhanghb97 updated the diff for D86785: [mlir] Add Complex Type, Vector Type and Tuple Type subclasses to python bindings.
  • Remove else.
Aug 30 2020, 9:46 PM · Restricted Project
zhanghb97 added inline comments to D86785: [mlir] Add Complex Type, Vector Type and Tuple Type subclasses to python bindings.
Aug 30 2020, 9:37 PM · Restricted Project
zhanghb97 updated the diff for D86785: [mlir] Add Complex Type, Vector Type and Tuple Type subclasses to python bindings.
  • Add the invalid type and expected types in the error message.
  • get_vector method takes a vector of int64_t.
  • get_tuple method takes py::list and maps the py::list to SmallVector.
  • Fix some details (keep_alive and method name).
Aug 30 2020, 9:36 PM · Restricted Project

Aug 28 2020

zhanghb97 requested review of D86785: [mlir] Add Complex Type, Vector Type and Tuple Type subclasses to python bindings.
Aug 28 2020, 7:44 AM · Restricted Project

Aug 24 2020

zhanghb97 requested review of D86466: [mlir] Add Index Type, Floating Point Type and None Type subclasses to python bindings..
Aug 24 2020, 8:50 AM · Restricted Project

Aug 14 2020

zhanghb97 added inline comments to D85481: [mlir][WIP] Initial python bindings for C API.
Aug 14 2020, 8:23 PM · Restricted Project
zhanghb97 updated the diff for D85481: [mlir][WIP] Initial python bindings for C API.

Add move constructor of PyMlirModule.
Create a deep copy in the move constructor to avoid double free the object.
Make the parse function return a value.

Aug 14 2020, 8:11 PM · Restricted Project
zhanghb97 added inline comments to D85481: [mlir][WIP] Initial python bindings for C API.
Aug 14 2020, 6:07 AM · Restricted Project
zhanghb97 added inline comments to D85481: [mlir][WIP] Initial python bindings for C API.
Aug 14 2020, 5:15 AM · Restricted Project
zhanghb97 updated the diff for D85481: [mlir][WIP] Initial python bindings for C API.

Use std::unique_ptr as the return type of PyMlirContext::parse.
Modify the header guard.
@stellaraccident I think I need you to help me land it, it's my first patch and I don't have commit access now. Thanks very much!

Aug 14 2020, 5:13 AM · Restricted Project

Aug 13 2020

zhanghb97 updated the diff for D85481: [mlir][WIP] Initial python bindings for C API.

Add py::keep_alive to PyMlirContext::parse to extend the lifetime of context object.
Remove the binding of the PyMlirModule constructor.

Aug 13 2020, 3:30 AM · Restricted Project

Aug 12 2020

zhanghb97 updated the diff for D85481: [mlir][WIP] Initial python bindings for C API.

Binding MlirModule with wrapper class PyMlirModule.
Prototype of the RFC:
https://llvm.discourse.group/t/rfc-first-step-python-bindings-for-c-api/1578
Meet the requirements of the first step:
https://llvm.discourse.group/t/next-steps-on-python-bindings/1570

Aug 12 2020, 2:56 AM · Restricted Project

Aug 11 2020

zhanghb97 added inline comments to D85481: [mlir][WIP] Initial python bindings for C API.
Aug 11 2020, 4:35 AM · Restricted Project
zhanghb97 updated the diff for D85481: [mlir][WIP] Initial python bindings for C API.

Scoping down to meet the first requirement.
(https://llvm.discourse.group/t/next-steps-on-python-bindings/1570)

Aug 11 2020, 4:09 AM · Restricted Project

Aug 10 2020

zhanghb97 added inline comments to D85481: [mlir][WIP] Initial python bindings for C API.
Aug 10 2020, 2:24 AM · Restricted Project

Aug 9 2020

zhanghb97 updated the diff for D85481: [mlir][WIP] Initial python bindings for C API.

Reformat the code with clang-format.

Aug 9 2020, 8:24 PM · Restricted Project

Aug 8 2020

zhanghb97 added a comment to D85481: [mlir][WIP] Initial python bindings for C API.

I would really like to see some high-level proposal here. I don't think just transposing C API to Python is the right approach, but I might be convinced otherwise (e.g., we want to expose API one-to-one and then write extra wrapper code in Python instead of writing it in C++ inside the bindings, although I think the amount of C++ is relatively low and the amount of sanity it brings improves debugability significantly).

Aug 8 2020, 7:41 AM · Restricted Project

Aug 6 2020

zhanghb97 requested review of D85481: [mlir][WIP] Initial python bindings for C API.
Aug 6 2020, 3:42 PM · Restricted Project