* Update C++ standard to C++17
LLVM has switched to C++17 in its development branch. Follow suit to be
able to compile LLVM headers.
* Clang 8.0+ also supports -faligned-new
* Make make verbose
* Use CMAKE_OSX_DEPLOYMENT_TARGET to set minimum macOS version (10.12)
* Update llvmdev version in conda to >= 11
Something seems to be wrong with the llvmdev 10.0.0 packages, since the
LLVM unit test fails on Windows. It works fine when LLVM 10 is compiled
from sources.
* [Python] Populate setuptools description with README.md
Adds the description metadata for the setuptools descriptor file
`setup.py` with the contents of our existing README.md, which is
a common practice.
* Update python/setup.py
Co-authored-by: driazati <9407960+driazati@users.noreply.github.com>
* Update python/setup.py
Co-authored-by: driazati <9407960+driazati@users.noreply.github.com>
* Import pathlib and apply black formats.
Co-authored-by: driazati <9407960+driazati@users.noreply.github.com>
Add the `configs` directory to be part of the installed version of
TVM in the setuptools configuration, and introduce a new function
to load the `configs` directory from the right paths both when TVM
is locally installed for development, as well as, when it is installed
as a package.
* When using a packaged TVM such as tlcpack, it is impossible to run
`tvm.micro.get_standalone_crt_dir()`, because the subtree
`standalone_crt/` is not available.
* This patch adds `standalone_crt/` as `data_files`, so that they
can be picked up by _ffi.libinfo.find_lib_path() and therefore
be found when `tvm.micro.get_standalone_crt_dir()` is invoked.
* Generate requirements.txt from Python spec.
* add tests, collect actual requirements (first cut).
* add tornado and cloudpickle
* add xgboost
* add xgboost version restriction
* cleanup and prepare for merge
* black format
* add type annotations and docstrings
* remove example requirements.txt
* fix setup.py extras_require
* use typing. classes for type annotations, python 2 compatible :)
* fix python2 typing.Pattern
* retrigger CI
* address comaniac comments
* retrigger ci
* [VERSION] Enhance version.py to support git-describe.
This PR enhances version.py with a --git-descrbe option
which allows it to generate a git describe based version
tag for potential dev related nightly packaging during the
development cycle.
The behavior of the normal relase remains the same.
Note that the version.py still modifies the files inplace
and we only recommend using it during a clean clone based workflow.
The setup.py is also updated to take advantage of the version.
Note that the git info is already captured by the c++ side in a previous PR.
The tool is mainly used to create PEP compatible python wheels.
* Update per comment
This PR introduces a minimal set of test cases that
are supposed to run in all platforms during CI.
The set of testcases are supposed to help on
platform dependent regression.
See tests/python/all-platform-minimal-test/README.md for guidelines.
- Enable windows mac LLVM build via conda with cython support.
- Test on all platform test cases.
- Update implementation to improve MSVC support.
* Add code from livestream with JK
* Fix errors parsing ResNet
* Parse metadata section efficiently and do most of plumbing to resolve metadata section references.
* WIP
* Change meta reference to an operator
* Meta references now work
* MetaReference expansion now works
* Start working on source map and move diagnostic context
* Convert tokenizer and parser to use new machinery
* Kill to_json
* Fix comment in type_infer.cc
* Remove old parser
* Rename parser tests and remove old ones
* Record span end information
* Convert to using spans everywhere
* Add span fields back to all Relay constructors
* Start passing spans
* Pass spans around visitors
* Format
* Fix
* Fix
* disable reference lint from string helpers
* Fix tokenizer
* Fix issue with empty metadata section
* Document new span fields and small tweaks
* Formatting
* Add span doc fields
* Add format tweak
* Improve errors and fix the semantic version tags in Prelude
* Update gradient.rly
* Clean up broken spans
* Clean up parser tests and turn on previously skipped tests
* Update errors to handle skipped cases
* Tweak
* Tweak
* Format
* Fix some minor issues with ADT tests
* Format
* Fix path
* WIP
* WIP
* Fix ir_text_printer
* format
* Formatted
* More formatting
* Repair test cases
* Fix CI
* Retrigger CI
* [RUNTIME] Allow non-nullable ObjectRef, introduce Optional<T>.
We use ObjectRef and their sub-classes extensively throughout our codebase.
Each of ObjectRef's sub-classes are nullable, which means they can hold nullptr
as their values.
While in some places we need nullptr as an alternative value. The implicit support
for nullptr in all ObjectRef creates additional burdens for the developer
to explicitly check defined in many places of the codebase.
Moreover, it is unclear from the API's intentional point of view whether
we want a nullable object or not-null version(many cases we want the later).
Borrowing existing wisdoms from languages like Rust. We propose to
introduce non-nullable ObjectRef, and Optional<T> container that
represents a nullable variant.
To keep backward compatiblity, we will start by allowing most ObjectRef to be nullable.
However, we should start to use Optional<T> as the type in places where
we know nullable is a requirement. Gradually, we will move most of the ObjectRef
to be non-nullable and use Optional<T> in the nullable cases.
Such explicitness in typing can help reduce the potential problems
in our codebase overall.
Changes in this PR:
- Introduce _type_is_nullable attribute to ObjectRef
- Introduce Optional<T>
- Change String to be non-nullable.
- Change the API of function->GetAttr to return Optional<T>
* Address review comments
* Upgrade all compiler flags to c++14
* Update as per review comment
* As a result of backwards incompatible changes released in pillow 7.0,
torchvision crashes if you just "pip install pillow", as we do in
a few places.
* This patch sets pillow<7 to be installed in Dockerfiles and support
material as tutorials and documentation.
* [REFACTOR][RUNTIME] Move NDArray to Object System.
Previously NDArray has its own object reference counting mechanism.
This PR migrates NDArray to the unified object protocol.
The calling convention of NDArray remained intact.
That means NDArray still has its own type_code and
its handle is still DLTensor compatible.
In order to do so, this PR added a few minimum runtime type
detection in TVMArgValue and RetValue only when the corresponding
type is a base type(ObjectRef) that could also refer to NDArray.
This means that even if we return a base reference object ObjectRef
which refers to the NDArray. The type_code will still be translated
correctly as kNDArrayContainer.
If we assign a non-base type(say Expr) that we know is not compatible
with NDArray during compile time, no runtime type detection will be performed.
This PR also adopts the object protocol for NDArray sub-classing and
removed the legacy NDArray subclass protocol.
Examples in apps/extension are now updated to reflect that.
Making NDArray as an Object brings all the benefits of the object system.
For example, we can now use the Array container to store NDArrays.
* Address review comments