Commit Graph

25 Commits

Author SHA1 Message Date
Haichen Shen 720e7b1ebd [Refactor] Rename asnumpy -> numpy in NDArray (#8083) 2021-05-21 08:32:27 -04:00
Yuchen Jin c083ac73d8 [Tests] Fix requires_gpu (#8050) 2021-05-15 10:33:03 -04:00
Yuchen Jin 43c2ea72bc Rename gpu to cuda, and bump dlpack to v0.5 (#8032) 2021-05-13 09:11:40 -04:00
Tristan Konolige 0d302b6454 [FIX] tvm.testing.parametrize_targets documentation for arguments does not match what it is acutally using. (#7778) 2021-04-06 15:05:17 -07:00
Haichen Shen fbfeee4ccb [Refactor] Rename TVMContext to Device (#7721) 2021-03-26 07:56:57 -04:00
zhuochen 60ff0c79fa [Runtime] Extend Graph Runtime To Support Cuda Graph Launch (#7616)
* add graph runtime cuGraph poc

* lint format

* add unittest

* fix review comments

* Update CMakeLists.txt

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

* build cuda graph runtime in gpu test

* Revert "build cuda graph runtime in gpu test"

This reverts commit f286711e4126c696860be3ec3d82400ca8542bd5.

* rename cuGraph to CUDA Graph

* rename cuda_graph

* rename cuda_graph

* lint format

* Update src/runtime/graph/graph_runtime_factory.cc

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

* Update python/tvm/testing.py

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

* fix lint error

* remove unnecessary warn

* add test, fix lint

* fix lint W0223

Co-authored-by: Cody Yu <comaniac0422@gmail.com>
2021-03-17 09:39:05 -07:00
Dmitriy Smirnov e8ab607992 [TFLite] Strided slice handling of shrink_axis_mask improved (#6998)
* [TFLite] Strided slice handlig of shrink_axis_mask improved

1. Added removal of dimensions if result is a scalar
to mimic TensorFlow behaviour. E.g.:
    tf.strided_slice([1,2,3], [0], [1], [1], shrink_axis_mask=0)
    <tf.Tensor: shape=(1,), dtype=int32, numpy=array([1], dtype=int32)>

    tf.strided_slice([[[1,2,3],[4,5,6],[7,8,9]]], [0, 0, 0], [3, 3, 3], [1, 1, 1], shrink_axis_mask=7)
    <tf.Tensor: shape=(), dtype=int32, numpy=1>

2. Added extra check to assert_allclose to check shape equalities
as np.testing.assert_allclose() does not distinguish between cases like:

    np.testing.assert_allclose(1, np.array(1))
    np.testing.assert_allclose(1, np.array([1]))
    np.testing.assert_allclose(np.array(1), np.array([1]))

* unit tests fixed
2021-01-21 09:48:16 +08:00
Lianmin Zheng 3d8fd2a2e7 [AutoScheduler] Fix the conflict of thread pool in measurement (#7166) 2020-12-25 01:14:09 -08:00
Lianmin Zheng 7dcafb017a [AutoScheduler] Add layout rewrite support for dense and batch matmul on CPU (#7161)
* [AutoScheduler] Add layout rewrite for dense and batch_matmul

* Fix test & Address comments

* Fix shape inference

* fix test
2020-12-24 16:57:24 -08:00
Tianqi Chen 37af2d741d [CONTRIB] PopenPoolExecutor (#6959)
PopenPoolExecutor implements a ProcessPoolExecutor backed by popen.

- Only handles invoking functions in tvm namespace.
- Unlike multiprocessing, does not require __main__ block,
  which means it can directly run on jupyter notebook.
- Come with timeout and fault tolerant support to timeout
  long running jobs, and restart the process when an error happens.

Recommended usage: it is recommended to create a pool and reuse
it in a long running job(e.g. autotuning) so that the process
are reused when possible.
2020-12-20 13:07:58 -08:00
Tristan Konolige 6be6363cc0 [FIX,AUTOSCHEDULER] Fix auto_scheduler to run with multiprocessing's spawn start method (#6671)
* Fix multiprocessing with spawn issues

* address reviewer feedback

* Fix tutorials

* formatting

* undo autotvm work

* Undo tutorial changes

* Add spawn tests

* fix test
2020-10-29 14:24:03 -07:00
Tristan Konolige 82431457cb [FIX,MICROTVM] Skip microtvm tests if microtvm is not built (#6693) 2020-10-15 18:22:58 -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
Tianqi Chen d08eb9a813 [TESTING] Fix the error when running tests with default targets (#6394) 2020-09-07 17:02:55 -07:00
Tristan Konolige b235e590a6 [TESTS] Refactor tests to run on either the GPU or CPU. (#6331)
Much of the time spent in testing is duplicated work between CPU and GPU
test nodes. The main reason is that there is no way to control which
TVM devices are enabled at runtime, so tests that use LLVM will run on
both GPU and CPU nodes.

This patch adds an environment variable, TVM_TEST_DEVICES, which
controls which TVM devices should be used by tests. Devices not in
TVM_TEST_DEVICES can still be used, so tests must be careful to check
that the desired device is enabled with `tvm.testing.device_enabled` or
by enumerating all devices with `tvm.testing.enabled_devices`. All
tests have been retrofitted with these checks.

This patch also provides the decorator `@tvm.testing.gpu` to mark a test
as possibly using the gpu. Tests that require the gpu can use
`@tvm.testing.requires_gpu`. Tests without these flags will not be run
on GPU nodes.
2020-09-02 14:50:59 -07:00
Yizhi Liu 151f3f5a00 [Arith] Inequalities solver (#5618) 2020-07-06 10:04:42 -07:00
Tianqi Chen d9cecdf501 [ARITH] Remove the legacy Simplify, migrate to Analyzer. (#5385)
The legacy Simplify/CanonicalSimplify are now a thin wrapper around the Analyzer.
This PR removes these functions and migrated every place that requires
simplification to enforce Analyzer creation.
The new API would encourage more Analyzer sharing and potentially enable
context-aware analyzer-based simplification.
2020-04-20 19:28:08 -07:00
Tianqi Chen f143881314 [PYTHON] Enhance with_attr API, cleanup MakeAPILegacy in testcases (#5335) 2020-04-15 11:11:28 -07:00
Tianqi Chen f08d5d78ee [TIR] Refactor MakePackedAPI to target dependent stage. (#5326)
Previously MakePackedAPI was in the target independent stage,
but never the less requires the device_type information that will be
binded at a later target dependent stage.

The previous implementation was due to the limitation of LoweredFunc
which can not carry buffer_map info(so they have to be lowered right away).
This is no longer the case after the unified IR refactor.

This PR migrates MakePackedAPI to a target dependent stage
and removes the un-necessary BindDevice pass.
2020-04-14 07:48:14 -07:00
Tianqi Chen 869b718ac3 [TIR] Fix perf regression of tir refactor (#5258) 2020-04-07 10:24:55 -07:00
Tianqi Chen e63e08febd [REFACTOR][TIR] Migrate all low-level passes to the Pass Manager. (#5233)
* [REFACTOR][TIR] Migrate all low-level passes to the Pass Manager.

This PR migrates the tvm.lower to return IRModule of PrimFuncs
instead of the LoweredFuncs.

* Remove LoweredFunc.
2020-04-04 17:36:49 -07:00
Tianqi Chen 08338dd5f8 [REFACTOR][PY] Establish tvm.te and tvm.driver (#4900)
- Move the related files to tvm.te
- Move build_module.py to tvm.driver
2020-02-17 18:47:09 -08: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
Sergei Grechanik 10b6e7e05d [TVM] Move check_numerical_grads to tvm.testing_ (#2314) 2018-12-20 10:41:30 -08:00
Sergey Mironov 39c8bc2a3d [TOPI] Specify non-zero absolute tolerance in tests (#1925) 2018-10-20 22:06:45 -07:00