Date: Sun, 15 Dec 2019 02:37:02 +0000 (UTC) From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r520153 - in head/misc/py-tvm: . files Message-ID: <201912150237.xBF2b2Vp069868@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yuri Date: Sun Dec 15 02:37:02 2019 New Revision: 520153 URL: https://svnweb.freebsd.org/changeset/ports/520153 Log: misc/py-tvm: Add patches for FreeBSD Added: head/misc/py-tvm/files/patch-python_tvm_contrib_cc.py (contents, props changed) head/misc/py-tvm/files/patch-python_tvm_micro_base.py (contents, props changed) Modified: head/misc/py-tvm/Makefile Modified: head/misc/py-tvm/Makefile ============================================================================== --- head/misc/py-tvm/Makefile Sun Dec 15 00:49:20 2019 (r520152) +++ head/misc/py-tvm/Makefile Sun Dec 15 02:37:02 2019 (r520153) @@ -3,7 +3,7 @@ PORTNAME= tvm DISTVERSIONPREFIX= v DISTVERSION= 0.6.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= misc # machine-learning PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} Added: head/misc/py-tvm/files/patch-python_tvm_contrib_cc.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/py-tvm/files/patch-python_tvm_contrib_cc.py Sun Dec 15 02:37:02 2019 (r520153) @@ -0,0 +1,38 @@ +--- python/tvm/contrib/cc.py.orig 2019-11-27 03:24:12 UTC ++++ python/tvm/contrib/cc.py +@@ -27,7 +27,7 @@ from .util import tempdir + def create_shared(output, + objects, + options=None, +- cc="g++"): ++ cc="c++"): + """Create shared library. + + Parameters +@@ -44,7 +44,7 @@ def create_shared(output, + cc : Optional[str] + The compiler command. + """ +- if sys.platform == "darwin" or sys.platform.startswith("linux"): ++ if sys.platform == "darwin" or sys.platform.startswith("linux") or sys.platform.startswith("freebsd"): + _linux_compile(output, objects, options, cc) + elif sys.platform == "win32": + _windows_shared(output, objects, options) +@@ -56,7 +56,7 @@ def create_shared(output, + create_shared.output_format = "so" if sys.platform != "win32" else "dll" + + +-def build_create_shared_func(options=None, compile_cmd="g++"): ++def build_create_shared_func(options=None, compile_cmd="c++"): + """Build create_shared function with particular default options and compile_cmd. + + Parameters +@@ -108,7 +108,7 @@ def cross_compiler(compile_func, base_options=None, ou + return _fcompile + + +-def _linux_compile(output, objects, options, compile_cmd="g++"): ++def _linux_compile(output, objects, options, compile_cmd="c++"): + cmd = [compile_cmd] + if output.endswith(".so") or output.endswith(".dylib"): + cmd += ["-shared", "-fPIC"] Added: head/misc/py-tvm/files/patch-python_tvm_micro_base.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/py-tvm/files/patch-python_tvm_micro_base.py Sun Dec 15 02:37:02 2019 (r520153) @@ -0,0 +1,13 @@ +--- python/tvm/micro/base.py.orig 2019-12-14 17:04:12 UTC ++++ python/tvm/micro/base.py +@@ -87,8 +87,8 @@ class Session: + + Raises error if not supported. + """ +- if not sys.platform.startswith("linux"): +- raise RuntimeError("microTVM is currently only supported on Linux") ++ if not sys.platform.startswith("linux") and not sys.platform.startswith("freebsd"): ++ raise RuntimeError("microTVM is currently only supported on Linux and FreeBSD") + # TODO(weberlo): Add 32-bit support. + # It's primarily the compilation pipeline that isn't compatible. + if sys.maxsize <= 2**32:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912150237.xBF2b2Vp069868>