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.
* [microNPU] Performance model bugfixes
* Fixed incorrect num_blocks calculations for both BufferModes.
* Fixed similar issues with Read/Write byte calculations.
* Fixed an issue where the 'partkernel' flag was not propagated to
the performance estimation code.
* Fixed single buffering check incorrectly used output shape and
block rather than the input shape and block.
* Fixed block config not aligned to micro block for Elementwise.
Change-Id: Ide6b231bc1a17c65bed20129d2179a215ada14b2
* Address review comment
Changed incorrect usage of 'max_width' to 'max_depth'.
* [TIR] Add TensorizeInfo and GetTensorizeLoopMapping
* expose PreOrderVisit to python
* add test case
* add conv2d nchwc test
* add mma test
* add arm nhwc conv2d test
* Revert "add arm nhwc conv2d test"
This reverts commit eb147f33bb02d62a0eacc9cdfe777ac047ee1bc9.
* refine
* add doc
* update
* fixd condition
* black
* pylint
* Update python/tvm/tir/schedule/analysis.py
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
* run black
* bring back logic in original code to support loop permutation
* add comment
* simplify
* minor fix to test
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
* add get_c_struct_name() method to Metadata to distinguish struct type name in llvm
* add metadata serialization support to llvm codegen
* Organize MetadataQueuer into a separate file.
* Add DiscoverArraysVisitor to metadata_utils
* Fill DLTensor metadata in LegalizePackedCalls.
* Improve error message from Call asserts
* Pass non-String device_context down to codegen.
* this is necessary to allow CodeGenCPU to emit calls that include resource_handle.
* Scope usage of lvalue refs in LowerTVMBuiltin to avoid corrupt memory.
* test fixes
* Also fill preflattened_buffer_map (TODO, maybe don't do this)
* Fix C codegen.
* Set USMP elem_offset to 0.
* Clarify calculation of byte_offset from elem_offset.
* fix tests
* Fix arm compile warning
* Fix hexagon test.
* previously I believe we required interface_api == "c", but
this really means to generate C API bindings, and we are generating
"packed" bindings.
* I think "c" was chosen here because the distinction between
interface-api and use-unpacked-api is confusing. "c" interface-api
means to generate an entrypoint API for microcontrollers that
accepts bare data buffers. "packed" interface-api means to generate
a TVMBackendPackedCFunc entrypoint. use-unpacked-api forms the same
determination for the operator functions.
* A further confusion here is that there are two ways to call
"packed" operator functions: tir.tvm_builtin_call_packed and
tir.tvm_builtin_call_cpacked. This distinction describes whether or
not to late-bind calls via TVMBackendGetFuncFromEnv. Right now, AOT
only ever requires call_cpacked because target_host == target, and
for all suitable target_host, we expect a single DSO-exportable
runtime.Module. When we move away from this by introducing
heterogeneous target support to AOT, we can use this as a condition
to help us choose between call_cpacked and call_packed (and
possibly add a compile-time option to assert it is call_cpacked,
for situations where we really don't want call_packed).
* Document T.preflattened_buffer
* Fix test_aot_legalize_packed_calls
* Address manupa comments
* Fix convert_pool_allocations_to_offsets test.
* lint
* Fix T.preflattened_buffer
* Add preflattened_buffer_map to TIRTextPrinter
* Fix tests
* Fix BYOC
* Fix invoking C device API.
* remove comments
* Address Mousius comments
* lint
* lint
* Fix GMock linking on new CMake
* address masahi comment
Co-authored-by: Masahiro Masuda <masahi129@gmail.com>
This PR unifies the existing `EvolutionarySearchConfig`, `ReplayFuncConfig` and `ReplayTraceConfig` into `TuneConfig`, and refactored the logic in `meta_schedule/tune.py`
* method of creating of NDArray from external DLTensor was implemented
* set input without copying for DLTensor source
* code clean up
* update description and comments after review
Co-authored-by: Valery Chernov <valery.chernov@deelvin.com>
* [Runtime][PipelineExecutor]Add forwarding queue logic for set input.
When the set_input function get called, a runtime of pipeline may not
yet finish the former computation work then the new set_input call would
break the current computation logic, to avoid such issue, we add the
forwarding queue logic to guarantee the order of input data consuming.
* polish the documents.
* The patch is to simplify the implmentation of QNNParam and make it more friendly to Python 2.x.
* Empty-Commit
* fix error about boolean value of Tensor with more than one value is ambiguous.
* [Arith] Updated arith::DetectIterMap to keep extent=1 components
Previously, arith::DetectIterMap simplified the output expression by
replacing iteration variables with extent==1 with their value. This
prevented the return value from being used in
arith::InverseAffineIterMap to solve for the variable, as it no longer
existed in the returned expressions.
This commit changes arith::DetectIterMap to keep the iteration
variable even if extent==1, and adds a motivating unit test that
requires this updated behavior.
* Updated to retain default behavior of DetectIterMap
To avoid breaking existing test cases, updated to maintain the same
default behavior, but a flag to maintain trivial iterators in the
result.
* Updated FFI and Python API for DetectIterMap
* add relay.f.frontend.fm_oneflow support cnns
* support cuda
* fix mobilenetv2 and reviews
* fix: model without meta info
* support eager and yolo, add test
* fix: license
* add: tutorials
* fix: support new graph
* fix some comments
* refine
* fix concat op convert bug
* refine
* refine
* change cuda to cpu
* fix bug
* fix ci error in tvm
* fix pylint check
* delete useless file
* add skimage package in docker
* fix ci error
* fix bug
* add oneflow fronted test in ci
* merge conflict
* fix tutorial
* try to find error in ci
* revert
* merge conflict
* black oneflow
* Delete from_oneflow.py
Co-authored-by: Xiaoyu Zhang <35585791+BBuf@users.noreply.github.com>
Co-authored-by: BBuf <1182563586@qq.com>
The server IP address will be obtained from the RPC tracker, but multiple
servers must be distinguishable. To enable this, set a unique key when
starting a server, and use that key when starting a session.
* Only remove port forwarding applied in a session
to avoid affecting global adb state.
* Send SIGINT to attempt to allow remote
server to cleanup and undbind port in
deconstruction
* Only attempt to forward ports not in use by
adb or the system.
* Allows module-name as a command line argument to tvmc
* Updates microNPU graph partitioner to pass module name to PartitionGraph()
* Updates CMSIS-NN graph partitioner to pass module name to PartitionGraph()
Change-Id: I12a4a2eef2ddc7e3c4a6c0dd8fdcab009c975bac
* [Hexagon] Move aot/graph_executor interactions into launcher
Follow-up from https://github.com/apache/tvm/pull/10581, applying
similar changes to the AOT and graph executor interactions. This
moves the file management and upload/download from the unit tests into
the launcher.
* Added Session.test_executor to avoid duplication in graph/aot test.
* Resolve lint errors
* Moved link flags workaround out of session, into create_aot_shared
* Separated Session.get_*_executor and Session.get_executor_from_factory
* Updated to resolve lint error
* Make all required adjusts in the code to comply with the new version
* Upadte ci-lint to v0.71, based on tlcpackstaging/ci_lint:20220411-060305-45f3d4a52
* [CUDNN] Add cuDNN as a Relay partitioning target (BYOC)
This adds infrastructure to support offloading of Relay
patterns to cuDNN. In this initial commit, only softmax
is supported.
* Refactor common TE BYOC code into separate file
* Add test guard
* [build] Update libinfo and add lint rule
This updates `tvm.support.libinfo()` to be in-line with the current tvm options. It also adds a lint rule to ensure these stay matched up in the future as well as a script to print out the options in more detail. This should add in communication when debugging (i.e. tell someone to run `python -c 'import tvm; tvm.support.describe()` to learn everything you need about their envrionment)
* Fix pylint
Co-authored-by: driazati <driazati@users.noreply.github.com>
As discussed in https://github.com/apache/tvm/pull/10856#discussion_r840324560, add a utility under `meta_schedule/testing/utils.py` to clean up the database boilerplate. Also using `DummyDatabase` instead of `JsonDatabase` for further clean up, as suggested by @junrushao1994 .
* Add per-channel quantization to QNN add/subtract/multiply
* Add feedback
* Add feedback - round 2
* Fix for arm test
* Add params to the test
* Try again
* Try int
* Move lhs_axis and rhs_axis
* Add as an attribute
* Add quotes
* Respect dtype in Scalarize.
* Add unittest.
* Fix lint.
* Promote dtype of IntImm to match loop_var in For.
* Fix dtype mismatches.
* Lint
* Lint.
* jostle ci
* Match dtype in hybrid parser.
* [RUNTIME] Api to get number of runtime threads
Add `tvm::runtime::threading::NumThreads` and `tvm.runtime.num_threads`
as a way to get the number of threads in use by the TVM runtime.
* check if equal to hardware threads or hardware threads/2
This PR adds DFPattern support for the TRT backend without removing the existing predicate registry.
Adds and extends the following:
In tensorrt.py: Add a pattern_table for all the supported ops and consumes the pre-existing op_registry checks
Adds an additional pass as unmerge_composites.cc. This is required for the TRT backend as it expects a single primitive
function to work with, while the MergeComposite and PartitionGraph will produce a single function for each Composite
pattern.
Adds test_inline_composites.py which tests the newly introduced pass.
Both the pattern-based and predicate-based pass sequences produce syntactically equivalent IRModules.
This is to ensure backwards compatibility."