diff --git a/misc/py-tvm/Makefile b/misc/py-tvm/Makefile index cbdd62d70926..997b2ed47686 100644 --- a/misc/py-tvm/Makefile +++ b/misc/py-tvm/Makefile @@ -1,59 +1,59 @@ PORTNAME= tvm DISTVERSIONPREFIX= v -DISTVERSION= 0.16.0 +DISTVERSION= 0.19.0 CATEGORIES= misc # machine-learning PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= yuri@FreeBSD.org COMMENT= Deep learning compiler stack for cpu, gpu and specialized accelerators WWW= https://tvm.ai/ LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PY_SETUPTOOLS} \ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} LIB_DEPENDS= libtvm.so:misc/tvm RUN_DEPENDS= ${PYNUMPY} \ ${PYTHON_PKGNAMEPREFIX}attrs>0:devel/py-attrs@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}cloudpickle>0:devel/py-cloudpickle@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}decorator>0:devel/py-decorator@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}psutil>0:sysutils/py-psutil@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}synr>0:devel/py-synr@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}tornado>0:www/py-tornado@${PY_FLAVOR} USES= python USE_PYTHON= pep517 concurrent pytest # autoplist fails; tests fail, see https://github.com/apache/tvm/issues/13132 USE_GITHUB= yes GH_ACCOUNT= apache GH_PROJECT= tvm GH_TUPLE= dmlc:dlpack:e2bdd3b:dlpack/3rdparty/dlpack \ dmlc:dmlc-core:09511cf:dmlc_core/3rdparty/dmlc-core BUILD_WRKSRC= ${WRKSRC}/python INSTALL_WRKSRC= ${WRKSRC}/python LLVM_VERSION= ${LLVM_DEFAULT} # same as in misc/tvm RUN_DEPENDS= llvm-config${LLVM_VERSION}:devel/llvm${LLVM_VERSION} MAKE_ENV+= FREEBSD_LIBRARY_PATH=${LOCALBASE}/lib TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} BINARY_ALIAS= git=false post-patch: @${REINPLACE_CMD} 's|dll_path = \[\]|dll_path = ["${LOCALBASE}/lib"]|' ${WRKSRC}/python/tvm/_ffi/libinfo.py post-install: # strip binaries @${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name "*.so" | ${XARGS} ${STRIP_CMD} # autoplist because 1) python's autoplist is inaccurate for tvm and 2) because there's the add-on package topi @cd ${STAGEDIR}${PREFIX} && \ ${FIND} ${PYTHON_SITELIBDIR:C|${LOCALBASE}/||} -type f -or -type l > ${TMPPLIST} @${ECHO} "bin/tvmc" >> ${TMPPLIST} # Not clear from docs how to run Python tests, see https://github.com/apache/tvm/issues/12158 .include diff --git a/misc/py-tvm/distinfo b/misc/py-tvm/distinfo index 0ea9afa7e4fb..580026757f88 100644 --- a/misc/py-tvm/distinfo +++ b/misc/py-tvm/distinfo @@ -1,7 +1,7 @@ -TIMESTAMP = 1714375347 -SHA256 (apache-tvm-v0.16.0_GH0.tar.gz) = c58c316882d545a8cf462bf4ee476591a18de984ee77544589e212b2fae2fa60 -SIZE (apache-tvm-v0.16.0_GH0.tar.gz) = 10551522 +TIMESTAMP = 1742876552 +SHA256 (apache-tvm-v0.19.0_GH0.tar.gz) = f70211dd99339123bddd55e9aadd95cecd0c80ecd113655d5d934a0ee431775e +SIZE (apache-tvm-v0.19.0_GH0.tar.gz) = 9946236 SHA256 (dmlc-dlpack-e2bdd3b_GH0.tar.gz) = e88e702277cf4cfa4814afdbb27b07b75041d80b3df60da387cdd7e0ebeb6817 SIZE (dmlc-dlpack-e2bdd3b_GH0.tar.gz) = 76235 SHA256 (dmlc-dmlc-core-09511cf_GH0.tar.gz) = 8b7ba0e19a9f2c5d65d49758ab14631e99c4f501b689842fa6535fc44a05c46f SIZE (dmlc-dmlc-core-09511cf_GH0.tar.gz) = 260299 diff --git a/misc/py-tvm/files/patch-python_setup.py b/misc/py-tvm/files/patch-python_setup.py new file mode 100644 index 000000000000..7343e3c31ef2 --- /dev/null +++ b/misc/py-tvm/files/patch-python_setup.py @@ -0,0 +1,14 @@ +- remove bogus paths causing build failure + +--- python/setup.py.orig 2025-03-25 06:05:42 UTC ++++ python/setup.py +@@ -75,9 +75,7 @@ def get_lib_path(): + "web", + "rust", + "golang", +- "include", + "src", +- "cmake", + "CMakeLists.txt", + ]: + for name in lib_path: diff --git a/misc/tvm/Makefile b/misc/tvm/Makefile index 900663d9953a..6d9d5c0bd56f 100644 --- a/misc/tvm/Makefile +++ b/misc/tvm/Makefile @@ -1,56 +1,62 @@ PORTNAME= tvm DISTVERSIONPREFIX= v -DISTVERSION= 0.16.0 +DISTVERSION= 0.19.0 CATEGORIES= misc # machine-learning MAINTAINER= yuri@FreeBSD.org COMMENT= Deep learning compiler stack for cpu, gpu and specialized accelerators -WWW= https://tvm.ai/ +WWW= https://tvm.ai \ + https://github.com/apache/tvm LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE -BROKEN= compilation fails with the latest dmlc-core, see https://github.com/apache/tvm/issues/17116 BROKEN_armv7= comilation fails: error: expected identifier before '__is_convertible' BUILD_DEPENDS= dmlc-core>0:devel/dmlc-core \ rang>0:devel/rang TEST_DEPENDS= googletest>0:devel/googletest USES= cmake:testing compiler:c++11-lang localbase USE_GITHUB= yes USE_LDCONFIG= yes GH_ACCOUNT= apache GH_PROJECT= tvm GH_TUPLE= dmlc:dlpack:e2bdd3b:dlpack/3rdparty/dlpack CMAKE_ON= INSTALL_DEV # Install compiler infrastructure (as opposed to runtime-only) CMAKE_ARGS= -DDMLC_PATH=${LOCALBASE}/include -DRANG_PATH=${LOCALBASE}/include CMAKE_TESTING_TARGET= cpptest LDFLAGS+= -lexecinfo OPTIONS_DEFINE= LLVM OPTIONS_DEFAULT= LLVM LLVM_VERSION= ${LLVM_DEFAULT} LLVM_DESC= With LLVM support for model compilation LLVM_CMAKE_ON= -DUSE_LLVM=${LOCALBASE}/bin/llvm-config${LLVM_VERSION} LLVM_BUILD_DEPENDS= llvm-config${LLVM_VERSION}:devel/llvm${LLVM_VERSION} LLVM_RUN_DEPENDS= llvm-config${LLVM_VERSION}:devel/llvm${LLVM_VERSION} .include .if ${ARCH} == powerpc || ${ARCH} == powerpc64 CMAKE_ARGS+= -DUSE_RPC:BOOL=OFF .endif post-install: # remove empty directories @${RMDIR} ${STAGEDIR}${PREFIX}/include/tvm/meta_schedule/schedule/cpu @${RMDIR} ${STAGEDIR}${PREFIX}/include/tvm/meta_schedule/schedule/x86 post-test: # 1 test fails, see https://github.com/apache/tvm/issues/13131 @cd ${TEST_WRKSRC} && ./cpptest +# tests as of 0.19.0, see https://github.com/apache/tvm/issues/17776: +# [ FAILED ] 3 tests, listed below: +# [ FAILED ] AProfileParser.DefaultSVESupportSVESupport +# [ FAILED ] AProfileParser.DefaultFP16Support +# [ FAILED ] InterfaceAPI.ContainsRunFunctionWithWorkspaceAndConstantPools + .include diff --git a/misc/tvm/distinfo b/misc/tvm/distinfo index e266fd0d07f6..f0d1918f66a1 100644 --- a/misc/tvm/distinfo +++ b/misc/tvm/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1714370551 -SHA256 (apache-tvm-v0.16.0_GH0.tar.gz) = c58c316882d545a8cf462bf4ee476591a18de984ee77544589e212b2fae2fa60 -SIZE (apache-tvm-v0.16.0_GH0.tar.gz) = 10551522 +TIMESTAMP = 1742872845 +SHA256 (apache-tvm-v0.19.0_GH0.tar.gz) = f70211dd99339123bddd55e9aadd95cecd0c80ecd113655d5d934a0ee431775e +SIZE (apache-tvm-v0.19.0_GH0.tar.gz) = 9946236 SHA256 (dmlc-dlpack-e2bdd3b_GH0.tar.gz) = e88e702277cf4cfa4814afdbb27b07b75041d80b3df60da387cdd7e0ebeb6817 SIZE (dmlc-dlpack-e2bdd3b_GH0.tar.gz) = 76235 diff --git a/misc/tvm/pkg-plist b/misc/tvm/pkg-plist index c9ad4f656af0..c5079cb3146b 100644 --- a/misc/tvm/pkg-plist +++ b/misc/tvm/pkg-plist @@ -1,317 +1,302 @@ include/dlpack/dlpack.h include/tvm/arith/analyzer.h include/tvm/arith/bound.h include/tvm/arith/int_set.h include/tvm/arith/int_solver.h include/tvm/arith/iter_affine_map.h include/tvm/arith/pattern.h include/tvm/auto_scheduler/auto_schedule.h include/tvm/auto_scheduler/compute_dag.h include/tvm/auto_scheduler/cost_model.h include/tvm/auto_scheduler/feature.h include/tvm/auto_scheduler/loop_state.h include/tvm/auto_scheduler/measure.h include/tvm/auto_scheduler/measure_record.h include/tvm/auto_scheduler/search_policy.h include/tvm/auto_scheduler/search_task.h include/tvm/auto_scheduler/transform_step.h include/tvm/driver/driver_api.h include/tvm/ir/adt.h include/tvm/ir/affine_type.h +include/tvm/ir/analysis.h include/tvm/ir/attrs.h include/tvm/ir/diagnostic.h include/tvm/ir/env_func.h include/tvm/ir/expr.h include/tvm/ir/function.h include/tvm/ir/global_info.h include/tvm/ir/global_var_supply.h include/tvm/ir/instrument.h include/tvm/ir/memory_pools.h include/tvm/ir/module.h include/tvm/ir/name_supply.h include/tvm/ir/op.h +include/tvm/ir/replace_global_vars.h include/tvm/ir/si_builder.h include/tvm/ir/source_map.h include/tvm/ir/tensor_type.h include/tvm/ir/transform.h include/tvm/ir/type.h include/tvm/ir/type_functor.h include/tvm/ir/type_relation.h include/tvm/meta_schedule/arg_info.h include/tvm/meta_schedule/builder.h include/tvm/meta_schedule/cost_model.h include/tvm/meta_schedule/database.h include/tvm/meta_schedule/extracted_task.h include/tvm/meta_schedule/feature_extractor.h include/tvm/meta_schedule/measure_callback.h include/tvm/meta_schedule/measure_candidate.h include/tvm/meta_schedule/mutator.h include/tvm/meta_schedule/postproc.h include/tvm/meta_schedule/profiler.h include/tvm/meta_schedule/runner.h include/tvm/meta_schedule/schedule/cuda/thread_bind.h include/tvm/meta_schedule/schedule/generic/winograd.h include/tvm/meta_schedule/schedule_rule.h include/tvm/meta_schedule/search_strategy.h include/tvm/meta_schedule/space_generator.h include/tvm/meta_schedule/task_scheduler.h include/tvm/meta_schedule/tune_context.h include/tvm/node/attr_registry_map.h include/tvm/node/functor.h include/tvm/node/node.h include/tvm/node/object_path.h include/tvm/node/reflection.h include/tvm/node/repr_printer.h include/tvm/node/script_printer.h include/tvm/node/serialization.h include/tvm/node/structural_equal.h include/tvm/node/structural_hash.h include/tvm/relax/analysis.h include/tvm/relax/attrs/ccl.h include/tvm/relax/attrs/create.h include/tvm/relax/attrs/datatype.h include/tvm/relax/attrs/distributed.h include/tvm/relax/attrs/image.h include/tvm/relax/attrs/index.h include/tvm/relax/attrs/linear_algebra.h include/tvm/relax/attrs/manipulate.h include/tvm/relax/attrs/nn.h include/tvm/relax/attrs/op.h include/tvm/relax/attrs/qdq.h +include/tvm/relax/attrs/sampling.h include/tvm/relax/attrs/search.h include/tvm/relax/attrs/sorting.h include/tvm/relax/attrs/statistical.h include/tvm/relax/backend.h include/tvm/relax/binding_rewrite.h include/tvm/relax/block_builder.h include/tvm/relax/dataflow_matcher.h include/tvm/relax/dataflow_pattern.h include/tvm/relax/dataflow_pattern_functor.h include/tvm/relax/distributed/axis_group_graph.h include/tvm/relax/distributed/global_info.h include/tvm/relax/distributed/struct_info.h include/tvm/relax/distributed/transform.h include/tvm/relax/exec_builder.h include/tvm/relax/expr.h include/tvm/relax/expr_functor.h include/tvm/relax/nested_msg.h include/tvm/relax/op_attr_types.h include/tvm/relax/struct_info.h include/tvm/relax/struct_info_functor.h include/tvm/relax/tir_pattern.h include/tvm/relax/transform.h include/tvm/relax/tuning_api.h include/tvm/relax/type.h include/tvm/relax/utils.h include/tvm/relay/adt.h include/tvm/relay/analysis.h include/tvm/relay/attrs/algorithm.h include/tvm/relay/attrs/annotation.h include/tvm/relay/attrs/bitserial.h include/tvm/relay/attrs/call.h include/tvm/relay/attrs/debug.h include/tvm/relay/attrs/device_copy.h include/tvm/relay/attrs/image.h include/tvm/relay/attrs/memory.h include/tvm/relay/attrs/nn.h include/tvm/relay/attrs/on_device.h include/tvm/relay/attrs/random.h include/tvm/relay/attrs/reduce.h include/tvm/relay/attrs/transform.h include/tvm/relay/attrs/vision.h include/tvm/relay/attrs/vm.h include/tvm/relay/base.h include/tvm/relay/dataflow_matcher.h include/tvm/relay/dataflow_pattern.h include/tvm/relay/dataflow_pattern_functor.h include/tvm/relay/error.h include/tvm/relay/executor.h include/tvm/relay/expr.h include/tvm/relay/expr_functor.h include/tvm/relay/feature.h include/tvm/relay/function.h include/tvm/relay/interpreter.h include/tvm/relay/op.h include/tvm/relay/op_attr_types.h include/tvm/relay/op_strategy.h include/tvm/relay/parser.h include/tvm/relay/pattern_functor.h include/tvm/relay/qnn/attrs.h include/tvm/relay/qnn/transform.h include/tvm/relay/runtime.h include/tvm/relay/transform.h include/tvm/relay/type.h include/tvm/runtime/builtin_fp16.h include/tvm/runtime/c_backend_api.h include/tvm/runtime/c_runtime_api.h include/tvm/runtime/container/adt.h include/tvm/runtime/container/array.h include/tvm/runtime/container/base.h +include/tvm/runtime/container/boxed_primitive.h include/tvm/runtime/container/closure.h include/tvm/runtime/container/map.h include/tvm/runtime/container/optional.h include/tvm/runtime/container/shape_tuple.h include/tvm/runtime/container/string.h include/tvm/runtime/container/variant.h include/tvm/runtime/contrib/libtorch_runtime.h include/tvm/runtime/contrib/papi.h -include/tvm/runtime/crt/aot_executor.h -include/tvm/runtime/crt/aot_executor_module.h -include/tvm/runtime/crt/crt.h -include/tvm/runtime/crt/error_codes.h -include/tvm/runtime/crt/func_registry.h -include/tvm/runtime/crt/graph_executor.h -include/tvm/runtime/crt/graph_executor_module.h -include/tvm/runtime/crt/logging.h -include/tvm/runtime/crt/microtvm_rpc_server.h -include/tvm/runtime/crt/module.h -include/tvm/runtime/crt/packed_func.h -include/tvm/runtime/crt/page_allocator.h -include/tvm/runtime/crt/platform.h -include/tvm/runtime/crt/rpc_common/frame_buffer.h -include/tvm/runtime/crt/rpc_common/framing.h -include/tvm/runtime/crt/rpc_common/session.h -include/tvm/runtime/crt/rpc_common/write_stream.h -include/tvm/runtime/crt/stack_allocator.h include/tvm/runtime/data_type.h include/tvm/runtime/debug.h include/tvm/runtime/device_api.h include/tvm/runtime/disco/builtin.h include/tvm/runtime/disco/cuda_ipc_memory.h include/tvm/runtime/disco/disco_worker.h include/tvm/runtime/disco/session.h include/tvm/runtime/executor_info.h include/tvm/runtime/logging.h include/tvm/runtime/memory.h include/tvm/runtime/memory/memory_manager.h include/tvm/runtime/metadata.h include/tvm/runtime/metadata_base.h include/tvm/runtime/metadata_types.h -include/tvm/runtime/micro/standalone/microtvm_runtime.h include/tvm/runtime/module.h include/tvm/runtime/name_transforms.h include/tvm/runtime/ndarray.h include/tvm/runtime/nvtx.h include/tvm/runtime/object.h include/tvm/runtime/packed_func.h include/tvm/runtime/profiling.h include/tvm/runtime/registry.h include/tvm/runtime/relax_vm/builtin.h include/tvm/runtime/relax_vm/bytecode.h include/tvm/runtime/relax_vm/executable.h include/tvm/runtime/relax_vm/ndarray_cache_support.h include/tvm/runtime/relax_vm/vm.h include/tvm/runtime/serializer.h include/tvm/runtime/threading_backend.h include/tvm/runtime/vm/bytecode.h include/tvm/runtime/vm/executable.h include/tvm/runtime/vm/vm.h include/tvm/script/ir_builder/base.h include/tvm/script/ir_builder/ir/frame.h include/tvm/script/ir_builder/ir/ir.h include/tvm/script/ir_builder/relax/frame.h include/tvm/script/ir_builder/relax/ir.h include/tvm/script/ir_builder/tir/frame.h include/tvm/script/ir_builder/tir/ir.h include/tvm/script/printer/doc.h include/tvm/script/printer/ir_docsifier.h include/tvm/script/printer/ir_docsifier_functor.h include/tvm/support/parallel_for.h include/tvm/support/random_engine.h include/tvm/support/span.h include/tvm/support/with.h include/tvm/target/codegen.h include/tvm/target/compilation_config.h include/tvm/target/generic_func.h include/tvm/target/tag.h include/tvm/target/target.h include/tvm/target/target_info.h include/tvm/target/target_kind.h include/tvm/target/virtual_device.h include/tvm/te/autodiff.h include/tvm/te/operation.h include/tvm/te/schedule.h include/tvm/te/schedule_pass.h include/tvm/te/tensor.h include/tvm/te/tensor_intrin.h include/tvm/tir/analysis.h include/tvm/tir/block_dependence_info.h include/tvm/tir/block_scope.h include/tvm/tir/buffer.h include/tvm/tir/builtin.h include/tvm/tir/data_layout.h include/tvm/tir/data_type_rewriter.h include/tvm/tir/expr.h include/tvm/tir/expr_functor.h include/tvm/tir/function.h include/tvm/tir/index_map.h include/tvm/tir/op.h include/tvm/tir/op_attr_types.h include/tvm/tir/schedule/instruction.h include/tvm/tir/schedule/schedule.h include/tvm/tir/schedule/state.h include/tvm/tir/schedule/trace.h include/tvm/tir/stmt.h include/tvm/tir/stmt_functor.h include/tvm/tir/transform.h include/tvm/tir/usmp/algo/greedy.h include/tvm/tir/usmp/algorithms.h include/tvm/tir/usmp/analysis.h include/tvm/tir/usmp/transform.h include/tvm/tir/usmp/utils.h include/tvm/tir/utils.h include/tvm/tir/var.h include/tvm/topi/broadcast.h include/tvm/topi/contrib/cublas.h include/tvm/topi/contrib/rocblas.h include/tvm/topi/cuda/dense.h include/tvm/topi/cuda/injective.h include/tvm/topi/cuda/pooling.h include/tvm/topi/cuda/reduction.h include/tvm/topi/cuda/softmax.h include/tvm/topi/detail/array_utils.h include/tvm/topi/detail/broadcast.h include/tvm/topi/detail/constant_utils.h include/tvm/topi/detail/extern.h include/tvm/topi/detail/fuse.h include/tvm/topi/detail/pad_utils.h include/tvm/topi/detail/ravel_unravel.h include/tvm/topi/detail/strided_slice.h include/tvm/topi/detail/tensor_utils.h include/tvm/topi/einsum.h include/tvm/topi/elemwise.h include/tvm/topi/generic/default.h include/tvm/topi/generic/extern.h include/tvm/topi/generic/injective.h include/tvm/topi/nn.h include/tvm/topi/nn/bias_add.h include/tvm/topi/nn/bnn.h include/tvm/topi/nn/dense.h include/tvm/topi/nn/dilate.h include/tvm/topi/nn/flatten.h include/tvm/topi/nn/group_norm.h include/tvm/topi/nn/instance_norm.h include/tvm/topi/nn/layer_norm.h include/tvm/topi/nn/local_response_norm.h include/tvm/topi/nn/mapping.h include/tvm/topi/nn/pooling.h include/tvm/topi/nn/rms_norm.h include/tvm/topi/nn/softmax.h include/tvm/topi/reduction.h include/tvm/topi/rocm/dense.h include/tvm/topi/rocm/injective.h include/tvm/topi/rocm/pooling.h include/tvm/topi/rocm/reduction.h include/tvm/topi/rocm/softmax.h include/tvm/topi/tags.h include/tvm/topi/transform.h include/tvm/topi/utils.h include/tvm/topi/vision/reorg.h include/tvm/topi/x86/bnn.h include/tvm/topi/x86/default.h include/tvm/topi/x86/injective.h lib/cmake/tvm/tvmConfig.cmake lib/cmake/tvm/tvmTargets-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/tvm/tvmTargets.cmake lib/libtvm.so lib/libtvm_runtime.so