Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error on Linux #1729

Closed
qedawkins opened this issue Sep 22, 2022 · 15 comments · Fixed by #1758
Closed

Build error on Linux #1729

qedawkins opened this issue Sep 22, 2022 · 15 comments · Fixed by #1758

Comments

@qedawkins
Copy link

I am seeing the following failure when building on Linux starting from 6d68373. The following is the critical part of the compilation error I am seeing.

/home/quinn/nodwork/onnx-mlir/src/Builder/FrontendDialectHelper.cpp:155:27: error: no matching constructor for initialization of 'ArrayRefOrSmallVector' (aka 'llvm::ArrayRef<float>')
    ArrayRefOrSmallVector array(data.begin(), data.end());
                          ^     ~~~~~~~~~~~~~~~~~~~~~~~~
/home/quinn/nodwork/onnx-mlir/src/Builder/FrontendDialectHelper.cpp:187:12: note: in instantiation of function template specialization 'onnx_mlir::createDenseElmAttr<float>' requested here
    return createDenseElmAttr<float>(externalDataDir, tp, denseBuilder);
           ^
/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:78:18: note: candidate constructor not viable: no known conversion from 'google::protobuf::RepeatedField<float>::const_iterator' (aka 'RepeatedIterator<const float>') to 'const float *' for 1st argument
    /*implicit*/ ArrayRef(const T *data, size_t length)
                 ^
/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:82:5: note: candidate constructor not viable: no known conversion from 'google::protobuf::RepeatedField<float>::const_iterator' (aka 'RepeatedIterator<const float>') to 'const float *' for 1st argument
    ArrayRef(const T *begin, const T *end)
    ^
