Page MenuHomePhabricator

zhanghb97 (ZHANG Hongbin)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 8 2020, 4:20 AM (37 w, 6 d)

Recent Activity

Yesterday

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

Mon, Sep 21

zhanghb97 accepted D87958: Add Operation to python bindings..

LGTM, thanks!

Mon, Sep 21, 2:03 AM · Restricted Project

Sun, Sep 20

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

Fri, Sep 18

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

Thu, Sep 17

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

Wed, Sep 16

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:

Wed, Sep 16, 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
Wed, Sep 16, 6:51 PM
zhanghb97 closed D87617: [mlir] expose affine map to C API.
Wed, Sep 16, 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.
Wed, Sep 16, 5:59 AM · Restricted Project
zhanghb97 added inline comments to D87617: [mlir] expose affine map to C API.
Wed, Sep 16, 2:42 AM · Restricted Project

Tue, Sep 15

zhanghb97 added inline comments to D87617: [mlir] expose affine map to C API.
Tue, Sep 15, 8:13 PM · Restricted Project
zhanghb97 added inline comments to D87617: [mlir] expose affine map to C API.
Tue, Sep 15, 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.
Tue, Sep 15, 8:07 PM · Restricted Project
zhanghb97 added inline comments to D87617: [mlir] expose affine map to C API.
Tue, Sep 15, 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.
Tue, Sep 15, 12:20 AM · Restricted Project

Mon, Sep 14

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

Mon, Sep 7

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

Sun, Sep 6

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

Thanks for extending the PyConcreteType!

Sun, Sep 6, 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).

Sun, Sep 6, 7:03 PM · Restricted Project
zhanghb97 added inline comments to D87091: [mlir] Add Shaped Type, Tensor Type and MemRef Type to python bindings..
Sun, Sep 6, 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.
Sun, Sep 6, 8:41 AM · Restricted Project

Fri, Sep 4

zhanghb97 added inline comments to D87091: [mlir] Add Shaped Type, Tensor Type and MemRef Type to python bindings..
Fri, Sep 4, 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.
Fri, Sep 4, 7:56 AM · Restricted Project
zhanghb97 updated the summary of D87091: [mlir] Add Shaped Type, Tensor Type and MemRef Type to python bindings..
Fri, Sep 4, 7:05 AM · Restricted Project

Thu, Sep 3

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

Tue, Sep 1

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!

Tue, Sep 1, 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.

Tue, Sep 1, 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