Commit Graph

49 Commits

Author SHA1 Message Date
Zhengqiang Yin af4373f2fb [Fix] fix python setup.py file bug (#12000)
* fix setup.py bug

Signed-off-by: Zhengqiang Yin <codle@outlook.com>

* remove data_files field

* keep a init setup_kwargs
2022-07-07 14:38:27 -05:00
Leandro Nunes 4330c21888 [Python] Populate setuptools description with README.md (#11078)
* [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>
2022-04-25 17:39:35 -07:00
Leandro Nunes 970f868272 [TVMC] Add configuration json files to the Python package (#11063)
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.
2022-04-20 14:22:36 +01:00
Mehrdad Hessar 54019b9436 [microTVM] Add microTVM Template Projects to tlcpack pip Package (#9309)
* zephyr lib fixed

* restructure

* readme

* add arduino

* add project template to setup.py

* fix lint

* fix tutorial

* address comments from PR9274
2021-11-01 17:16:23 +00:00
Leandro Nunes 8ced546539 Fix line break in setup.py (#9029) 2021-09-17 10:16:57 +09:00
Leandro Nunes 2aebd3335d Add standalone_crt/ to be part of the wheel package, when available. (#9005)
* 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.
2021-09-15 10:57:11 -07:00
Raghav-Chakravarthy 5bb01ef8ea fix typo (#8484)
* fix typo

* Fixed typos in documentation
2021-07-15 23:08:10 -07:00
Tristan Konolige c976a07fa2 [RUNTIME] Add libbacktrace for backtraces with line numbers (#7153)
* [RUNTIME] Add libbacktrace for backtraces with line numbers

Co-authored-by: Robert Kimball <bobkimball@gmail.com>
2021-03-18 09:08:08 -04:00
Andrew Reusch 1de98be591 Generate requirements.txt from Python spec (#7289)
* 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
2021-02-04 06:51:12 -08:00
Tianqi Chen 926a315372 [DOCS] Update to reflect the repo name change (#6967) 2020-11-24 12:28:36 -05:00
Tristan Konolige d164aac058 [TVMSCRIPT] Using diagnostics for TVM Script (#6797)
* [TVMSCRIPT] Using diagnostics for TVM Script

* fix lint

* More documentation, improve some error messages

* Apply suggestions from code review

Co-authored-by: Leandro Nunes <leandron85@gmail.com>

* Add synr to ci setup and setup.py

* remove typed_ast dependency

Co-authored-by: Leandro Nunes <leandron85@gmail.com>
2020-11-05 19:24:32 -05:00
Tianqi Chen c8064b3ca6 [REFACTOR] Remainings of util => utils (#6778) 2020-10-29 13:46:31 -04:00
Tianqi Chen fb7aafd993 [VERSION] Enhance version.py to support git-describe. (#6757)
* [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
2020-10-26 15:42:47 -04:00
Tianqi Chen c6f18250e1 [CI] Introduce all platform test for windows/mac/linux. (#6756)
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.
2020-10-25 19:27:29 -04:00
Leandro Nunes 292b640f13 [tvmc] command line driver 'compile' (part 2/4) (#6302)
* [tvmc] command line driver 'compile' (part 2/4)

 * Add 'compile' subcommand into tvmc (tvm.driver.tvmc)
 * Add frontends: Keras, ONNX, TensorFlow, tflite, PyTorch
 * Add tests for the 'compile' subcommand
 * Enable command line driver tests as part of integration tests
 * Skip tests if the cross-compilation toolchain is not installed


Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Matthew Barrett <matthew.barrett@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>

* tvmc: adjust TODOs

* tvmc: fix linting errors

* Address code-review comments

* Adjust pytest fixture to not break when there is no tensorflow

* Fix frontend tests, to cope with different frameworks in different images

* Apply suggestions from code review

Co-authored-by: Cody Yu <comaniac0422@gmail.com>

* Fix lint and code-review issues

* Re-format with black.

* tvmc: Move dependencies to extras_requires

Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>
Co-authored-by: Cody Yu <comaniac0422@gmail.com>
2020-09-18 11:37:13 -07:00
Jared Roesch f13fed55cf [Format] Convert all Python code w/o CI (#6448)
* Add black setup

* Tweak pyproject.toml

* Fix syntax issues

* Fix

* Tweak

* Black all Python code
2020-09-11 22:17:24 +09:00
Haichen Shen 9a42cb63d2 add missing dependency (#6375) 2020-09-01 21:46:19 -07:00
Leandro Nunes 36d1ed33ee TVMC - a command line driver for TVM (#6112)
* Introduce a command line driver to compile, run and tune models, using TVM graph runtime
 * Include tvmc tests and integrate tvmc with linting, testing and CI
 * RFC: https://discuss.tvm.ai/t/rfc-a-tvm-command-line-interface/5165


Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Matthew Barrett <matthew.barrett@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>

Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>
2020-08-16 10:45:44 -07:00
Jared Roesch fa2213f0ae [Parser] Parser 2.0 part 2 (#6162)
* 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
2020-08-11 16:31:03 -07:00
Philip Hyunsu Cho 3827cd044d Upgrade XGBoost to latest (#5658) 2020-05-22 19:40:46 -07:00
Bing Xu 3f03869e6b [Blocksparse] Pipeline for lowering dense model to sparse-dense (#5377) 2020-04-20 01:15:37 -04:00
Tianqi Chen fc75de9d68 [RUNTIME][IR] Allow non-nullable ObjectRef, introduce Optional<T>. (#5314)
* [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
2020-04-13 10:49:48 -07:00
Leandro Nunes 09ddc3eb98 Pin xgboost dependency version to 0.90 (#4965)
* Sets xgboost dependency to be 0.90, preventing
   segfaults during TVM python unit tests execution

 * This is discussed in issue #4953
2020-03-02 19:41:31 -08:00
abergeron cfbecc5a74 Also package core.rly (#4679) 2020-01-10 14:04:15 -08:00
Leandro Nunes d93e1dca81 Pin python pillow to "<7" due to torchvision 1.2.0 dependency issue (#4632)
* 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.
2020-01-06 08:31:07 -08:00
Tianqi Chen 55bd786fe2 [REFACTOR][RUNTIME] Update NDArray use the Unified Object System (#4581)
* [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
2019-12-29 22:16:27 -08:00
lhutton1 603280bf6f PIL is depreciated and should be replaced with pillow (a fork of PIL) (#4533)
Change-Id: If2075df5475505f2da87dae7145af5a7ab83d8a4
2019-12-17 09:55:32 -08:00
Neo Chien 2ed39e9183 [SETUP] Add optional dependencies to extras_require (#4428) 2019-11-26 09:48:24 -08:00
Tianqi Chen 86b844b995 [DOCS] Update link loc (#4257) 2019-11-05 16:03:04 -08:00
Wei Chen 31b47c84b3 [Relay] Install Relay Prelude program in package install (#4227) 2019-10-30 15:54:56 -07:00
Bing Xu aa7bf34cda [dep] psutil (#3780) 2019-08-21 05:45:18 +08:00
Jared Roesch dd55682dcd [Relay][Runtime] Add support for virtual machine Objects (#3120) 2019-05-02 09:54:52 -04:00
Tianqi Chen cffb4fba03 [HEADER] Add Header to Comply with ASF Release Policy (#2982)
* [HEADER] ASF header dir=include

* [HEADER] ASF Header dir=src

* [HEADER] ASF Header -dir=python

* [HEADER] ASF header dir=topi

* [HEADER] ASF Header dir=nnvm

* [HEADER] ASF Header -dir=tutorials

* [HEADER] ASF Header dir=tests

* [HEADER] ASF Header -dir=docker

* fix whitespace

* [HEADER] ASF Header -dir=jvm

* [HEADER] ASF Header -dir=web

* [HEADER] ASF Header --dir=apps

* [HEADER] ASF Header --dir=vta

* [HEADER] ASF Header -dir=go

* temp

* [HEADER] ASF Header --dir=rust

* [HEADER] Add ASF Header --dir=cmake

* [HEADER] ASF Header --dir=docs

* [HEADER] Header for Jenkinsfile

* [HEADER] ASF Header to toml and md

* [HEADER] ASF Header to gradle

* Finalize rat cleanup

* Fix permission

* Fix java test

* temporary remove nnvm onnx test
2019-04-07 21:14:02 -07:00
Bing Xu 7c12495097 [Python dep] Add missing dep pkg for relay (#2568) 2019-02-05 21:44:56 -06:00
Lianmin Zheng bde53033bd [RUNTIME] Add fp16/fp32 conversion functions (#1766) 2018-09-24 20:13:34 -07:00
Tatsuya Nishiyama 3d0d96c81e Fix runtime error on osx (#1449) 2018-07-18 20:59:37 -07:00
abergeron 2a1c2ba9bc Fix conda package builds (#1445) 2018-07-17 13:45:08 -07:00
Clouds d1cdb623c3 Update setup.py (#803)
fix errors when running `python3 setup.py sdist bdist_wheel`
2018-01-22 10:00:08 -08:00
Tianqi Chen 9c0da90fb1 [PASS/SETUP] Fix minior issues (#663)
* [PASS/SETUP] Fix minior issues

* fix lint
2017-11-21 11:11:41 -08:00
Tianqi Chen 4865f95830 [BUILD] Windows support of DLL exports (#522) 2017-10-08 15:28:36 -07:00
Tianqi Chen c6c287bfa3 [SETUP] Always use relpath for setup (#421)
* [SETUP] Always use relpath for setup

* [CMAKE] Fix cmake llvm build
2017-09-04 17:53:18 -07:00
Tianqi Chen 26b433b5de [TEST] Jenkinsfile (#389)
* [TEST] Jenkinsfile

* Fix wheel setup
2017-08-26 12:08:59 -07:00
Tianqi Chen 7f1b0f5bae [SETUP] Fix python setup (#380) 2017-08-24 09:00:03 -07:00
ziheng c6ebb5a1ef [Python] Dist wheel tools (#348) 2017-08-19 20:43:11 -07:00
ziheng 5cdc860492 [TAG] Fix signature of decorated function (#228)
* [TAG] Fix signature of decorated function

* Add dep
2017-07-07 16:02:35 -07:00
Tianqi Chen 8a5b6c21ad [DOC] Doc redirection (#119)
* [DOC] Doc redirection

* fix setup url
2017-05-04 16:13:08 -07:00
ziheng d45b6d4b84 [DOC] Add intro to 'comm_reducer' in tutorial; fix doc (#108)
* [DOC] Add intro to 'comm_reducer' in tutorial; fix doc

* Fix

* Fix
2017-04-29 14:39:24 -07:00
Tianqi Chen 535a97c968 [PYTHON/FFI] Enable Cython FFI (#106)
* [PYTHON/FFI] Enable Cython FFI

* fix cython
2017-04-27 15:20:29 -07:00
ziheng b5702eca64 [DOC] Add setup.py, fix comments (#89)
* Add setup.py, fix comments

* Update installation document
2017-04-15 14:45:17 -07:00