Page MenuHomePhabricator

zhanghb97 (ZHANG Hongbin)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 8 2020, 4:20 AM (75 w, 5 h)

Recent Activity

Jan 25 2021

zhanghb97 committed rGa2914e0c158c: [mlir][Python] Fix comments of 'getCapsule' and 'createFromCapsule' (authored by zhanghb97).
[mlir][Python] Fix comments of 'getCapsule' and 'createFromCapsule'
Jan 25 2021, 9:00 PM
zhanghb97 closed D95413: [mlir][Python] Fix comments of 'getCapsule' and 'createFromCapsule'.
Jan 25 2021, 9:00 PM · Restricted Project
zhanghb97 requested review of D95413: [mlir][Python] Fix comments of 'getCapsule' and 'createFromCapsule'.
Jan 25 2021, 6:51 PM · Restricted Project

Jan 12 2021

zhanghb97 committed rGc0f3ea8a08ca: [mlir][Python] Add checking process before create an AffineMap from a… (authored by zhanghb97).
[mlir][Python] Add checking process before create an AffineMap from a…
Jan 12 2021, 5:33 PM
zhanghb97 closed D94492: [mlir][Python] Add checking process before create an AffineMap from a permutation..
Jan 12 2021, 5:32 PM · Restricted Project
zhanghb97 requested review of D94492: [mlir][Python] Add checking process before create an AffineMap from a permutation..
Jan 12 2021, 5:52 AM · Restricted Project

Dec 30 2020

zhanghb97 closed D93200: [mlir][Python] Initial Affine Map Python Bindings..
Dec 30 2020, 3:36 AM · Restricted Project

Dec 29 2020

zhanghb97 updated the diff for D93200: [mlir][Python] Initial Affine Map Python Bindings..

Rebase.

Dec 29 2020, 7:32 PM · Restricted Project

Dec 14 2020

zhanghb97 requested review of D93200: [mlir][Python] Initial Affine Map Python Bindings..
Dec 14 2020, 2:57 AM · Restricted Project

Dec 1 2020

zhanghb97 committed rG3024b1efde60: [mlir][Python] Check numpy in Python bindings configuration. (authored by zhanghb97).
[mlir][Python] Check numpy in Python bindings configuration.
Dec 1 2020, 5:29 PM
zhanghb97 closed D92276: [mlir][Python] Check numpy in Python bindings configuration..
Dec 1 2020, 5:29 PM · Restricted Project
zhanghb97 added a comment to D92276: [mlir][Python] Check numpy in Python bindings configuration..

I can't figure out why checking the numpy can fail the LLVM codegen test?

Dec 1 2020, 2:34 AM · Restricted Project

Nov 30 2020

zhanghb97 added inline comments to D92276: [mlir][Python] Check numpy in Python bindings configuration..
Nov 30 2020, 10:54 PM · Restricted Project
zhanghb97 updated the diff for D92276: [mlir][Python] Check numpy in Python bindings configuration..

Add NumPy as a required component.

Nov 30 2020, 10:54 PM · Restricted Project

Nov 29 2020

zhanghb97 added inline comments to D92276: [mlir][Python] Check numpy in Python bindings configuration..
Nov 29 2020, 10:38 PM · Restricted Project
zhanghb97 updated the diff for D92276: [mlir][Python] Check numpy in Python bindings configuration..

Check numpy in find_package by adding OPTIONAL_COMPONENTS NumPy.

Nov 29 2020, 10:38 PM · Restricted Project
zhanghb97 requested review of D92276: [mlir][Python] Check numpy in Python bindings configuration..
Nov 29 2020, 1:58 AM · Restricted Project

Nov 24 2020

zhanghb97 added a comment to D92007: [mlir][Python] Sync Python bindings with C API MlirStringRef modification..

I'm so sorry for the late reply because of the time zone difference, and thanks for your help and review!

Nov 24 2020, 5:47 PM · Restricted Project
zhanghb97 added inline comments to D92007: [mlir][Python] Sync Python bindings with C API MlirStringRef modification..
Nov 24 2020, 2:32 AM · Restricted Project

Nov 23 2020

zhanghb97 requested review of D92007: [mlir][Python] Sync Python bindings with C API MlirStringRef modification..
Nov 23 2020, 11:26 PM · Restricted Project

Nov 20 2020

zhanghb97 added a comment to D91903: [mlir][Python] Support finding pybind11 from the python environment..

I'm wondering can we use the MLIRDetectPythonEnv.cmake or names like this (detect all the required Python environments), instead of MLIRDetectPybind11.cmake (only responsible for checking pybind11). In this case, we can define all the detecting functions (like mlir_detect_numpy_install) in one cmake file to avoid fragmentation.

Nov 20 2020, 10:22 PM · Restricted Project

Nov 18 2020

zhanghb97 abandoned D91326: [mlir] Get array from the dense elements attribute with array property..
Nov 18 2020, 12:34 AM · Restricted Project

Nov 17 2020

zhanghb97 committed rG77133b29b934: [mlir] Get array from the dense elements attribute with buffer protocol. (authored by zhanghb97).
[mlir] Get array from the dense elements attribute with buffer protocol.
Nov 17 2020, 11:51 PM
zhanghb97 closed D91021: [mlir] Get array from the dense elements attribute with buffer protocol..
Nov 17 2020, 11:51 PM · Restricted Project
zhanghb97 updated the diff for D91021: [mlir] Get array from the dense elements attribute with buffer protocol..
  • Rebase.
  • Use static_cast and add a comment.
