* Improved MLF to contain workspace info
Added functionality to calculate workspace, io and constant
memory required by each primfunc and main function. Moreover,
the workspace information required by each primfunc and main
is reported in metadata.json in the Model Library Format(MLF).
- added functionality to record tir and relay primfuncs
- added tests for model_library_format changes
Change-Id: Ib4a8b787345aa35f8a1645e8a648fad84de37bce
* Improved MLF to contain workspace info
* disable AoT for now
* addressing comments
Change-Id: I5f041ec461b02dac6ea9c96ea50eb400d55eef53
* Improved MLF to contain workspace info
* addressed comments
* added aot executor support
Change-Id: I9b54a7939d8ccb3c6ce0454f0fe62866ac66eb5c
* Improved MLF to contain workspace info
* removed redundant utils.py
Change-Id: I256dd88fab31a595bf9509bd1c4ab59b0c145b1e
* Improved MLF to contain workspace info
* removed redundant ffi api
Change-Id: I9ad6795aa839edfdfd05b902d4531fb0a20e894d
Add a new API register_op
Note: Implementing a op by pure python is still limited:
1. Custom type relation (add_type_rel()) is still not
available in python.
2. Setting number inputs (set_num_inputs()) needs
plevel > 128 in python.
(see tests/python/relay/test_ir_op.py)
* [SPARSE] Improve sparse performance on ROCM
The current sparse dense gpu kernel uses warp level storage to handling
caching of data. Warp level storage uses shuffle intrinsics, which are
slow on rocm (because they actually read and write to shared memory).
Rocm does provide intrinsics to do the correct memory management, but
they are not available through tvm. Instead this PR switches to using
shared memory on rocm devices. Performance is about 2x faster.
* default to shared mem
* formatting
* formatting
* change more pooling operators
dilations -> dilation to match old field names in conv
fix python interface into new relay nodes
fix order of arguments
update type relation for dilations
change topi interface to use dilations
* spooky, there are two implementations! Change to 1 topi
use generic poolnd instead of 2d implementation for topi
remove old pooling topi
* rename pool --> pool2d in topi
change pool -> pool2d, make topi tests work now
make op level 2 pass with interface changes
fix dilation being hardcoded to 1
proper calculation for avgs among dilations
proper avg pool padding behavior
change name of pool test to pool2d test
* add poolnd baseline implementation
more fixes to edge cases for poolnd, delete old versions
replace topi tests with new baseline python version
clean up tests
make tests more readable kind of
add dilation topi tests FINALLY
remove see_pool.py
remove dilation from grad
* fix subtle implementation detail between topi and baseline python pool op
* rewrite tests to be more generic for relay pooling ops
add relay dilation tests, FINALLY
add some comments to testing code
linting and formatting
add ASF header
make 10/10 for black formatting lol
more appeasing the formatting gods
wow
add parameters to documentation
fix test import
Jostle CI
fix more broken unit tests using old version of pool
fix wrong var used for bound calc
add dilation to arm tests
add docstring to python make funcs
* fix pattern utils out of place args
* properly forward more tests to use dilations in pooling
formatting
more formatting
relax constraints on test to make it pass
relax more constraints
fix some pytorch frontend errors
fix error
better test conditions
jostle build
* fix padding bug with ceil mode
jostle build
cleaner pool condition
remove see_pool.py again
* add dilations field to onnx importer
blacking files
black file
* address matthew's comments
* support same lower and maxpool in autopad
* fix isinf tests
* lower tolerance on roialign test becuase the onnx result is cropped to 4 decimal places
* slow support for bottom-k
* throw with nullptr in gathernd and scatternd, fix typo
* fix lint
* fix a copy typo
* Rename references to 0.0.0.0 to localhost. Also change references to 127.0.0.1 to localhost so that all references are consistent. 0.0.0.0 is not the same as localhost.
Removed forcing IPv4 protocol from python RPC server implementation
to be in correspondence with the RPC client implementation which is
used `platform default`. This had led to situation when "localhost"
was translated as 127.0.0.1 for the server (IPv4 protocol was used),
but the client translated it as "::1" and was trying to connect to
server using IPv6 protocol and was getting "ECONNREFUSED 111 Connection refused".
Change-Id: I44802eb1ea78f3b36ac664f0be7237e62084c234
* [Tophub] Race condition fixed in folder creation
Tophub download routines switched to Pathlib's `Path.mkdir`
in order to avoid race conditions in creation of folders
This PR fixes the return value support in tir.tvm_call_packed
- Clarified the semantics of the intrinsics
- Fix a problem when lowering call packed with nested scopes(let bindings)
- Added regression tests to cover the changes
* [FIX] `skip_conv_layers` will affect quantization of `nn.dense`
* [ add ] quantization test case for dense & conv2d
* [ fix ] reformat
* [ reformat ] test file
This PR updated the intrinsic lowering pass to support the new op registry and avoid overloading the global tvm registry. Meanwhile, it kept the fallback mechanism to find the most suitable lower intrinsic function, e.g., llvm.FLowerIntrinsic vs. default.FLowerIntrinsic. All previous op registration are ported to new functions, and some missing ops would be added in separate PR.
* [ONNX] Support importing Conv with missing attributes
* fix removal of attributes ONLY when they are default and for autopad
* move comment to the right place
* fix missing cast to int64 in all_class_nms shape func
* fix scalar in where shape func
* add add test
* update test
* minor fix
* add where scalar shape func test
* Added kDriverVersion to DeviceAttrKind, implemented for VulkanDeviceAPI.
The vulkan backend has had inconsistencies that look correlated to
drivers used. This will help in collecting information for
troubleshooting.
* Changed units for OpenCL's clock rate from MHz to kHz, to match Cuda/ROCm.
* [Docs][Runtime] Additional documentation for tvm.runtime.Device, DeviceAPI feature matching
Primarily documentation, with some changes to the OpenCL DeviceAPI to
match available features in cuda/vulkan.
* Added CL_TARGET_OPENCL_VERSION definition, for use with unified OpenCL headers.
Co-authored-by: Eric Lunderberg <elunderberg@octoml.ai>
* adds rounding mode for nearest neighbor, passing onnx unit tests for nearest neighbor
* passing all linear test. passing all nearest tests except crop and resize, which needs a dynamic implementation of crop and resize
* most of the bicubic tests are working
* fix exclude outside
* remove dead code
* fix lint
* fix defaults to match old implementation
* fix lint
* fix gpu tests
* fix lint again
* change order of operations to prevent GPU rounding errors