This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch nightly in repository https://gitbox.apache.org/repos/asf/tvm.git
from b3d01c2295 [Relax][Bugfix] Preserve dtype in ToMixedPrecision for kNever ops (#17263) add 02f48828e4 [FFI] Re-introduce the boxed primitive values (#17257) No new revisions were added by this update. Summary of changes: include/tvm/ir/attrs.h | 76 ++- include/tvm/ir/expr.h | 130 +++- include/tvm/ir/transform.h | 34 +- include/tvm/meta_schedule/schedule_rule.h | 8 +- include/tvm/relay/attrs/transform.h | 2 +- include/tvm/runtime/c_runtime_api.h | 5 +- include/tvm/runtime/container/boxed_primitive.h | 143 ++++ include/tvm/runtime/container/variant.h | 2 +- include/tvm/runtime/ndarray.h | 2 + include/tvm/runtime/packed_func.h | 756 +++++++++++++++++---- include/tvm/target/target.h | 10 +- include/tvm/target/target_kind.h | 4 +- include/tvm/tir/expr.h | 57 ++ include/tvm/tir/function.h | 2 +- include/tvm/tir/schedule/schedule.h | 5 +- python/tvm/_ffi/_ctypes/object.py | 22 + python/tvm/_ffi/_ctypes/packed_func.py | 7 +- python/tvm/_ffi/_ctypes/types.py | 3 + python/tvm/_ffi/_cython/base.pxi | 5 +- python/tvm/_ffi/_cython/object.pxi | 10 + python/tvm/_ffi/_cython/packed_func.pxi | 9 +- python/tvm/_ffi/runtime_ctypes.py | 3 +- python/tvm/driver/tvmc/registry.py | 22 +- python/tvm/ir/attrs.py | 2 +- python/tvm/ir/expr.py | 5 +- python/tvm/meta_schedule/tune_context.py | 3 +- python/tvm/relax/op/statistical.py | 22 +- python/tvm/relax/testing/ast_printer.py | 18 +- python/tvm/relax/training/setup_trainer.py | 4 +- python/tvm/relax/utils.py | 3 + .../tvm/relay/backend/contrib/ethosu/legalize.py | 2 +- python/tvm/relay/op/_tensor_grad.py | 3 + python/tvm/relay/op/_transform.py | 8 +- python/tvm/relay/op/contrib/ethosu.py | 4 +- python/tvm/relay/op/transform.py | 25 +- .../transform/fake_quantization_to_integer.py | 5 +- python/tvm/runtime/__init__.py | 4 +- python/tvm/runtime/container.py | 38 ++ python/tvm/runtime/object_generic.py | 75 +- python/tvm/script/parser/tir/parser.py | 2 + python/tvm/te/hybrid/calls.py | 12 +- python/tvm/te/hybrid/parser.py | 4 +- python/tvm/te/hybrid/utils.py | 28 +- python/tvm/te/operation.py | 1 - python/tvm/te/tensor.py | 11 +- python/tvm/tir/__init__.py | 1 + python/tvm/tir/expr.py | 4 + python/tvm/tir/ir_builder.py | 6 +- python/tvm/tir/op.py | 151 ++-- python/tvm/tir/schedule/trace.py | 15 +- python/tvm/topi/arm_cpu/conv2d_gemm.py | 2 +- python/tvm/topi/cuda/batch_matmul.py | 8 +- rust/tvm-rt/src/module.rs | 5 +- rust/tvm-sys/src/packed_func.rs | 35 +- src/auto_scheduler/compute_dag.cc | 16 +- .../search_policy/sketch_policy_rules.cc | 3 +- src/auto_scheduler/search_policy/utils.h | 12 +- src/contrib/msc/core/printer/msc_base_printer.cc | 9 + src/contrib/msc/core/printer/prototxt_printer.cc | 4 + src/contrib/msc/core/utils.cc | 4 + src/driver/driver_api.cc | 5 +- src/ir/attrs.cc | 89 +++ src/ir/expr.cc | 17 +- src/ir/transform.cc | 41 +- src/meta_schedule/database/database_utils.cc | 10 +- src/meta_schedule/database/json_database.cc | 4 +- src/meta_schedule/mutator/mutate_thread_binding.cc | 2 +- src/meta_schedule/mutator/mutate_tile_size.cc | 6 +- src/meta_schedule/mutator/mutate_unroll.cc | 6 +- src/meta_schedule/schedule/cuda/thread_bind.cc | 6 +- .../schedule_rule/cross_thread_reduction.cc | 8 +- .../schedule_rule/multi_level_tiling.cc | 5 +- .../schedule_rule/parallel_vectorize_unroll.cc | 6 +- src/meta_schedule/schedule_rule/schedule_rule.cc | 12 +- src/meta_schedule/utils.h | 38 +- src/node/boxed_primitive.cc | 134 ++++ src/node/script_printer.cc | 16 +- src/node/structural_equal.cc | 37 +- src/relax/backend/vm/codegen_vm.cc | 2 + src/relax/backend/vm/codegen_vm_tir.cc | 30 +- src/relax/op/tensor/create.cc | 2 +- src/relax/op/tensor/create.h | 2 +- src/relax/op/tensor/manipulate.cc | 6 +- src/relax/op/tensor/manipulate.h | 4 +- .../backend/contrib/cmsisnn/compiler_attrs.cc | 2 +- src/relay/backend/contrib/cmsisnn/target.cc | 2 +- src/relay/backend/contrib/cutlass/target.cc | 18 +- src/relay/backend/contrib/ethosn/ethosn_api.cc | 6 +- src/relay/backend/contrib/ethosu/codegen.cc | 3 +- src/relay/backend/contrib/ethosu/preprocess.cc | 4 +- .../backend/contrib/example_target_hooks/target.cc | 2 +- src/relay/backend/contrib/tensorrt/codegen.cc | 4 +- src/relay/backend/contrib/tensorrt/target.cc | 14 +- src/relay/backend/contrib/uma/targets.cc | 7 +- src/relay/backend/executor.cc | 10 +- src/relay/backend/runtime.cc | 4 +- src/relay/ir/dataflow_matcher.cc | 36 + src/relay/op/make_op.h | 2 +- src/relay/op/tensor/transform.cc | 48 +- src/relay/transforms/combine_parallel_op_batch.cc | 2 +- src/relay/transforms/fold_constant.cc | 2 +- src/relay/transforms/higher_order_gradient.cc | 2 - src/relay/transforms/to_mixed_precision.cc | 4 +- src/runtime/boxed_primitive.cc | 65 ++ src/runtime/crt/common/crt_runtime_api.c | 8 +- src/runtime/disco/bcast_session.cc | 8 +- src/runtime/minrpc/rpc_reference.h | 8 + src/runtime/relax_vm/builtin.cc | 10 +- .../printer/doc_printer/python_doc_printer.cc | 23 +- src/script/printer/ir/misc.cc | 15 + src/script/printer/relax/tir.cc | 6 +- src/support/array.h | 52 +- src/support/ffi_testing.cc | 52 ++ src/target/llvm/codegen_cpu.cc | 29 +- src/target/llvm/llvm_instance.cc | 14 +- src/target/tag.cc | 66 +- src/target/target.cc | 66 +- src/target/target_kind.cc | 137 ++-- src/te/operation/compute_op.cc | 26 +- src/te/operation/create_primfunc.cc | 15 +- src/te/operation/placeholder_op.cc | 12 +- src/te/schedule/schedule_dataflow_rewrite.cc | 7 +- src/tir/analysis/calculate_allocated_memory.cc | 2 +- src/tir/ir/expr.cc | 20 +- src/tir/ir/function.cc | 7 + src/tir/ir/specialize.cc | 2 +- src/tir/ir/stmt.cc | 32 +- src/tir/ir/utils.cc | 68 ++ .../tvm/tir/usmp/analysis.h => src/tir/ir/utils.h | 36 +- src/tir/op/op.cc | 16 +- src/tir/schedule/concrete_schedule.cc | 14 +- src/tir/schedule/concrete_schedule.h | 5 +- src/tir/schedule/instruction_traits.h | 5 + src/tir/schedule/primitive.h | 5 +- src/tir/schedule/primitive/annotate.cc | 3 + src/tir/schedule/primitive/sampling.cc | 36 +- src/tir/schedule/trace.cc | 12 +- src/tir/schedule/traced_schedule.cc | 6 +- src/tir/schedule/traced_schedule.h | 5 +- src/tir/transforms/inline_private_functions.cc | 2 +- src/tir/transforms/ir_utils.h | 1 + src/tir/transforms/lower_tvm_builtin.cc | 2 + src/tir/transforms/make_packed_api.cc | 45 +- tests/cpp/relay/backend/runtime_test.cc | 10 +- tests/cpp/target_test.cc | 56 +- .../test_runtime_packed_func.py | 18 +- .../python/arith/test_arith_canonical_simplify.py | 23 +- tests/python/arith/test_arith_iter_affine_map.py | 35 +- .../test_arith_narrow_predicate_expression.py | 21 +- tests/python/arith/test_arith_rewrite_simplify.py | 63 +- .../arith/test_arith_solve_linear_equations.py | 15 +- .../arith/test_arith_solve_linear_inequality.py | 11 +- tests/python/codegen/test_target_codegen_cuda.py | 2 +- tests/python/codegen/test_target_codegen_llvm.py | 41 ++ tests/python/ir/test_container_structural_equal.py | 30 +- tests/python/ir/test_ir_container.py | 15 +- tests/python/ir/test_ir_type.py | 9 +- .../test_distributed_tvmscript_printer.py | 4 +- tests/python/relax/test_ast_printer.py | 2 +- .../relax/test_backend_dispatch_sort_scan.py | 10 +- tests/python/relax/test_tvmscript_printer_relax.py | 6 +- tests/python/relax/test_vm_build.py | 2 +- tests/python/relax/test_vm_codegen_tir.py | 5 +- tests/python/relay/test_dataflow_pattern.py | 3 +- tests/python/relay/test_executor.py | 2 +- tests/python/relay/test_runtime.py | 4 +- tests/python/relay/test_type_infer.py | 65 +- tests/python/runtime/test_runtime_container.py | 130 +++- tests/python/te/test_te_schedule_tensorize.py | 20 +- tests/python/te/test_te_tag.py | 10 +- tests/python/tir-base/test_lower_build.py | 2 +- tests/python/tir-base/test_tir_buffer.py | 17 +- tests/python/tir-base/test_tir_index_map.py | 55 +- tests/python/tir-base/test_tir_nodes.py | 27 +- .../tir-schedule/test_tir_schedule_sampling.py | 2 +- .../python/tir-schedule/test_tir_schedule_state.py | 4 +- .../test_tir_transform_compact_buffer_region.py | 71 +- ...test_tir_transform_instrument_bound_checkers.py | 8 +- .../test_tir_transform_make_packed_api.py | 139 ++++ .../test_tir_transform_storage_rewrite.py | 4 +- .../tvmscript/test_tvmscript_error_report.py | 17 +- .../python/tvmscript/test_tvmscript_printer_tir.py | 12 +- tests/python/tvmscript/test_tvmscript_roundtrip.py | 31 +- vta/python/vta/transform.py | 13 +- 184 files changed, 3246 insertions(+), 1242 deletions(-) create mode 100644 include/tvm/runtime/container/boxed_primitive.h create mode 100644 src/node/boxed_primitive.cc create mode 100644 src/runtime/boxed_primitive.cc create mode 100644 src/tir/ir/utils.cc copy include/tvm/tir/usmp/analysis.h => src/tir/ir/utils.h (55%)