Nov 17 2020, 11:49 PM · Restricted Project
zhanghb97 updated the diff for D91021: [mlir] Get array from the dense elements attribute with buffer protocol..
  • Set the buffer to read-only.
  • Add note to Python binding doc to note that pybind11 v2.6.0 is required.
  • Use llvm::SmallVector instead of std::vector.
Nov 17 2020, 6:17 PM · Restricted Project

Nov 12 2020

zhanghb97 added a comment to D91326: [mlir] Get array from the dense elements attribute with array property..

This patch implements array property for dense elements attribute to get array. There is also a buffer protocol method in D91021.
Let's compare and choose one.

Nov 12 2020, 2:56 AM · Restricted Project
zhanghb97 added reviewers for D91326: [mlir] Get array from the dense elements attribute with array property.: stellaraccident, ftynse, mehdi_amini.
Nov 12 2020, 2:51 AM · Restricted Project
zhanghb97 added a comment to D91021: [mlir] Get array from the dense elements attribute with buffer protocol..

According to Stella's suggestion, there are two methods to get the array from dense elements attribute:

Nov 12 2020, 2:48 AM · Restricted Project
zhanghb97 added a reviewer for D91021: [mlir] Get array from the dense elements attribute with buffer protocol.: mehdi_amini.
Nov 12 2020, 2:14 AM · Restricted Project
zhanghb97 updated the diff for D91021: [mlir] Get array from the dense elements attribute with buffer protocol..

Add unit tests for mlirDenseElementsAttrGetRawData C API.

Nov 12 2020, 2:13 AM · Restricted Project
zhanghb97 requested review of D91326: [mlir] Get array from the dense elements attribute with array property..
Nov 12 2020, 12:56 AM · Restricted Project

Nov 11 2020

zhanghb97 updated the diff for D91021: [mlir] Get array from the dense elements attribute with buffer protocol..

Rebase.

Nov 11 2020, 6:20 PM · Restricted Project

Nov 9 2020

zhanghb97 added inline comments to D91021: [mlir] Get array from the dense elements attribute with buffer protocol..
Nov 9 2020, 5:41 PM · Restricted Project
zhanghb97 updated the diff for D91021: [mlir] Get array from the dense elements attribute with buffer protocol..
  • Rebase.
  • Remove the mlirElementsAttrGetType C API.
  • Modify checking conditions and unify the use of braces of the if and if else in accessBuffer function.
  • Unify the type into intptr_t in bufferInfo function.
Nov 9 2020, 5:29 PM · Restricted Project

Nov 8 2020

zhanghb97 added inline comments to D91021: [mlir] Get array from the dense elements attribute with buffer protocol..
Nov 8 2020, 7:30 AM · Restricted Project
zhanghb97 updated the diff for D91021: [mlir] Get array from the dense elements attribute with buffer protocol..
  • Add mlirDenseElementsAttrGetRawData C API.
  • Use the raw data to avoid the allocated array in the buffer protocol.
Nov 8 2020, 7:30 AM · Restricted Project

Nov 7 2020

zhanghb97 added inline comments to D91021: [mlir] Get array from the dense elements attribute with buffer protocol..
Nov 7 2020, 6:01 PM · Restricted Project
zhanghb97 requested review of D91021: [mlir] Get array from the dense elements attribute with buffer protocol..
Nov 7 2020, 5:57 PM · Restricted Project

Nov 3 2020

zhanghb97 added inline comments to D90584: [mlir][Python] Return and accept OpView for all functions..
Nov 3 2020, 6:39 PM · Restricted Project

Nov 2 2020

zhanghb97 added inline comments to D90584: [mlir][Python] Return and accept OpView for all functions..
Nov 2 2020, 7:06 PM · Restricted Project

Nov 1 2020

zhanghb97 added inline comments to D90547: [mlir][Python] Context managers for Context, InsertionPoint, Location..
Nov 1 2020, 6:34 PM · Restricted Project

Oct 23 2020

zhanghb97 committed rG448f25c86b79: [mlir] Expose affine expression to C API (authored by zhanghb97).
[mlir] Expose affine expression to C API
Oct 23 2020, 5:07 AM
zhanghb97 closed D89856: [mlir] Expose affine expression to C API.
Oct 23 2020, 5:07 AM · Restricted Project
zhanghb97 updated the diff for D89856: [mlir] Expose affine expression to C API.

Use the typeid/isa scheme, expose IsA and Get methods for each affine binary operation expression.

Oct 23 2020, 1:38 AM · Restricted Project

Oct 21 2020

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

Oct 17 2020

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

Oct 14 2020

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

Oct 10 2020

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

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

Oct 10 2020, 5:34 PM · Restricted Project

Oct 9 2020

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 (without installing llvm, llvm-c, mlir, mlir-c, etc.), what should I do?

Oct 9 2020, 11:09 PM · Restricted Project

Oct 2 2020

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…
Oct 2 2020, 9:34 AM
zhanghb97 closed D88531: [mlir] Add Float Attribute, Integer Attribute and Bool Attribute subclasses to python bindings..
Oct 2 2020, 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.
Oct 2 2020, 1:47 AM · Restricted Project

Oct 1 2020

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

Sep 29 2020

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

Sep 28 2020

zhanghb97 added inline comments to D88416: Add FunctionType to MLIR C and Python bindings..
Sep 28 2020, 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