* [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
* [FRONTEND][TF] conv3d_transpose 'SAME' support kernel more than 1x1
* revised per as review comments
* add more fallback wolkaround to make all tests pass
* [TOPI] add 3D upsampling Op.
* fix lint issues
* change align_corners to coordinate_transformation_mode
* fix resize3d half_pixel
* make a simple function and clean up trilinear_resize3d_python
* fix doc
* [AutoTVM][TOPI] NHWC conv2d templates (spatial pack) for ARM
As some frontends (tflite for example) are using NHWC as the default
layout, we are enabling NHWC schedule templates in TOPI and AutoTVM.
* some comments fix
Before the unified object protocol, we support pass
additional extension objects around by declaring a type as an extension type.
The old extension mechanism requires the types to register their
constructor and deleter to a VTable and does not enjoy the benefit of the
self-contained deletion property of the new Object system.
This PR upgrades the extension example to make use of the new object system
and removed the old Extension VTable.
Note that the register_extension funtion in the python side continues to work
when the passed argument does not require explicit container copy/deletion,
which covers the current usecases of the extension mechanism.
* Add Expand to onnx.py
* add test function for expand
* Fix a onnx frontend test
* Add tests for the value itself instead of shape only on test_expand
* Cleaned up some unnecessary modifications.
* Fix bias_add gradient
A change caused collapse_sum_like to reject implicit dimension
broadcasting for bias_add gradient, so switch to explicit sum reduction
on the non-bias axis dimensions.
* Lint fix
There is significant duplication between functions.
Spotted while looking to move the tensorflow and tflite framework support to later than
1.13.1. The tests barf around resize_nearest_neighbour not ignoring the attribute
'helpful_pixel_centers'.
That upgrade is a separate discussion while this can go in
independently.
Thanks,
Ramana
* use SPLIT & SQUEEZE = UNPACK as implemented in tensorflow parser
Relay doesn't support UNPACK
* tflite 1.13: UNPACK doesn't work as exepcted -> copies the values from
1st unpacked tensor to the other unpacks
* tflite 1.13: doesn't accept negative axis
* implement conv3d op
* add back missed conv2d_output_shape by mistake
* fix typo and docs, add topi test
* rebase to master and merge 2d/3d unification
* use cudnn.conv_forward
* [RUNTIME] Add cudnn conv3d
* add output checking to test_cudnn.verify()
* fix tests failure
* revised per as review comments
* unify conv_output_shape, conv_find_algo and conv_forward
* convert python list to tvm.array in conv_forward
* revise per as comments
* 'pass as reference' for vector args
* add back con2d/3d seperated implementation
* remove unused included header
* remove extra std::vectors
* remove unused header
* [ARM CPU] Fix contrib_spatial_pack error
* PyLint error fix
* diable no-else-return as other files
* Change the test case split OC not be 1 to cover 5D weight layout