/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:125:5: note: candidate template ignored: could not match 'ArrayRef' against 'RepeatedIterator'
    ArrayRef(const ArrayRef<U *> &A,
    ^
/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:134:18: note: candidate template ignored: could not match 'SmallVectorTemplateCommon' against 'RepeatedIterator'
    /*implicit*/ ArrayRef(
                 ^
/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:143:5: note: candidate template ignored: could not match 'vector' against 'RepeatedIterator'
    ArrayRef(const std::vector<U *, A> &Vec,
    ^
/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:71:18: note: candidate constructor not viable: requires 1 argument, but 2 were provided
    /*implicit*/ ArrayRef(NoneType) {}
                 ^
/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:74:18: note: candidate constructor not viable: requires single argument 'OneElt', but 2 arguments were provided
    /*implicit*/ ArrayRef(const T &OneElt)
                 ^
/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:89:18: note: candidate constructor template not viable: requires single argument 'Vec', but 2 arguments were provided
    /*implicit*/ ArrayRef(const SmallVectorTemplateCommon<T, U> &Vec)
                 ^
/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:95:18: note: candidate constructor template not viable: requires single argument 'Vec', but 2 arguments were provided
    /*implicit*/ ArrayRef(const std::vector<T, A> &Vec)
                 ^
/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:100:28: note: candidate constructor template not viable: requires single argument 'Arr', but 2 arguments were provided
    /*implicit*/ constexpr ArrayRef(const std::array<T, N> &Arr)
                           ^
/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:105:28: note: candidate constructor template not viable: requires single argument 'Arr', but 2 arguments were provided
    /*implicit*/ constexpr ArrayRef(const T (&Arr)[N]) : Data(Arr), Length(N) {}
                           ^
/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:115:18: note: candidate constructor not viable: requires single argument 'Vec', but 2 arguments were provided
    /*implicit*/ ArrayRef(const std::initializer_list<T> &Vec)
                 ^
/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:42:40: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
  class LLVM_GSL_POINTER [[nodiscard]] ArrayRef {
                                       ^
/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:42:40: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided
/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:68:18: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
    /*implicit*/ ArrayRef() = default;

I am on LLVM commit hash 59548fe873d8d98e359fb21fbb2a0852fed17ff5. Please let me know if there is anything else needed from me to reproduce and/or fix the error.

@sorenlassen
Copy link
Member

thanks for reporting this

given that this code passes all the CI pipelines, I wonder what's different for you

which compiler are you using? (if you followed the linux installation instructions here it would be /usr/bin/c++ and then you can see the version with /usr/bin/c++ --version)

@qedawkins
Copy link
Author

For /usr/bin/c++ it is GCC version 12.2. I also tried with clang version 14.0.6

@sorenlassen
Copy link
Member

I run Apple clang version 14.0.0 on Mac, so it doesn't seem to be a compiler issue if you see this with clang v14

I can't think of any explanation

it's not a good answer but the best I can think of is to delete your build dir and try to redo the linux installation and try again

@qedawkins
Copy link
Author

No problem, thanks for the suggestions. From what I can tell the problem is that it doesn't know how to do this conversion

/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:82:23: note:   no known conversion for argument 1 from ‘google::protobuf::RepeatedField<long unsigned int>::const_iterator’ {aka ‘google::protobuf::internal::RepeatedIterator<const long unsigned int>’} to ‘const long unsigned int*’
   82 |     ArrayRef(const T *begin, const T *end)

so it feels like either a compiler problem or maybe my protobuf version is incompatible? I was thinking of trying the docker setup recommended in the readme next, but is there a way to see the versions of everything used in the CI? That might help me with debugging this as well.

sorenlassen added a commit to sorenlassen/onnx-mlir-einsum that referenced this issue Sep 24, 2022
attempt to address issue onnx#1729: Build error on Linux

Signed-off-by: Soren Lassen <[email protected]>
@sorenlassen
Copy link
Member

you could try the alternative implementation here:
sorenlassen@ac7aeac

and see if that works, or generates a different compilation error which could throw some light on the issue

@gongsu832
Copy link
Collaborator

gongsu832 commented Sep 25, 2022

I can compile the latest commit df104fb fine with gcc 12 although I do get some warnings. The Dockerfiles for building llvm-project and onnx-mlir used by the Jenkins CI are docker/Dockerfile.llvm-project and docker/Dockerfile.onnx-mlir[-dev]. The typical build process involves:

  • compile and install protobuf, note besides the libprotobuf libraries, you also need the python binding and their versions should match
  • compile llvm-project
  • compile and install onnx that comes with onnx-mlir under third_party/onnx
  • compile onnx-mlir

We've seen quite a few protobuf related problems and they typically are due to one of the following:

  • protobuf version is too low or too new
  • libprotobuf and python binding versions mismatch
  • llvm-project, onnx, and/or onnx-mlir are built against different versions of protobuf, because after updating protobuf you only rebuild one of them
  • llvm-project, onnx, and/or onnx-mlir may detect different versions of python3 (so watch their cmake output) if you have multiple python versions installed
  • cmake caches stuff and you should never use "make clean" when rebuilding. Instead remove everything under the build tree and start from scratch.

This and many other trickeries for setting up the build env are the reason why we recommend using the onnxmlirczar/onnx-mlir-dev docker image for development.

@AlexandreEichenberger
Copy link
Collaborator

If this works out for you now @qedawkins please close

@qedawkins
Copy link
Author

Apologies I was sucked into something else for the past few days. The revision from @sorenlassen works with a small revision

 createDenseElmAttrFromProtoData(const google::protobuf::RepeatedField<U> &data,
     DenseElementsAttrBuilder<T> denseBuilder) {
-  return denseBuilder(llvm::makeArrayRef(data.begin(), data.end()));
+  return denseBuilder(llvm::makeArrayRef(data.data(), data.size()));
 }

But I haven't gone through the steps of checking with the docker image yet. It seems as though the problem is that my compiler doesn't like the conversion between the protobuf::RepeatedIterator<const int> iterator and const int*

/home/quinn/nodwork/onnx-mlir/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:487:15: note: candidate template ignored: could not match 'const T *' against 'google::protobuf::RepeatedField<int>::const_iterator' (aka 'RepeatedIterator<const int>')
  ArrayRef<T> makeArrayRef(const T *begin, const T *end) {
              ^

So there is still a problem of some sort on my end but this issue can be closed. Thanks @sorenlassen for the help!

@martin-luecke
Copy link

This is still an issue on my system as well.

The versions of the requirements on my system are:
Python 3.10.6
libprotoc 3.21.5
cmake version 3.24.1
GNU Make 4.3
Ninja 1.11.1

and I used clang version 14.0.6.

With sorenlassen@ac7aeac and the manual fixes detailed above I can compile onnx-mlir again. So would it make sense to pull them into main?

@AlexandreEichenberger
Copy link
Collaborator

@martin-luecke yes, please, having these fixes in main would make sense. It has to passes all of the CIs, obviously, which are dominated by Linux & Windows solutions.

sorenlassen added a commit to sorenlassen/onnx-mlir-einsum that referenced this issue Oct 3, 2022
attempt to address issue onnx#1729: Build error on Linux

Signed-off-by: Soren Lassen <[email protected]>
@sorenlassen
Copy link
Member

looks like this issue has resurfaced

I created a PR #1758 with my workaround from last week, please try it out

@sorenlassen sorenlassen reopened this Oct 3, 2022
@mikeessen
Copy link
Contributor

I was getting the compile error described in this issue on my mac. I tried the changes in PR #1758 but needed to make the update @qedawkins described in order to compile successfully:

  • return denseBuilder(llvm::makeArrayRef(data.begin(), data.end()));
  • return denseBuilder(llvm::makeArrayRef(data.data(), data.size()));

sorenlassen added a commit to sorenlassen/onnx-mlir-einsum that referenced this issue Oct 4, 2022
attempt to address issue onnx#1729: Build error on Linux

Signed-off-by: Soren Lassen <[email protected]>
@sorenlassen
Copy link
Member

thanks for pointing this out, I had overlooked @qedawkins's update

I updated PR #1758, please chime in on the PR if it solves your problems now (I can't reproduce the problem in my setup) and then I'll try to get it landed ASAP

nonetheless, it's frustrating that we cannot figure out why your compilers differ from the CI pipelines - do you see any explanation why? check out @gongsu832's input here:
#1729 (comment)

@gongsu832
Copy link
Collaborator

The problem is likely that your protobuf version 3.21.5 is too new. I updated my comments above to include this case.

@mikeessen
Copy link
Contributor

@sorenlassen thanks for updating PR #1758 . I compiled with the latest updates fine.

@gongsu832 my protoc version says 3.21.6. Which is even new than 3.21.5. So as you recommend using the docker image for development would be best I think.

sorenlassen added a commit that referenced this issue Oct 4, 2022
closes #1729

* redo ArrayRefOrSmallVector with enable_if

attempt to address issue #1729: Build error on Linux

Signed-off-by: Soren Lassen <[email protected]>

* added @qedawkins fix: begin,end -> data,size

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Quinn Dawkins [email protected]
Co-authored-by: Philip Lassen <[email protected]>
@gongsu832 gongsu832 mentioned this issue Oct 9, 2022
hamptonm1 added a commit that referenced this issue Oct 11, 2022
* Update onnx-mlir product version

Signed-off-by: Megan Hampton <[email protected]>

* fix einsum decomposition bug (#1730)

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Update version to 0.3.1 (#1728)

Signed-off-by: Megan Hampton <[email protected]>

* Fix issues to compile Yolov3-12. (#1726)

Stop conversion to enable onnx.LeakyRelu on NNPA when the stickified layouts of input and output are not the same.
Signed-off-by: Yasushi Negishi <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* simplified if lowering (#1717)

borrowed ideas from ConvertTrivialIfToSelect from
https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/SCF/IR/SCF.cpp

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add definitions

Signed-off-by: Megan Hampton <[email protected]>

* parse string type from getTypeMap() (#1735)

added a parse lit test that passes with this fix

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* fix 2 compiler warnings (#1736)

* fix sprintf-is-deprecated clang warning

warning from Apple clang version 14.0.0 (clang-1400.0.29.201):
```
.../src/Conversion/ONNXToKrnl/PerfectHash.cpp:47:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
    sprintf(str, "%lld", (long long)val);
/Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
```

Signed-off-by: Soren Lassen <[email protected]>

* fix copy constructor warning

copied solution from InstrumentONNXPass.cpp

fixes compiler warning in Linux CI pipelines:
```
.../src/Transform/ONNX/ConvOpt.cpp: In copy constructor '{anonymous}::ConvOptONNXToONNXPass::ConvOptONNXToONNXPass(const {anonymous}::ConvOptONNXToONNXPass&)':
.../src/Transform/ONNX/ConvOpt.cpp:211:3: warning: base class 'class mlir::PassWrapper<{anonymous}::ConvOptONNXToONNXPass, mlir::OperationPass<mlir::func::FuncOp> >' should be explicitly initialized in the copy constructor [-Wextra]
   ConvOptONNXToONNXPass(const ConvOptONNXToONNXPass &pass) {}
```

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* cleanup some include files (#1733)

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix remaining warnings on Windows and turn on warning-as-error (#1706)

This change applies the remaining fixes needed for warnings to be treated as errors on Windows and then turns them on on Windows only. Of particular interest are a couple of changes:

* The `check-docs` target needs an update to properly parse the directive even when it contains parenthesis in the path. For example: `C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python39_64/python.exe`
* The Windows CI build now builds `onnx` first and then builds all of the targets that are enabled in onnx-mlir. This will make sure that no targets get missed
* The remaining warnings (4927) in `ConstProp.cpp` are fixed as well.

Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix synax

Signed-off-by: Megan Hampton <[email protected]>

* Simplify shape-related operations (#1695)

* Simplify shape-related operations

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* run-onnx-lib script and docs fixes (#1705)

* update documentation for build-run-onnx-lib.sh
* clarified Mac issue with running statically linked version in the directory where model library was built
* moved usage string up to the top of RunONNXLib.cpp, so it's visible next to the top of file block comment,
* allow llvm-project location to be set with LLVM_PROJECT, otherwise read from $MLIR_DIR if defined

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* remove initializedTensors map from ONNX parser (#1739)

instead insert a constant for each initializer in the frontend_symbols_
symbol map

this is better for several reasons:

1. initializedTensors were incorrectly visible to function bodies (in
   TryImportFunctionCallNode)

2. nested bindings didn't hide initializedTensors within their scope

3. it's more efficient to create a constant for each initializer once
   rather than every time an initializer is accessed

4. it's simpler to look up a single symbol mapping

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add decompositions for v11 split, squeeze, and unsqueeze (#1702)

* Add decompositions for v11 split, squeeze, and unsqueeze

Co-authored-by: Roberto DiCecco <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>

* Fix lit test

Signed-off-by: Philip Lassen <[email protected]>

* Add lit tests

Signed-off-by: Philip Lassen <[email protected]>

* Delete unneccesary decomp for unsqueeze

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* factored input shaping into ModelInputShaper (#1740)

* factored input shaping into ModelInputShaper

this makes the it easier to read and understand the input shaping
logic and also makes the rest of the FrontendDialectTransformer
implementation shorter and easier to read

Signed-off-by: Soren Lassen <[email protected]>

* documented public methods

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Ingest all of Opset 16  (#1704)

* Ingest al of opset 16

Signed-off-by: Philip Lassen <[email protected]>

* Delete GridSample test which is no longer relevant

Signed-off-by: Philip Lassen <[email protected]>

* Use NullStringAttr insead of "none" string

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix onnx-mlir.py docker wrapper (#1734)

* Requiring input files to have known suffix (.onnx, .json, or .mlir) greatly
simplifies the onnx-mlir.py docker wrapper.

Signed-off-by: Gong Su <[email protected]>

* Return exit code

Signed-off-by: Gong Su <[email protected]>

* Add copyright notice

Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Update protobuf (#1747)

* Update to protobuf 3.20.2

Signed-off-by: Charles Volzka <[email protected]>

* Try 3.18.3

Signed-off-by: Charles Volzka <[email protected]>

Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add the product version and fix formatting

Signed-off-by: Megan Hampton <[email protected]>

* Make updates to product version

Signed-off-by: Megan Hampton <[email protected]>

* further updates

Signed-off-by: Megan Hampton <[email protected]>

* Add product version text file

Signed-off-by: Megan Hampton <[email protected]>

* Removed the memory leaks directly in execution session (#1746)

* removed the memory leaks directly in execution session
Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add support for ArgMin (#1737)

* add support for ArgMin

Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Inclusive terminology update (#1750)

* Update `master` reference to `main` in onnx-mlir doc
* Update rapidcheck to newer commit with inclusive terminology changes
* Update benchmark to 1.6.2 with inclusive terminology changes
* Update pybind11 to 2.10 with inclusive terminology changes

Signed-off-by: Megan Hampton <[email protected]>

* Warning and instructions that --onnx-op-stats needs more than EmitONNXIR (#1719)

Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Move product version text file

Signed-off-by: Megan Hampton <[email protected]>

* Remove comment

Signed-off-by: Megan Hampton <[email protected]>

* Output the product version for the compiler/version

Signed-off-by: Megan Hampton <[email protected]>

* Cleaned up commit of the InferTypes change. (#1753)

Signed-off-by: Brad Messer <[email protected]>

Co-authored-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* setup.py install is deprecated, use pip install instead (#1752)

* setup.py install is deprecated, use pip install instead (see https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for more details).

Signed-off-by: Gong Su <[email protected]>

* - pip install doesn't work for protobuf, revert back to setup.py install
- use --cpp_implementation for better performance

Signed-off-by: Gong Su <[email protected]>

* Update Windows CI

Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* adding reference to onnx-mlir-serving (#1745)

Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* [TOSA] Update type converter and unary ops (#1553)

Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix syntax

Signed-off-by: Megan Hampton <[email protected]>

* Remove strip

Signed-off-by: Megan Hampton <[email protected]>

* Revert "Cleaned up commit of the InferTypes change. (#1753)"

This reverts commit d08c5ac.

Signed-off-by: Megan Hampton <[email protected]>

* Cleaned up commit of the InferTypes change. (#1753)

Signed-off-by: Brad Messer <[email protected]>

Co-authored-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix for GatherND verifier (#1754)

Co-authored-by: Hadi Jooybar <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix OnnxBuilder::concat where axis was not used (#1759)

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Simplify GatherOp when its inputs are dimensions (#1755)

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Assign each question mark a unique negative integer value (#1757)

* Assign each question mark a unique negative integer value

Signed-off-by: Tung D. Le <[email protected]>

* Add a mutex to protect the counter

Signed-off-by: Tung D. Le <[email protected]>

* Using decrement

Signed-off-by: Tung D. Le <[email protected]>

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Change the regex

Signed-off-by: Megan Hampton <[email protected]>

* Fix regex and display product numbers

Signed-off-by: Megan Hampton <[email protected]>

* normalize axis in ScatterElements verify (#1760)

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* redo ArrayRefOrSmallVector with enable_if (#1758)

closes #1729

* redo ArrayRefOrSmallVector with enable_if

attempt to address issue #1729: Build error on Linux

Signed-off-by: Soren Lassen <[email protected]>

* added @qedawkins fix: begin,end -> data,size

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Quinn Dawkins [email protected]
Co-authored-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* fix syntax

Signed-off-by: Megan Hampton <[email protected]>

* Handle scalar tensor tensor<type> in SimplifyShapeRelatesOps pass (#1764)

Signed-off-by: Tung D. Le <[email protected]>

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* namespace cleanup (#1763)

* namespace cleanup

removed `using namespace mlir` from ConstPropHelper.hpp and added
requisite `mlir::` and `llvm::` in header files to get everything
to compile again

also put ConstPropHelper definitions in namespace onnx_mlir

Signed-off-by: Soren Lassen <[email protected]>

* added more missing `mlir/llvm::`

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Signed-off-by: Megan Hampton <[email protected]>

Fix Clang format error

* Make use of the product vendor flag

Signed-off-by: Megan Hampton <[email protected]>

* Address feedback

Signed-off-by: Megan Hampton <[email protected]>

Signed-off-by: Megan Hampton <[email protected]>
Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: Megan Hampton <[email protected]>
Co-authored-by: Soren Lassen <[email protected]>
Co-authored-by: Charles Volzka <[email protected]>
Co-authored-by: Yasushi Negishi <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Co-authored-by: Stella Stamenova <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Co-authored-by: gongsu832 <[email protected]>
Co-authored-by: Meng, Hengyu <[email protected]>
Co-authored-by: Brad Messer <[email protected]>
Co-authored-by: Philipp Braun <[email protected]>
Co-authored-by: Hadi Jooybar <[email protected]>
chentong319 added a commit to chentong319/onnx-mlir that referenced this issue Oct 12, 2022
* Update onnx-mlir product version

Signed-off-by: Megan Hampton <[email protected]>

* fix einsum decomposition bug (onnx#1730)

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Update version to 0.3.1 (onnx#1728)

Signed-off-by: Megan Hampton <[email protected]>

* Fix issues to compile Yolov3-12. (onnx#1726)

Stop conversion to enable onnx.LeakyRelu on NNPA when the stickified layouts of input and output are not the same.
Signed-off-by: Yasushi Negishi <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* simplified if lowering (onnx#1717)

borrowed ideas from ConvertTrivialIfToSelect from
https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/SCF/IR/SCF.cpp

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add definitions

Signed-off-by: Megan Hampton <[email protected]>

* parse string type from getTypeMap() (onnx#1735)

added a parse lit test that passes with this fix

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* fix 2 compiler warnings (onnx#1736)

* fix sprintf-is-deprecated clang warning

warning from Apple clang version 14.0.0 (clang-1400.0.29.201):
```
.../src/Conversion/ONNXToKrnl/PerfectHash.cpp:47:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
    sprintf(str, "%lld", (long long)val);
/Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
```

Signed-off-by: Soren Lassen <[email protected]>

* fix copy constructor warning

copied solution from InstrumentONNXPass.cpp

fixes compiler warning in Linux CI pipelines:
```
.../src/Transform/ONNX/ConvOpt.cpp: In copy constructor '{anonymous}::ConvOptONNXToONNXPass::ConvOptONNXToONNXPass(const {anonymous}::ConvOptONNXToONNXPass&)':
.../src/Transform/ONNX/ConvOpt.cpp:211:3: warning: base class 'class mlir::PassWrapper<{anonymous}::ConvOptONNXToONNXPass, mlir::OperationPass<mlir::func::FuncOp> >' should be explicitly initialized in the copy constructor [-Wextra]
   ConvOptONNXToONNXPass(const ConvOptONNXToONNXPass &pass) {}
```

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* cleanup some include files (onnx#1733)

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix remaining warnings on Windows and turn on warning-as-error (onnx#1706)

This change applies the remaining fixes needed for warnings to be treated as errors on Windows and then turns them on on Windows only. Of particular interest are a couple of changes:

* The `check-docs` target needs an update to properly parse the directive even when it contains parenthesis in the path. For example: `C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python39_64/python.exe`
* The Windows CI build now builds `onnx` first and then builds all of the targets that are enabled in onnx-mlir. This will make sure that no targets get missed
* The remaining warnings (4927) in `ConstProp.cpp` are fixed as well.

Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix synax

Signed-off-by: Megan Hampton <[email protected]>

* Simplify shape-related operations (onnx#1695)

* Simplify shape-related operations

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* run-onnx-lib script and docs fixes (onnx#1705)

* update documentation for build-run-onnx-lib.sh
* clarified Mac issue with running statically linked version in the directory where model library was built
* moved usage string up to the top of RunONNXLib.cpp, so it's visible next to the top of file block comment,
* allow llvm-project location to be set with LLVM_PROJECT, otherwise read from $MLIR_DIR if defined

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* remove initializedTensors map from ONNX parser (onnx#1739)

instead insert a constant for each initializer in the frontend_symbols_
symbol map

this is better for several reasons:

1. initializedTensors were incorrectly visible to function bodies (in
   TryImportFunctionCallNode)

2. nested bindings didn't hide initializedTensors within their scope

3. it's more efficient to create a constant for each initializer once
   rather than every time an initializer is accessed

4. it's simpler to look up a single symbol mapping

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add decompositions for v11 split, squeeze, and unsqueeze (onnx#1702)

* Add decompositions for v11 split, squeeze, and unsqueeze

Co-authored-by: Roberto DiCecco <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>

* Fix lit test

Signed-off-by: Philip Lassen <[email protected]>

* Add lit tests

Signed-off-by: Philip Lassen <[email protected]>

* Delete unneccesary decomp for unsqueeze

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* factored input shaping into ModelInputShaper (onnx#1740)

* factored input shaping into ModelInputShaper

this makes the it easier to read and understand the input shaping
logic and also makes the rest of the FrontendDialectTransformer
implementation shorter and easier to read

Signed-off-by: Soren Lassen <[email protected]>

* documented public methods

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Ingest all of Opset 16  (onnx#1704)

* Ingest al of opset 16

Signed-off-by: Philip Lassen <[email protected]>

* Delete GridSample test which is no longer relevant

Signed-off-by: Philip Lassen <[email protected]>

* Use NullStringAttr insead of "none" string

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix onnx-mlir.py docker wrapper (onnx#1734)

* Requiring input files to have known suffix (.onnx, .json, or .mlir) greatly
simplifies the onnx-mlir.py docker wrapper.

Signed-off-by: Gong Su <[email protected]>

* Return exit code

Signed-off-by: Gong Su <[email protected]>

* Add copyright notice

Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Update protobuf (onnx#1747)

* Update to protobuf 3.20.2

Signed-off-by: Charles Volzka <[email protected]>

* Try 3.18.3

Signed-off-by: Charles Volzka <[email protected]>

Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add the product version and fix formatting

Signed-off-by: Megan Hampton <[email protected]>

* Make updates to product version

Signed-off-by: Megan Hampton <[email protected]>

* further updates

Signed-off-by: Megan Hampton <[email protected]>

* Add product version text file

Signed-off-by: Megan Hampton <[email protected]>

* Removed the memory leaks directly in execution session (onnx#1746)

* removed the memory leaks directly in execution session
Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add support for ArgMin (onnx#1737)

* add support for ArgMin

Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Inclusive terminology update (onnx#1750)

* Update `master` reference to `main` in onnx-mlir doc
* Update rapidcheck to newer commit with inclusive terminology changes
* Update benchmark to 1.6.2 with inclusive terminology changes
* Update pybind11 to 2.10 with inclusive terminology changes

Signed-off-by: Megan Hampton <[email protected]>

* Warning and instructions that --onnx-op-stats needs more than EmitONNXIR (onnx#1719)

Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Move product version text file

Signed-off-by: Megan Hampton <[email protected]>

* Remove comment

Signed-off-by: Megan Hampton <[email protected]>

* Output the product version for the compiler/version

Signed-off-by: Megan Hampton <[email protected]>

* Cleaned up commit of the InferTypes change. (onnx#1753)

Signed-off-by: Brad Messer <[email protected]>

Co-authored-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* setup.py install is deprecated, use pip install instead (onnx#1752)

* setup.py install is deprecated, use pip install instead (see https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for more details).

Signed-off-by: Gong Su <[email protected]>

* - pip install doesn't work for protobuf, revert back to setup.py install
- use --cpp_implementation for better performance

Signed-off-by: Gong Su <[email protected]>

* Update Windows CI

Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* adding reference to onnx-mlir-serving (onnx#1745)

Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* [TOSA] Update type converter and unary ops (onnx#1553)

Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix syntax

Signed-off-by: Megan Hampton <[email protected]>

* Remove strip

Signed-off-by: Megan Hampton <[email protected]>

* Revert "Cleaned up commit of the InferTypes change. (onnx#1753)"

This reverts commit d08c5ac.

Signed-off-by: Megan Hampton <[email protected]>

* Cleaned up commit of the InferTypes change. (onnx#1753)

Signed-off-by: Brad Messer <[email protected]>

Co-authored-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix for GatherND verifier (onnx#1754)

Co-authored-by: Hadi Jooybar <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix OnnxBuilder::concat where axis was not used (onnx#1759)

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Simplify GatherOp when its inputs are dimensions (onnx#1755)

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Assign each question mark a unique negative integer value (onnx#1757)

* Assign each question mark a unique negative integer value

Signed-off-by: Tung D. Le <[email protected]>

* Add a mutex to protect the counter

Signed-off-by: Tung D. Le <[email protected]>

* Using decrement

Signed-off-by: Tung D. Le <[email protected]>

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Change the regex

Signed-off-by: Megan Hampton <[email protected]>

* Fix regex and display product numbers

Signed-off-by: Megan Hampton <[email protected]>

* normalize axis in ScatterElements verify (onnx#1760)

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* redo ArrayRefOrSmallVector with enable_if (onnx#1758)

closes onnx#1729

* redo ArrayRefOrSmallVector with enable_if

attempt to address issue onnx#1729: Build error on Linux

Signed-off-by: Soren Lassen <[email protected]>

* added @qedawkins fix: begin,end -> data,size

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Quinn Dawkins [email protected]
Co-authored-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* fix syntax

Signed-off-by: Megan Hampton <[email protected]>

* Handle scalar tensor tensor<type> in SimplifyShapeRelatesOps pass (onnx#1764)

Signed-off-by: Tung D. Le <[email protected]>

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* namespace cleanup (onnx#1763)

* namespace cleanup

removed `using namespace mlir` from ConstPropHelper.hpp and added
requisite `mlir::` and `llvm::` in header files to get everything
to compile again

also put ConstPropHelper definitions in namespace onnx_mlir

Signed-off-by: Soren Lassen <[email protected]>

* added more missing `mlir/llvm::`

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Signed-off-by: Megan Hampton <[email protected]>

Fix Clang format error

* Make use of the product vendor flag

Signed-off-by: Megan Hampton <[email protected]>

* Address feedback

Signed-off-by: Megan Hampton <[email protected]>

Signed-off-by: Megan Hampton <[email protected]>
Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: Megan Hampton <[email protected]>
Co-authored-by: Soren Lassen <[email protected]>
Co-authored-by: Charles Volzka <[email protected]>
Co-authored-by: Yasushi Negishi <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Co-authored-by: Stella Stamenova <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Co-authored-by: gongsu832 <[email protected]>
Co-authored-by: Meng, Hengyu <[email protected]>
Co-authored-by: Brad Messer <[email protected]>
Co-authored-by: Philipp Braun <[email protected]>
Co-authored-by: Hadi Jooybar <[email protected]>
chentong319 added a commit that referenced this issue Oct 13, 2022
* update shape inference and test

Signed-off-by: chentong319 <[email protected]>

* lowering

Signed-off-by: chentong319 <[email protected]>

* lowering

Signed-off-by: chentong319 <[email protected]>

* Update onnx-mlir product version (#1727)

* Update onnx-mlir product version

Signed-off-by: Megan Hampton <[email protected]>

* fix einsum decomposition bug (#1730)

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Update version to 0.3.1 (#1728)

Signed-off-by: Megan Hampton <[email protected]>

* Fix issues to compile Yolov3-12. (#1726)

Stop conversion to enable onnx.LeakyRelu on NNPA when the stickified layouts of input and output are not the same.
Signed-off-by: Yasushi Negishi <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* simplified if lowering (#1717)

borrowed ideas from ConvertTrivialIfToSelect from
https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/SCF/IR/SCF.cpp

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add definitions

Signed-off-by: Megan Hampton <[email protected]>

* parse string type from getTypeMap() (#1735)

added a parse lit test that passes with this fix

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* fix 2 compiler warnings (#1736)

* fix sprintf-is-deprecated clang warning

warning from Apple clang version 14.0.0 (clang-1400.0.29.201):
```
.../src/Conversion/ONNXToKrnl/PerfectHash.cpp:47:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
    sprintf(str, "%lld", (long long)val);
/Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
```

Signed-off-by: Soren Lassen <[email protected]>

* fix copy constructor warning

copied solution from InstrumentONNXPass.cpp

fixes compiler warning in Linux CI pipelines:
```
.../src/Transform/ONNX/ConvOpt.cpp: In copy constructor '{anonymous}::ConvOptONNXToONNXPass::ConvOptONNXToONNXPass(const {anonymous}::ConvOptONNXToONNXPass&)':
.../src/Transform/ONNX/ConvOpt.cpp:211:3: warning: base class 'class mlir::PassWrapper<{anonymous}::ConvOptONNXToONNXPass, mlir::OperationPass<mlir::func::FuncOp> >' should be explicitly initialized in the copy constructor [-Wextra]
   ConvOptONNXToONNXPass(const ConvOptONNXToONNXPass &pass) {}
```

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* cleanup some include files (#1733)

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix remaining warnings on Windows and turn on warning-as-error (#1706)

This change applies the remaining fixes needed for warnings to be treated as errors on Windows and then turns them on on Windows only. Of particular interest are a couple of changes:

* The `check-docs` target needs an update to properly parse the directive even when it contains parenthesis in the path. For example: `C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python39_64/python.exe`
* The Windows CI build now builds `onnx` first and then builds all of the targets that are enabled in onnx-mlir. This will make sure that no targets get missed
* The remaining warnings (4927) in `ConstProp.cpp` are fixed as well.

Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix synax

Signed-off-by: Megan Hampton <[email protected]>

* Simplify shape-related operations (#1695)

* Simplify shape-related operations

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* run-onnx-lib script and docs fixes (#1705)

* update documentation for build-run-onnx-lib.sh
* clarified Mac issue with running statically linked version in the directory where model library was built
* moved usage string up to the top of RunONNXLib.cpp, so it's visible next to the top of file block comment,
* allow llvm-project location to be set with LLVM_PROJECT, otherwise read from $MLIR_DIR if defined

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* remove initializedTensors map from ONNX parser (#1739)

instead insert a constant for each initializer in the frontend_symbols_
symbol map

this is better for several reasons:

1. initializedTensors were incorrectly visible to function bodies (in
   TryImportFunctionCallNode)

2. nested bindings didn't hide initializedTensors within their scope

3. it's more efficient to create a constant for each initializer once
   rather than every time an initializer is accessed

4. it's simpler to look up a single symbol mapping

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add decompositions for v11 split, squeeze, and unsqueeze (#1702)

* Add decompositions for v11 split, squeeze, and unsqueeze

Co-authored-by: Roberto DiCecco <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>

* Fix lit test

Signed-off-by: Philip Lassen <[email protected]>

* Add lit tests

Signed-off-by: Philip Lassen <[email protected]>

* Delete unneccesary decomp for unsqueeze

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* factored input shaping into ModelInputShaper (#1740)

* factored input shaping into ModelInputShaper

this makes the it easier to read and understand the input shaping
logic and also makes the rest of the FrontendDialectTransformer
implementation shorter and easier to read

Signed-off-by: Soren Lassen <[email protected]>

* documented public methods

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Ingest all of Opset 16  (#1704)

* Ingest al of opset 16

Signed-off-by: Philip Lassen <[email protected]>

* Delete GridSample test which is no longer relevant

Signed-off-by: Philip Lassen <[email protected]>

* Use NullStringAttr insead of "none" string

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix onnx-mlir.py docker wrapper (#1734)

* Requiring input files to have known suffix (.onnx, .json, or .mlir) greatly
simplifies the onnx-mlir.py docker wrapper.

Signed-off-by: Gong Su <[email protected]>

* Return exit code

Signed-off-by: Gong Su <[email protected]>

* Add copyright notice

Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Update protobuf (#1747)

* Update to protobuf 3.20.2

Signed-off-by: Charles Volzka <[email protected]>

* Try 3.18.3

Signed-off-by: Charles Volzka <[email protected]>

Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add the product version and fix formatting

Signed-off-by: Megan Hampton <[email protected]>

* Make updates to product version

Signed-off-by: Megan Hampton <[email protected]>

* further updates

Signed-off-by: Megan Hampton <[email protected]>

* Add product version text file

Signed-off-by: Megan Hampton <[email protected]>

* Removed the memory leaks directly in execution session (#1746)

* removed the memory leaks directly in execution session
Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add support for ArgMin (#1737)

* add support for ArgMin

Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Inclusive terminology update (#1750)

* Update `master` reference to `main` in onnx-mlir doc
* Update rapidcheck to newer commit with inclusive terminology changes
* Update benchmark to 1.6.2 with inclusive terminology changes
* Update pybind11 to 2.10 with inclusive terminology changes

Signed-off-by: Megan Hampton <[email protected]>

* Warning and instructions that --onnx-op-stats needs more than EmitONNXIR (#1719)

Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Move product version text file

Signed-off-by: Megan Hampton <[email protected]>

* Remove comment

Signed-off-by: Megan Hampton <[email protected]>

* Output the product version for the compiler/version

Signed-off-by: Megan Hampton <[email protected]>

* Cleaned up commit of the InferTypes change. (#1753)

Signed-off-by: Brad Messer <[email protected]>

Co-authored-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* setup.py install is deprecated, use pip install instead (#1752)

* setup.py install is deprecated, use pip install instead (see https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for more details).

Signed-off-by: Gong Su <[email protected]>

* - pip install doesn't work for protobuf, revert back to setup.py install
- use --cpp_implementation for better performance

Signed-off-by: Gong Su <[email protected]>

* Update Windows CI

Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* adding reference to onnx-mlir-serving (#1745)

Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* [TOSA] Update type converter and unary ops (#1553)

Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix syntax

Signed-off-by: Megan Hampton <[email protected]>

* Remove strip

Signed-off-by: Megan Hampton <[email protected]>

* Revert "Cleaned up commit of the InferTypes change. (#1753)"

This reverts commit d08c5ac.

Signed-off-by: Megan Hampton <[email protected]>

* Cleaned up commit of the InferTypes change. (#1753)

Signed-off-by: Brad Messer <[email protected]>

Co-authored-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix for GatherND verifier (#1754)

Co-authored-by: Hadi Jooybar <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix OnnxBuilder::concat where axis was not used (#1759)

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Simplify GatherOp when its inputs are dimensions (#1755)

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Assign each question mark a unique negative integer value (#1757)

* Assign each question mark a unique negative integer value

Signed-off-by: Tung D. Le <[email protected]>

* Add a mutex to protect the counter

Signed-off-by: Tung D. Le <[email protected]>

* Using decrement

Signed-off-by: Tung D. Le <[email protected]>

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Change the regex

Signed-off-by: Megan Hampton <[email protected]>

* Fix regex and display product numbers

Signed-off-by: Megan Hampton <[email protected]>

* normalize axis in ScatterElements verify (#1760)

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* redo ArrayRefOrSmallVector with enable_if (#1758)

closes #1729

* redo ArrayRefOrSmallVector with enable_if

attempt to address issue #1729: Build error on Linux

Signed-off-by: Soren Lassen <[email protected]>

* added @qedawkins fix: begin,end -> data,size

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Quinn Dawkins [email protected]
Co-authored-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* fix syntax

Signed-off-by: Megan Hampton <[email protected]>

* Handle scalar tensor tensor<type> in SimplifyShapeRelatesOps pass (#1764)

Signed-off-by: Tung D. Le <[email protected]>

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* namespace cleanup (#1763)

* namespace cleanup

removed `using namespace mlir` from ConstPropHelper.hpp and added
requisite `mlir::` and `llvm::` in header files to get everything
to compile again

also put ConstPropHelper definitions in namespace onnx_mlir

Signed-off-by: Soren Lassen <[email protected]>

* added more missing `mlir/llvm::`

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Signed-off-by: Megan Hampton <[email protected]>

Fix Clang format error

* Make use of the product vendor flag

Signed-off-by: Megan Hampton <[email protected]>

* Address feedback

Signed-off-by: Megan Hampton <[email protected]>

Signed-off-by: Megan Hampton <[email protected]>
Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: Megan Hampton <[email protected]>
Co-authored-by: Soren Lassen <[email protected]>
Co-authored-by: Charles Volzka <[email protected]>
Co-authored-by: Yasushi Negishi <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Co-authored-by: Stella Stamenova <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Co-authored-by: gongsu832 <[email protected]>
Co-authored-by: Meng, Hengyu <[email protected]>
Co-authored-by: Brad Messer <[email protected]>
Co-authored-by: Philipp Braun <[email protected]>
Co-authored-by: Hadi Jooybar <[email protected]>

* different initial

Signed-off-by: chentong319 <[email protected]>

Signed-off-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>
Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: hamptonm1 <[email protected]>
Co-authored-by: Megan Hampton <[email protected]>
Co-authored-by: Soren Lassen <[email protected]>
Co-authored-by: Charles Volzka <[email protected]>
Co-authored-by: Yasushi Negishi <[email protected]>
Co-authored-by: Stella Stamenova <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Co-authored-by: gongsu832 <[email protected]>
Co-authored-by: Meng, Hengyu <[email protected]>
Co-authored-by: Brad Messer <[email protected]>
Co-authored-by: Philipp Braun <[email protected]>
Co-authored-by: Hadi Jooybar <[email protected]>
gargaroff pushed a commit to ljfitz/onnx-mlir that referenced this issue Nov 3, 2022
* Update onnx-mlir product version

Signed-off-by: Megan Hampton <[email protected]>

* fix einsum decomposition bug (onnx#1730)

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Update version to 0.3.1 (onnx#1728)

Signed-off-by: Megan Hampton <[email protected]>

* Fix issues to compile Yolov3-12. (onnx#1726)

Stop conversion to enable onnx.LeakyRelu on NNPA when the stickified layouts of input and output are not the same.
Signed-off-by: Yasushi Negishi <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* simplified if lowering (onnx#1717)

borrowed ideas from ConvertTrivialIfToSelect from
https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/SCF/IR/SCF.cpp

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add definitions

Signed-off-by: Megan Hampton <[email protected]>

* parse string type from getTypeMap() (onnx#1735)

added a parse lit test that passes with this fix

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* fix 2 compiler warnings (onnx#1736)

* fix sprintf-is-deprecated clang warning

warning from Apple clang version 14.0.0 (clang-1400.0.29.201):
```
.../src/Conversion/ONNXToKrnl/PerfectHash.cpp:47:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
    sprintf(str, "%lld", (long long)val);
/Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
```

Signed-off-by: Soren Lassen <[email protected]>

* fix copy constructor warning

copied solution from InstrumentONNXPass.cpp

fixes compiler warning in Linux CI pipelines:
```
.../src/Transform/ONNX/ConvOpt.cpp: In copy constructor '{anonymous}::ConvOptONNXToONNXPass::ConvOptONNXToONNXPass(const {anonymous}::ConvOptONNXToONNXPass&)':
.../src/Transform/ONNX/ConvOpt.cpp:211:3: warning: base class 'class mlir::PassWrapper<{anonymous}::ConvOptONNXToONNXPass, mlir::OperationPass<mlir::func::FuncOp> >' should be explicitly initialized in the copy constructor [-Wextra]
   ConvOptONNXToONNXPass(const ConvOptONNXToONNXPass &pass) {}
```

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* cleanup some include files (onnx#1733)

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix remaining warnings on Windows and turn on warning-as-error (onnx#1706)

This change applies the remaining fixes needed for warnings to be treated as errors on Windows and then turns them on on Windows only. Of particular interest are a couple of changes:

* The `check-docs` target needs an update to properly parse the directive even when it contains parenthesis in the path. For example: `C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python39_64/python.exe`
* The Windows CI build now builds `onnx` first and then builds all of the targets that are enabled in onnx-mlir. This will make sure that no targets get missed
* The remaining warnings (4927) in `ConstProp.cpp` are fixed as well.

Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix synax

Signed-off-by: Megan Hampton <[email protected]>

* Simplify shape-related operations (onnx#1695)

* Simplify shape-related operations

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* run-onnx-lib script and docs fixes (onnx#1705)

* update documentation for build-run-onnx-lib.sh
* clarified Mac issue with running statically linked version in the directory where model library was built
* moved usage string up to the top of RunONNXLib.cpp, so it's visible next to the top of file block comment,
* allow llvm-project location to be set with LLVM_PROJECT, otherwise read from $MLIR_DIR if defined

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* remove initializedTensors map from ONNX parser (onnx#1739)

instead insert a constant for each initializer in the frontend_symbols_
symbol map

this is better for several reasons:

1. initializedTensors were incorrectly visible to function bodies (in
   TryImportFunctionCallNode)

2. nested bindings didn't hide initializedTensors within their scope

3. it's more efficient to create a constant for each initializer once
   rather than every time an initializer is accessed

4. it's simpler to look up a single symbol mapping

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add decompositions for v11 split, squeeze, and unsqueeze (onnx#1702)

* Add decompositions for v11 split, squeeze, and unsqueeze

Co-authored-by: Roberto DiCecco <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>

* Fix lit test

Signed-off-by: Philip Lassen <[email protected]>

* Add lit tests

Signed-off-by: Philip Lassen <[email protected]>

* Delete unneccesary decomp for unsqueeze

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* factored input shaping into ModelInputShaper (onnx#1740)

* factored input shaping into ModelInputShaper

this makes the it easier to read and understand the input shaping
logic and also makes the rest of the FrontendDialectTransformer
implementation shorter and easier to read

Signed-off-by: Soren Lassen <[email protected]>

* documented public methods

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Ingest all of Opset 16  (onnx#1704)

* Ingest al of opset 16

Signed-off-by: Philip Lassen <[email protected]>

* Delete GridSample test which is no longer relevant

Signed-off-by: Philip Lassen <[email protected]>

* Use NullStringAttr insead of "none" string

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix onnx-mlir.py docker wrapper (onnx#1734)

* Requiring input files to have known suffix (.onnx, .json, or .mlir) greatly
simplifies the onnx-mlir.py docker wrapper.

Signed-off-by: Gong Su <[email protected]>

* Return exit code

Signed-off-by: Gong Su <[email protected]>

* Add copyright notice

Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Update protobuf (onnx#1747)

* Update to protobuf 3.20.2

Signed-off-by: Charles Volzka <[email protected]>

* Try 3.18.3

Signed-off-by: Charles Volzka <[email protected]>

Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add the product version and fix formatting

Signed-off-by: Megan Hampton <[email protected]>

* Make updates to product version

Signed-off-by: Megan Hampton <[email protected]>

* further updates

Signed-off-by: Megan Hampton <[email protected]>

* Add product version text file

Signed-off-by: Megan Hampton <[email protected]>

* Removed the memory leaks directly in execution session (onnx#1746)

* removed the memory leaks directly in execution session
Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add support for ArgMin (onnx#1737)

* add support for ArgMin

Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Inclusive terminology update (onnx#1750)

* Update `master` reference to `main` in onnx-mlir doc
* Update rapidcheck to newer commit with inclusive terminology changes
* Update benchmark to 1.6.2 with inclusive terminology changes
* Update pybind11 to 2.10 with inclusive terminology changes

Signed-off-by: Megan Hampton <[email protected]>

* Warning and instructions that --onnx-op-stats needs more than EmitONNXIR (onnx#1719)

Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Move product version text file

Signed-off-by: Megan Hampton <[email protected]>

* Remove comment

Signed-off-by: Megan Hampton <[email protected]>

* Output the product version for the compiler/version

Signed-off-by: Megan Hampton <[email protected]>

* Cleaned up commit of the InferTypes change. (onnx#1753)

Signed-off-by: Brad Messer <[email protected]>

Co-authored-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* setup.py install is deprecated, use pip install instead (onnx#1752)

* setup.py install is deprecated, use pip install instead (see https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for more details).

Signed-off-by: Gong Su <[email protected]>

* - pip install doesn't work for protobuf, revert back to setup.py install
- use --cpp_implementation for better performance

Signed-off-by: Gong Su <[email protected]>

* Update Windows CI

Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* adding reference to onnx-mlir-serving (onnx#1745)

Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* [TOSA] Update type converter and unary ops (onnx#1553)

Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix syntax

Signed-off-by: Megan Hampton <[email protected]>

* Remove strip

Signed-off-by: Megan Hampton <[email protected]>

* Revert "Cleaned up commit of the InferTypes change. (onnx#1753)"

This reverts commit d08c5ac.

Signed-off-by: Megan Hampton <[email protected]>

* Cleaned up commit of the InferTypes change. (onnx#1753)

Signed-off-by: Brad Messer <[email protected]>

Co-authored-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix for GatherND verifier (onnx#1754)

Co-authored-by: Hadi Jooybar <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix OnnxBuilder::concat where axis was not used (onnx#1759)

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Simplify GatherOp when its inputs are dimensions (onnx#1755)

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Assign each question mark a unique negative integer value (onnx#1757)

* Assign each question mark a unique negative integer value

Signed-off-by: Tung D. Le <[email protected]>

* Add a mutex to protect the counter

Signed-off-by: Tung D. Le <[email protected]>

* Using decrement

Signed-off-by: Tung D. Le <[email protected]>

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Change the regex

Signed-off-by: Megan Hampton <[email protected]>

* Fix regex and display product numbers

Signed-off-by: Megan Hampton <[email protected]>

* normalize axis in ScatterElements verify (onnx#1760)

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* redo ArrayRefOrSmallVector with enable_if (onnx#1758)

closes onnx#1729

* redo ArrayRefOrSmallVector with enable_if

attempt to address issue onnx#1729: Build error on Linux

Signed-off-by: Soren Lassen <[email protected]>

* added @qedawkins fix: begin,end -> data,size

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Quinn Dawkins [email protected]
Co-authored-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* fix syntax

Signed-off-by: Megan Hampton <[email protected]>

* Handle scalar tensor tensor<type> in SimplifyShapeRelatesOps pass (onnx#1764)

Signed-off-by: Tung D. Le <[email protected]>

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* namespace cleanup (onnx#1763)

* namespace cleanup

removed `using namespace mlir` from ConstPropHelper.hpp and added
requisite `mlir::` and `llvm::` in header files to get everything
to compile again

also put ConstPropHelper definitions in namespace onnx_mlir

Signed-off-by: Soren Lassen <[email protected]>

* added more missing `mlir/llvm::`

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Signed-off-by: Megan Hampton <[email protected]>

Fix Clang format error

* Make use of the product vendor flag

Signed-off-by: Megan Hampton <[email protected]>

* Address feedback

Signed-off-by: Megan Hampton <[email protected]>

Signed-off-by: Megan Hampton <[email protected]>
Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: Megan Hampton <[email protected]>
Co-authored-by: Soren Lassen <[email protected]>
Co-authored-by: Charles Volzka <[email protected]>
Co-authored-by: Yasushi Negishi <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Co-authored-by: Stella Stamenova <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Co-authored-by: gongsu832 <[email protected]>
Co-authored-by: Meng, Hengyu <[email protected]>
Co-authored-by: Brad Messer <[email protected]>
Co-authored-by: Philipp Braun <[email protected]>
Co-authored-by: Hadi Jooybar <[email protected]>
gargaroff pushed a commit to ljfitz/onnx-mlir that referenced this issue Nov 3, 2022
* update shape inference and test

Signed-off-by: chentong319 <[email protected]>

* lowering

Signed-off-by: chentong319 <[email protected]>

* lowering

Signed-off-by: chentong319 <[email protected]>

* Update onnx-mlir product version (onnx#1727)

* Update onnx-mlir product version

Signed-off-by: Megan Hampton <[email protected]>

* fix einsum decomposition bug (onnx#1730)

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Update version to 0.3.1 (onnx#1728)

Signed-off-by: Megan Hampton <[email protected]>

* Fix issues to compile Yolov3-12. (onnx#1726)

Stop conversion to enable onnx.LeakyRelu on NNPA when the stickified layouts of input and output are not the same.
Signed-off-by: Yasushi Negishi <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* simplified if lowering (onnx#1717)

borrowed ideas from ConvertTrivialIfToSelect from
https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/SCF/IR/SCF.cpp

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add definitions

Signed-off-by: Megan Hampton <[email protected]>

* parse string type from getTypeMap() (onnx#1735)

added a parse lit test that passes with this fix

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* fix 2 compiler warnings (onnx#1736)

* fix sprintf-is-deprecated clang warning

warning from Apple clang version 14.0.0 (clang-1400.0.29.201):
```
.../src/Conversion/ONNXToKrnl/PerfectHash.cpp:47:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
    sprintf(str, "%lld", (long long)val);
/Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
```

Signed-off-by: Soren Lassen <[email protected]>

* fix copy constructor warning

copied solution from InstrumentONNXPass.cpp

fixes compiler warning in Linux CI pipelines:
```
.../src/Transform/ONNX/ConvOpt.cpp: In copy constructor '{anonymous}::ConvOptONNXToONNXPass::ConvOptONNXToONNXPass(const {anonymous}::ConvOptONNXToONNXPass&)':
.../src/Transform/ONNX/ConvOpt.cpp:211:3: warning: base class 'class mlir::PassWrapper<{anonymous}::ConvOptONNXToONNXPass, mlir::OperationPass<mlir::func::FuncOp> >' should be explicitly initialized in the copy constructor [-Wextra]
   ConvOptONNXToONNXPass(const ConvOptONNXToONNXPass &pass) {}
```

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* cleanup some include files (onnx#1733)

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix remaining warnings on Windows and turn on warning-as-error (onnx#1706)

This change applies the remaining fixes needed for warnings to be treated as errors on Windows and then turns them on on Windows only. Of particular interest are a couple of changes:

* The `check-docs` target needs an update to properly parse the directive even when it contains parenthesis in the path. For example: `C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python39_64/python.exe`
* The Windows CI build now builds `onnx` first and then builds all of the targets that are enabled in onnx-mlir. This will make sure that no targets get missed
* The remaining warnings (4927) in `ConstProp.cpp` are fixed as well.

Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix synax

Signed-off-by: Megan Hampton <[email protected]>

* Simplify shape-related operations (onnx#1695)

* Simplify shape-related operations

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* run-onnx-lib script and docs fixes (onnx#1705)

* update documentation for build-run-onnx-lib.sh
* clarified Mac issue with running statically linked version in the directory where model library was built
* moved usage string up to the top of RunONNXLib.cpp, so it's visible next to the top of file block comment,
* allow llvm-project location to be set with LLVM_PROJECT, otherwise read from $MLIR_DIR if defined

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* remove initializedTensors map from ONNX parser (onnx#1739)

instead insert a constant for each initializer in the frontend_symbols_
symbol map

this is better for several reasons:

1. initializedTensors were incorrectly visible to function bodies (in
   TryImportFunctionCallNode)

2. nested bindings didn't hide initializedTensors within their scope

3. it's more efficient to create a constant for each initializer once
   rather than every time an initializer is accessed

4. it's simpler to look up a single symbol mapping

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add decompositions for v11 split, squeeze, and unsqueeze (onnx#1702)

* Add decompositions for v11 split, squeeze, and unsqueeze

Co-authored-by: Roberto DiCecco <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>

* Fix lit test

Signed-off-by: Philip Lassen <[email protected]>

* Add lit tests

Signed-off-by: Philip Lassen <[email protected]>

* Delete unneccesary decomp for unsqueeze

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* factored input shaping into ModelInputShaper (onnx#1740)

* factored input shaping into ModelInputShaper

this makes the it easier to read and understand the input shaping
logic and also makes the rest of the FrontendDialectTransformer
implementation shorter and easier to read

Signed-off-by: Soren Lassen <[email protected]>

* documented public methods

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Ingest all of Opset 16  (onnx#1704)

* Ingest al of opset 16

Signed-off-by: Philip Lassen <[email protected]>

* Delete GridSample test which is no longer relevant

Signed-off-by: Philip Lassen <[email protected]>

* Use NullStringAttr insead of "none" string

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix onnx-mlir.py docker wrapper (onnx#1734)

* Requiring input files to have known suffix (.onnx, .json, or .mlir) greatly
simplifies the onnx-mlir.py docker wrapper.

Signed-off-by: Gong Su <[email protected]>

* Return exit code

Signed-off-by: Gong Su <[email protected]>

* Add copyright notice

Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Update protobuf (onnx#1747)

* Update to protobuf 3.20.2

Signed-off-by: Charles Volzka <[email protected]>

* Try 3.18.3

Signed-off-by: Charles Volzka <[email protected]>

Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add the product version and fix formatting

Signed-off-by: Megan Hampton <[email protected]>

* Make updates to product version

Signed-off-by: Megan Hampton <[email protected]>

* further updates

Signed-off-by: Megan Hampton <[email protected]>

* Add product version text file

Signed-off-by: Megan Hampton <[email protected]>

* Removed the memory leaks directly in execution session (onnx#1746)

* removed the memory leaks directly in execution session
Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add support for ArgMin (onnx#1737)

* add support for ArgMin

Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Inclusive terminology update (onnx#1750)

* Update `master` reference to `main` in onnx-mlir doc
* Update rapidcheck to newer commit with inclusive terminology changes
* Update benchmark to 1.6.2 with inclusive terminology changes
* Update pybind11 to 2.10 with inclusive terminology changes

Signed-off-by: Megan Hampton <[email protected]>

* Warning and instructions that --onnx-op-stats needs more than EmitONNXIR (onnx#1719)

Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Move product version text file

Signed-off-by: Megan Hampton <[email protected]>

* Remove comment

Signed-off-by: Megan Hampton <[email protected]>

* Output the product version for the compiler/version

Signed-off-by: Megan Hampton <[email protected]>

* Cleaned up commit of the InferTypes change. (onnx#1753)

Signed-off-by: Brad Messer <[email protected]>

Co-authored-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* setup.py install is deprecated, use pip install instead (onnx#1752)

* setup.py install is deprecated, use pip install instead (see https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for more details).

Signed-off-by: Gong Su <[email protected]>

* - pip install doesn't work for protobuf, revert back to setup.py install
- use --cpp_implementation for better performance

Signed-off-by: Gong Su <[email protected]>

* Update Windows CI

Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* adding reference to onnx-mlir-serving (onnx#1745)

Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* [TOSA] Update type converter and unary ops (onnx#1553)

Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix syntax

Signed-off-by: Megan Hampton <[email protected]>

* Remove strip

Signed-off-by: Megan Hampton <[email protected]>

* Revert "Cleaned up commit of the InferTypes change. (onnx#1753)"

This reverts commit d08c5ac.

Signed-off-by: Megan Hampton <[email protected]>

* Cleaned up commit of the InferTypes change. (onnx#1753)

Signed-off-by: Brad Messer <[email protected]>

Co-authored-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix for GatherND verifier (onnx#1754)

Co-authored-by: Hadi Jooybar <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix OnnxBuilder::concat where axis was not used (onnx#1759)

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Simplify GatherOp when its inputs are dimensions (onnx#1755)

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Assign each question mark a unique negative integer value (onnx#1757)

* Assign each question mark a unique negative integer value

Signed-off-by: Tung D. Le <[email protected]>

* Add a mutex to protect the counter

Signed-off-by: Tung D. Le <[email protected]>

* Using decrement

Signed-off-by: Tung D. Le <[email protected]>

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Change the regex

Signed-off-by: Megan Hampton <[email protected]>

* Fix regex and display product numbers

Signed-off-by: Megan Hampton <[email protected]>

* normalize axis in ScatterElements verify (onnx#1760)

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* redo ArrayRefOrSmallVector with enable_if (onnx#1758)

closes onnx#1729

* redo ArrayRefOrSmallVector with enable_if

attempt to address issue onnx#1729: Build error on Linux

Signed-off-by: Soren Lassen <[email protected]>

* added @qedawkins fix: begin,end -> data,size

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Quinn Dawkins [email protected]
Co-authored-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* fix syntax

Signed-off-by: Megan Hampton <[email protected]>

* Handle scalar tensor tensor<type> in SimplifyShapeRelatesOps pass (onnx#1764)

Signed-off-by: Tung D. Le <[email protected]>

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* namespace cleanup (onnx#1763)

* namespace cleanup

removed `using namespace mlir` from ConstPropHelper.hpp and added
requisite `mlir::` and `llvm::` in header files to get everything
to compile again

also put ConstPropHelper definitions in namespace onnx_mlir

Signed-off-by: Soren Lassen <[email protected]>

* added more missing `mlir/llvm::`

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Signed-off-by: Megan Hampton <[email protected]>

Fix Clang format error

* Make use of the product vendor flag

Signed-off-by: Megan Hampton <[email protected]>

* Address feedback

Signed-off-by: Megan Hampton <[email protected]>

Signed-off-by: Megan Hampton <[email protected]>
Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: Megan Hampton <[email protected]>
Co-authored-by: Soren Lassen <[email protected]>
Co-authored-by: Charles Volzka <[email protected]>
Co-authored-by: Yasushi Negishi <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Co-authored-by: Stella Stamenova <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Co-authored-by: gongsu832 <[email protected]>
Co-authored-by: Meng, Hengyu <[email protected]>
Co-authored-by: Brad Messer <[email protected]>
Co-authored-by: Philipp Braun <[email protected]>
Co-authored-by: Hadi Jooybar <[email protected]>

* different initial

Signed-off-by: chentong319 <[email protected]>

Signed-off-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>
Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: hamptonm1 <[email protected]>
Co-authored-by: Megan Hampton <[email protected]>
Co-authored-by: Soren Lassen <[email protected]>
Co-authored-by: Charles Volzka <[email protected]>
Co-authored-by: Yasushi Negishi <[email protected]>
Co-authored-by: Stella Stamenova <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Co-authored-by: gongsu832 <[email protected]>
Co-authored-by: Meng, Hengyu <[email protected]>
Co-authored-by: Brad Messer <[email protected]>
Co-authored-by: Philipp Braun <[email protected]>
Co-authored-by: Hadi Jooybar <[email protected]>
gargaroff pushed a commit to ljfitz/onnx-mlir that referenced this issue Nov 8, 2022
* Update onnx-mlir product version

Signed-off-by: Megan Hampton <[email protected]>

* fix einsum decomposition bug (onnx#1730)

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Update version to 0.3.1 (onnx#1728)

Signed-off-by: Megan Hampton <[email protected]>

* Fix issues to compile Yolov3-12. (onnx#1726)

Stop conversion to enable onnx.LeakyRelu on NNPA when the stickified layouts of input and output are not the same.
Signed-off-by: Yasushi Negishi <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* simplified if lowering (onnx#1717)

borrowed ideas from ConvertTrivialIfToSelect from
https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/SCF/IR/SCF.cpp

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add definitions

Signed-off-by: Megan Hampton <[email protected]>

* parse string type from getTypeMap() (onnx#1735)

added a parse lit test that passes with this fix

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* fix 2 compiler warnings (onnx#1736)

* fix sprintf-is-deprecated clang warning

warning from Apple clang version 14.0.0 (clang-1400.0.29.201):
```
.../src/Conversion/ONNXToKrnl/PerfectHash.cpp:47:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
    sprintf(str, "%lld", (long long)val);
/Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
```

Signed-off-by: Soren Lassen <[email protected]>

* fix copy constructor warning

copied solution from InstrumentONNXPass.cpp

fixes compiler warning in Linux CI pipelines:
```
.../src/Transform/ONNX/ConvOpt.cpp: In copy constructor '{anonymous}::ConvOptONNXToONNXPass::ConvOptONNXToONNXPass(const {anonymous}::ConvOptONNXToONNXPass&)':
.../src/Transform/ONNX/ConvOpt.cpp:211:3: warning: base class 'class mlir::PassWrapper<{anonymous}::ConvOptONNXToONNXPass, mlir::OperationPass<mlir::func::FuncOp> >' should be explicitly initialized in the copy constructor [-Wextra]
   ConvOptONNXToONNXPass(const ConvOptONNXToONNXPass &pass) {}
```

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* cleanup some include files (onnx#1733)

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix remaining warnings on Windows and turn on warning-as-error (onnx#1706)

This change applies the remaining fixes needed for warnings to be treated as errors on Windows and then turns them on on Windows only. Of particular interest are a couple of changes:

* The `check-docs` target needs an update to properly parse the directive even when it contains parenthesis in the path. For example: `C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python39_64/python.exe`
* The Windows CI build now builds `onnx` first and then builds all of the targets that are enabled in onnx-mlir. This will make sure that no targets get missed
* The remaining warnings (4927) in `ConstProp.cpp` are fixed as well.

Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix synax

Signed-off-by: Megan Hampton <[email protected]>

* Simplify shape-related operations (onnx#1695)

* Simplify shape-related operations

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* run-onnx-lib script and docs fixes (onnx#1705)

* update documentation for build-run-onnx-lib.sh
* clarified Mac issue with running statically linked version in the directory where model library was built
* moved usage string up to the top of RunONNXLib.cpp, so it's visible next to the top of file block comment,
* allow llvm-project location to be set with LLVM_PROJECT, otherwise read from $MLIR_DIR if defined

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* remove initializedTensors map from ONNX parser (onnx#1739)

instead insert a constant for each initializer in the frontend_symbols_
symbol map

this is better for several reasons:

1. initializedTensors were incorrectly visible to function bodies (in
   TryImportFunctionCallNode)

2. nested bindings didn't hide initializedTensors within their scope

3. it's more efficient to create a constant for each initializer once
   rather than every time an initializer is accessed

4. it's simpler to look up a single symbol mapping

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add decompositions for v11 split, squeeze, and unsqueeze (onnx#1702)

* Add decompositions for v11 split, squeeze, and unsqueeze

Co-authored-by: Roberto DiCecco <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>

* Fix lit test

Signed-off-by: Philip Lassen <[email protected]>

* Add lit tests

Signed-off-by: Philip Lassen <[email protected]>

* Delete unneccesary decomp for unsqueeze

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* factored input shaping into ModelInputShaper (onnx#1740)

* factored input shaping into ModelInputShaper

this makes the it easier to read and understand the input shaping
logic and also makes the rest of the FrontendDialectTransformer
implementation shorter and easier to read

Signed-off-by: Soren Lassen <[email protected]>

* documented public methods

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Ingest all of Opset 16  (onnx#1704)

* Ingest al of opset 16

Signed-off-by: Philip Lassen <[email protected]>

* Delete GridSample test which is no longer relevant

Signed-off-by: Philip Lassen <[email protected]>

* Use NullStringAttr insead of "none" string

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix onnx-mlir.py docker wrapper (onnx#1734)

* Requiring input files to have known suffix (.onnx, .json, or .mlir) greatly
simplifies the onnx-mlir.py docker wrapper.

Signed-off-by: Gong Su <[email protected]>

* Return exit code

Signed-off-by: Gong Su <[email protected]>

* Add copyright notice

Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Update protobuf (onnx#1747)

* Update to protobuf 3.20.2

Signed-off-by: Charles Volzka <[email protected]>

* Try 3.18.3

Signed-off-by: Charles Volzka <[email protected]>

Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add the product version and fix formatting

Signed-off-by: Megan Hampton <[email protected]>

* Make updates to product version

Signed-off-by: Megan Hampton <[email protected]>

* further updates

Signed-off-by: Megan Hampton <[email protected]>

* Add product version text file

Signed-off-by: Megan Hampton <[email protected]>

* Removed the memory leaks directly in execution session (onnx#1746)

* removed the memory leaks directly in execution session
Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add support for ArgMin (onnx#1737)

* add support for ArgMin

Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Inclusive terminology update (onnx#1750)

* Update `master` reference to `main` in onnx-mlir doc
* Update rapidcheck to newer commit with inclusive terminology changes
* Update benchmark to 1.6.2 with inclusive terminology changes
* Update pybind11 to 2.10 with inclusive terminology changes

Signed-off-by: Megan Hampton <[email protected]>

* Warning and instructions that --onnx-op-stats needs more than EmitONNXIR (onnx#1719)

Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Move product version text file

Signed-off-by: Megan Hampton <[email protected]>

* Remove comment

Signed-off-by: Megan Hampton <[email protected]>

* Output the product version for the compiler/version

Signed-off-by: Megan Hampton <[email protected]>

* Cleaned up commit of the InferTypes change. (onnx#1753)

Signed-off-by: Brad Messer <[email protected]>

Co-authored-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* setup.py install is deprecated, use pip install instead (onnx#1752)

* setup.py install is deprecated, use pip install instead (see https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for more details).

Signed-off-by: Gong Su <[email protected]>

* - pip install doesn't work for protobuf, revert back to setup.py install
- use --cpp_implementation for better performance

Signed-off-by: Gong Su <[email protected]>

* Update Windows CI

Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* adding reference to onnx-mlir-serving (onnx#1745)

Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* [TOSA] Update type converter and unary ops (onnx#1553)

Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix syntax

Signed-off-by: Megan Hampton <[email protected]>

* Remove strip

Signed-off-by: Megan Hampton <[email protected]>

* Revert "Cleaned up commit of the InferTypes change. (onnx#1753)"

This reverts commit d08c5ac.

Signed-off-by: Megan Hampton <[email protected]>

* Cleaned up commit of the InferTypes change. (onnx#1753)

Signed-off-by: Brad Messer <[email protected]>

Co-authored-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix for GatherND verifier (onnx#1754)

Co-authored-by: Hadi Jooybar <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix OnnxBuilder::concat where axis was not used (onnx#1759)

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Simplify GatherOp when its inputs are dimensions (onnx#1755)

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Assign each question mark a unique negative integer value (onnx#1757)

* Assign each question mark a unique negative integer value

Signed-off-by: Tung D. Le <[email protected]>

* Add a mutex to protect the counter

Signed-off-by: Tung D. Le <[email protected]>

* Using decrement

Signed-off-by: Tung D. Le <[email protected]>

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Change the regex

Signed-off-by: Megan Hampton <[email protected]>

* Fix regex and display product numbers

Signed-off-by: Megan Hampton <[email protected]>

* normalize axis in ScatterElements verify (onnx#1760)

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* redo ArrayRefOrSmallVector with enable_if (onnx#1758)

closes onnx#1729

* redo ArrayRefOrSmallVector with enable_if

attempt to address issue onnx#1729: Build error on Linux

Signed-off-by: Soren Lassen <[email protected]>

* added @qedawkins fix: begin,end -> data,size

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Quinn Dawkins [email protected]
Co-authored-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* fix syntax

Signed-off-by: Megan Hampton <[email protected]>

* Handle scalar tensor tensor<type> in SimplifyShapeRelatesOps pass (onnx#1764)

Signed-off-by: Tung D. Le <[email protected]>

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* namespace cleanup (onnx#1763)

* namespace cleanup

removed `using namespace mlir` from ConstPropHelper.hpp and added
requisite `mlir::` and `llvm::` in header files to get everything
to compile again

also put ConstPropHelper definitions in namespace onnx_mlir

Signed-off-by: Soren Lassen <[email protected]>

* added more missing `mlir/llvm::`

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Signed-off-by: Megan Hampton <[email protected]>

Fix Clang format error

* Make use of the product vendor flag

Signed-off-by: Megan Hampton <[email protected]>

* Address feedback

Signed-off-by: Megan Hampton <[email protected]>

Signed-off-by: Megan Hampton <[email protected]>
Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: Megan Hampton <[email protected]>
Co-authored-by: Soren Lassen <[email protected]>
Co-authored-by: Charles Volzka <[email protected]>
Co-authored-by: Yasushi Negishi <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Co-authored-by: Stella Stamenova <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Co-authored-by: gongsu832 <[email protected]>
Co-authored-by: Meng, Hengyu <[email protected]>
Co-authored-by: Brad Messer <[email protected]>
Co-authored-by: Philipp Braun <[email protected]>
Co-authored-by: Hadi Jooybar <[email protected]>
gargaroff pushed a commit to ljfitz/onnx-mlir that referenced this issue Nov 8, 2022
* update shape inference and test

Signed-off-by: chentong319 <[email protected]>

* lowering

Signed-off-by: chentong319 <[email protected]>

* lowering

Signed-off-by: chentong319 <[email protected]>

* Update onnx-mlir product version (onnx#1727)

* Update onnx-mlir product version

Signed-off-by: Megan Hampton <[email protected]>

* fix einsum decomposition bug (onnx#1730)

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Update version to 0.3.1 (onnx#1728)

Signed-off-by: Megan Hampton <[email protected]>

* Fix issues to compile Yolov3-12. (onnx#1726)

Stop conversion to enable onnx.LeakyRelu on NNPA when the stickified layouts of input and output are not the same.
Signed-off-by: Yasushi Negishi <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* simplified if lowering (onnx#1717)

borrowed ideas from ConvertTrivialIfToSelect from
https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/SCF/IR/SCF.cpp

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add definitions

Signed-off-by: Megan Hampton <[email protected]>

* parse string type from getTypeMap() (onnx#1735)

added a parse lit test that passes with this fix

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* fix 2 compiler warnings (onnx#1736)

* fix sprintf-is-deprecated clang warning

warning from Apple clang version 14.0.0 (clang-1400.0.29.201):
```
.../src/Conversion/ONNXToKrnl/PerfectHash.cpp:47:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
    sprintf(str, "%lld", (long long)val);
/Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
```

Signed-off-by: Soren Lassen <[email protected]>

* fix copy constructor warning

copied solution from InstrumentONNXPass.cpp

fixes compiler warning in Linux CI pipelines:
```
.../src/Transform/ONNX/ConvOpt.cpp: In copy constructor '{anonymous}::ConvOptONNXToONNXPass::ConvOptONNXToONNXPass(const {anonymous}::ConvOptONNXToONNXPass&)':
.../src/Transform/ONNX/ConvOpt.cpp:211:3: warning: base class 'class mlir::PassWrapper<{anonymous}::ConvOptONNXToONNXPass, mlir::OperationPass<mlir::func::FuncOp> >' should be explicitly initialized in the copy constructor [-Wextra]
   ConvOptONNXToONNXPass(const ConvOptONNXToONNXPass &pass) {}
```

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* cleanup some include files (onnx#1733)

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix remaining warnings on Windows and turn on warning-as-error (onnx#1706)

This change applies the remaining fixes needed for warnings to be treated as errors on Windows and then turns them on on Windows only. Of particular interest are a couple of changes:

* The `check-docs` target needs an update to properly parse the directive even when it contains parenthesis in the path. For example: `C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python39_64/python.exe`
* The Windows CI build now builds `onnx` first and then builds all of the targets that are enabled in onnx-mlir. This will make sure that no targets get missed
* The remaining warnings (4927) in `ConstProp.cpp` are fixed as well.

Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix synax

Signed-off-by: Megan Hampton <[email protected]>

* Simplify shape-related operations (onnx#1695)

* Simplify shape-related operations

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* run-onnx-lib script and docs fixes (onnx#1705)

* update documentation for build-run-onnx-lib.sh
* clarified Mac issue with running statically linked version in the directory where model library was built
* moved usage string up to the top of RunONNXLib.cpp, so it's visible next to the top of file block comment,
* allow llvm-project location to be set with LLVM_PROJECT, otherwise read from $MLIR_DIR if defined

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* remove initializedTensors map from ONNX parser (onnx#1739)

instead insert a constant for each initializer in the frontend_symbols_
symbol map

this is better for several reasons:

1. initializedTensors were incorrectly visible to function bodies (in
   TryImportFunctionCallNode)

2. nested bindings didn't hide initializedTensors within their scope

3. it's more efficient to create a constant for each initializer once
   rather than every time an initializer is accessed

4. it's simpler to look up a single symbol mapping

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add decompositions for v11 split, squeeze, and unsqueeze (onnx#1702)

* Add decompositions for v11 split, squeeze, and unsqueeze

Co-authored-by: Roberto DiCecco <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>

* Fix lit test

Signed-off-by: Philip Lassen <[email protected]>

* Add lit tests

Signed-off-by: Philip Lassen <[email protected]>

* Delete unneccesary decomp for unsqueeze

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* factored input shaping into ModelInputShaper (onnx#1740)

* factored input shaping into ModelInputShaper

this makes the it easier to read and understand the input shaping
logic and also makes the rest of the FrontendDialectTransformer
implementation shorter and easier to read

Signed-off-by: Soren Lassen <[email protected]>

* documented public methods

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Ingest all of Opset 16  (onnx#1704)

* Ingest al of opset 16

Signed-off-by: Philip Lassen <[email protected]>

* Delete GridSample test which is no longer relevant

Signed-off-by: Philip Lassen <[email protected]>

* Use NullStringAttr insead of "none" string

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix onnx-mlir.py docker wrapper (onnx#1734)

* Requiring input files to have known suffix (.onnx, .json, or .mlir) greatly
simplifies the onnx-mlir.py docker wrapper.

Signed-off-by: Gong Su <[email protected]>

* Return exit code

Signed-off-by: Gong Su <[email protected]>

* Add copyright notice

Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Update protobuf (onnx#1747)

* Update to protobuf 3.20.2

Signed-off-by: Charles Volzka <[email protected]>

* Try 3.18.3

Signed-off-by: Charles Volzka <[email protected]>

Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add the product version and fix formatting

Signed-off-by: Megan Hampton <[email protected]>

* Make updates to product version

Signed-off-by: Megan Hampton <[email protected]>

* further updates

Signed-off-by: Megan Hampton <[email protected]>

* Add product version text file

Signed-off-by: Megan Hampton <[email protected]>

* Removed the memory leaks directly in execution session (onnx#1746)

* removed the memory leaks directly in execution session
Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Add support for ArgMin (onnx#1737)

* add support for ArgMin

Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Inclusive terminology update (onnx#1750)

* Update `master` reference to `main` in onnx-mlir doc
* Update rapidcheck to newer commit with inclusive terminology changes
* Update benchmark to 1.6.2 with inclusive terminology changes
* Update pybind11 to 2.10 with inclusive terminology changes

Signed-off-by: Megan Hampton <[email protected]>

* Warning and instructions that --onnx-op-stats needs more than EmitONNXIR (onnx#1719)

Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Move product version text file

Signed-off-by: Megan Hampton <[email protected]>

* Remove comment

Signed-off-by: Megan Hampton <[email protected]>

* Output the product version for the compiler/version

Signed-off-by: Megan Hampton <[email protected]>

* Cleaned up commit of the InferTypes change. (onnx#1753)

Signed-off-by: Brad Messer <[email protected]>

Co-authored-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* setup.py install is deprecated, use pip install instead (onnx#1752)

* setup.py install is deprecated, use pip install instead (see https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for more details).

Signed-off-by: Gong Su <[email protected]>

* - pip install doesn't work for protobuf, revert back to setup.py install
- use --cpp_implementation for better performance

Signed-off-by: Gong Su <[email protected]>

* Update Windows CI

Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* adding reference to onnx-mlir-serving (onnx#1745)

Signed-off-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* [TOSA] Update type converter and unary ops (onnx#1553)

Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix syntax

Signed-off-by: Megan Hampton <[email protected]>

* Remove strip

Signed-off-by: Megan Hampton <[email protected]>

* Revert "Cleaned up commit of the InferTypes change. (onnx#1753)"

This reverts commit d08c5ac.

Signed-off-by: Megan Hampton <[email protected]>

* Cleaned up commit of the InferTypes change. (onnx#1753)

Signed-off-by: Brad Messer <[email protected]>

Co-authored-by: Soren Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix for GatherND verifier (onnx#1754)

Co-authored-by: Hadi Jooybar <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Fix OnnxBuilder::concat where axis was not used (onnx#1759)

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Simplify GatherOp when its inputs are dimensions (onnx#1755)

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Assign each question mark a unique negative integer value (onnx#1757)

* Assign each question mark a unique negative integer value

Signed-off-by: Tung D. Le <[email protected]>

* Add a mutex to protect the counter

Signed-off-by: Tung D. Le <[email protected]>

* Using decrement

Signed-off-by: Tung D. Le <[email protected]>

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Change the regex

Signed-off-by: Megan Hampton <[email protected]>

* Fix regex and display product numbers

Signed-off-by: Megan Hampton <[email protected]>

* normalize axis in ScatterElements verify (onnx#1760)

Signed-off-by: Philip Lassen <[email protected]>

Signed-off-by: Philip Lassen <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* redo ArrayRefOrSmallVector with enable_if (onnx#1758)

closes onnx#1729

* redo ArrayRefOrSmallVector with enable_if

attempt to address issue onnx#1729: Build error on Linux

Signed-off-by: Soren Lassen <[email protected]>

* added @qedawkins fix: begin,end -> data,size

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Quinn Dawkins [email protected]
Co-authored-by: Philip Lassen <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* fix syntax

Signed-off-by: Megan Hampton <[email protected]>

* Handle scalar tensor tensor<type> in SimplifyShapeRelatesOps pass (onnx#1764)

Signed-off-by: Tung D. Le <[email protected]>

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* namespace cleanup (onnx#1763)

* namespace cleanup

removed `using namespace mlir` from ConstPropHelper.hpp and added
requisite `mlir::` and `llvm::` in header files to get everything
to compile again

also put ConstPropHelper definitions in namespace onnx_mlir

Signed-off-by: Soren Lassen <[email protected]>

* added more missing `mlir/llvm::`

Signed-off-by: Soren Lassen <[email protected]>

Signed-off-by: Soren Lassen <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>

* Signed-off-by: Megan Hampton <[email protected]>

Fix Clang format error

* Make use of the product vendor flag

Signed-off-by: Megan Hampton <[email protected]>

* Address feedback

Signed-off-by: Megan Hampton <[email protected]>

Signed-off-by: Megan Hampton <[email protected]>
Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: Megan Hampton <[email protected]>
Co-authored-by: Soren Lassen <[email protected]>
Co-authored-by: Charles Volzka <[email protected]>
Co-authored-by: Yasushi Negishi <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Co-authored-by: Stella Stamenova <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Co-authored-by: gongsu832 <[email protected]>
Co-authored-by: Meng, Hengyu <[email protected]>
Co-authored-by: Brad Messer <[email protected]>
Co-authored-by: Philipp Braun <[email protected]>
Co-authored-by: Hadi Jooybar <[email protected]>

* different initial

Signed-off-by: chentong319 <[email protected]>

Signed-off-by: chentong319 <[email protected]>
Signed-off-by: Megan Hampton <[email protected]>
Signed-off-by: Soren Lassen <[email protected]>
Signed-off-by: Stella Stamenova <[email protected]>
Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Philip Lassen <[email protected]>
Signed-off-by: Gong Su <[email protected]>
Signed-off-by: Charles Volzka <[email protected]>
Signed-off-by: Hengyu Meng <[email protected]>
Signed-off-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Philipp Braun <[email protected]>
Co-authored-by: hamptonm1 <[email protected]>
Co-authored-by: Megan Hampton <[email protected]>
Co-authored-by: Soren Lassen <[email protected]>
Co-authored-by: Charles Volzka <[email protected]>
Co-authored-by: Yasushi Negishi <[email protected]>
Co-authored-by: Stella Stamenova <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Co-authored-by: Roberto DiCecco <[email protected]>
Co-authored-by: gongsu832 <[email protected]>
Co-authored-by: Meng, Hengyu <[email protected]>
Co-authored-by: Brad Messer <[email protected]>
Co-authored-by: Philipp Braun <[email protected]>
Co-authored-by: Hadi Jooybar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants