Hello community,

here is the log from the commit of package tvm for openSUSE:Factory checked in 
at 2020-09-09 18:01:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tvm (Old)
 and      /work/SRC/openSUSE:Factory/.tvm.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tvm"

Wed Sep  9 18:01:07 2020 rev:2 rq:833203 version:0.6.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/tvm/tvm.changes  2020-09-04 11:12:04.179029456 
+0200
+++ /work/SRC/openSUSE:Factory/.tvm.new.3399/tvm.changes        2020-09-09 
18:07:25.567497624 +0200
@@ -1,0 +2,47 @@
+Wed Sep  9 07:24:05 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Fix typo
+
+-------------------------------------------------------------------
+Tue Sep  8 15:46:48 UTC 2020 - Guillaume GARDET <[email protected]>
+
+- Exclude %arm %{ix86} as tests fail
+
+-------------------------------------------------------------------
+Tue Sep  8 13:59:13 UTC 2020 - Guillaume GARDET <[email protected]>
+
+- Skip tests requiring opencl
+- Skip test requiring a specific arch
+
+-------------------------------------------------------------------
+Tue Sep  8 08:21:36 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Split cmake folder to not override it with python builds
+- Fix detection of this folder in the python modules:
+  * lib-finder-python-cmake.patch
+
+-------------------------------------------------------------------
+Tue Sep  8 07:04:06 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Add provides/obsoletes on TVM
+
+-------------------------------------------------------------------
+Mon Sep  7 10:40:07 UTC 2020 - Guillaume GARDET <[email protected]>
+
+- Build fails on Tumbleweed with llvm10, so use llvm9 - boo#1176220
+
+-------------------------------------------------------------------
+Mon Sep  7 09:40:47 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Format with spec-cleaner
+- Expand properly the fdupes call
+- Fix headers install
+- Fix python pkg names
+- Fix python requires
+
+-------------------------------------------------------------------
+Thu Sep  3 16:26:06 UTC 2020 - Guillaume GARDET <[email protected]>
+
+- Package nnvm and topi python packages
+
+-------------------------------------------------------------------

New:
----
  lib-finder-python-cmake.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ tvm.spec ++++++
--- /var/tmp/diff_new_pack.UdxYNk/_old  2020-09-09 18:07:26.667498627 +0200
+++ /var/tmp/diff_new_pack.UdxYNk/_new  2020-09-09 18:07:26.671498630 +0200
@@ -15,25 +15,16 @@
 # Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
+
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
-# Build python binding
-%bcond_without python
-
-
 %ifarch x86_64
 %bcond_without mkldnn
 %else
 %bcond_with mkldnn
 %endif
-
-# Build fails on TW with LLVM
-%if 0%{?suse_version} > 1500
-%bcond_with llvm
-%else
-%bcond_without llvm
-%endif
-
+# regular cmake builddir conflicts with the python singlespec
+%global __builddir build_cmake
 Name:           tvm
 Version:        0.6.1
 Release:        0
@@ -41,20 +32,25 @@
 License:        Apache-2.0
 URL:            https://tvm.apache.org/
 Source:         
https://github.com/apache/incubator-tvm/archive/v%{version}.tar.gz
+Patch0:         lib-finder-python-cmake.patch
+BuildRequires:  %{python_module Cython}
+BuildRequires:  %{python_module attrs}
+BuildRequires:  %{python_module decorator}
+BuildRequires:  %{python_module numpy}
+BuildRequires:  %{python_module psutil}
+BuildRequires:  %{python_module pytest}
+BuildRequires:  %{python_module scipy}
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module tornado}
 BuildRequires:  cmake
 BuildRequires:  dlpack-devel
 BuildRequires:  dmlc-core-devel
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++
 BuildRequires:  gtest
-%if %{with llvm}
-BuildRequires:  llvm-devel
-%endif
-%if %{with mkldnn}
-BuildRequires:  mkl-dnn-devel
-%endif
 #BuildRequires:  openblas-devel
 BuildRequires:  pkgconfig
+BuildRequires:  rang-devel
 BuildRequires:  spirv-headers
 BuildRequires:  spirv-tools
 BuildRequires:  spirv-tools-devel
@@ -62,24 +58,47 @@
 BuildRequires:  pkgconfig(OpenCL)
 BuildRequires:  pkgconfig(gl)
 BuildRequires:  pkgconfig(glfw3)
-BuildRequires:  rang-devel
-%if %{with python}
-BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module numpy}
-BuildRequires:  %{python_module Cython}
-BuildRequires:  %{python_module decorator}
-BuildRequires:  %{python_module attrs}
-BuildRequires:  %{python_module psutil}
-BuildRequires:  %{python_module setuptools}
+Requires:       python-attrs
+Requires:       python-decorator
+Requires:       python-numpy
+Requires:       python-psutil
+# Tests are failing on 32-bit
+ExcludeArch:    %{arm} %{ix86}
 %if 0%{?suse_version} > 1500
 BuildRequires:  xgboost
 %endif
-BuildRequires:  %{python_module scipy}
-BuildRequires:  %{python_module tornado}
+%if 0%{?suse_version} > 1500
+Requires:       xgboost
 %endif
-%if %{with python}
-%python_subpackages
+# Build fails on TW with LLVM10 - boo#1176220
+%if 0%{?suse_version} > 1500
+BuildRequires:  llvm9-devel
+%else
+BuildRequires:  llvm-devel
+%endif
+%if %{with mkldnn}
+BuildRequires:  mkl-dnn-devel
 %endif
+%python_subpackages
+
+%package nnvm
+Summary:        NNVM Compiler: Open Compiler for AI Frameworks
+Requires:       python-numpy
+BuildArch:      noarch
+
+%description nnvm
+The NNVM compiler can directly take models from deep learning frameworks such 
as Apache MXNet.
+It also support model exchange formats such as ONNX and CoreML.
+ONNX support enables NNVM to compile deep learning models from PyTorch, Caffe2 
and CNTK.
+
+%package topi
+Summary:        TVM Operator Inventory (TOPI)
+Requires:       python-decorator
+Requires:       python-numpy
+BuildArch:      noarch
+
+%description topi
+TOPI provides numpy-style generic operations and schedules with higher 
abstractions than TVM.
 
 %description
 TVM is an open deep learning compiler stack for CPUs, GPUs, and specialized 
accelerators. 
@@ -87,16 +106,27 @@
 
 %package -n %{name}-devel
 Summary:        An End to End Deep Learning Compiler Stack
-Requires:       %{name} = %{version}
+Requires:       libtvm = %{version}
 
 %description -n %{name}-devel
 TVM is an open deep learning compiler stack for CPUs, GPUs, and specialized 
accelerators. 
 It aims to close the gap between the productivity-focused deep learning 
frameworks, and the performance- or efficiency-oriented hardware backends.
 
+%package -n libtvm
+Summary:        Libraries generated for TVM
+# renamed up to libtvm here
+Provides:       tvm
+Obsoletes:      tvm
+
+%description -n libtvm
+Libraries generated for TVM without any provided soname.
+
 %prep
 %setup -q -n incubator-%{name}-%{version}
+%autopatch -p1
+
 # Workaround - 
https://discuss.tvm.ai/t/build-fails-on-tvm-0-6-0-0-6-1-with-gcc10-and-gcc7/7462/5?u=ggardet
-ln -s /usr/include/endian.h include/endian.h
+ln -s %{_includedir}/endian.h include/endian.h
 
 %build
 # USE_ANTLR - fails to find the antlr4 we provide
@@ -110,11 +140,7 @@
   -DDMLC_PATH="%{_includedir}/dmlc" \
   -DDLPACK_PATH="%{_includedir}/dlpack" \
   -DRANG_PATH="%{_includedir}/rang" \
-%if %{with llvm}
   -DUSE_LLVM=ON \
-%else
-  -DUSE_LLVM=OFF \
-%endif
   -DUSE_BLAS="none" \
 %if %{with mkldnn}
   -DUSE_MKLDNN=ON \
@@ -133,44 +159,56 @@
   -DUSE_RTTI=ON \
   -DUSE_SORT=ON \
   -DUSE_THREADS=ON \
-  -DUSE_VULKAN=ON
+  -DUSE_VULKAN=ON \
+  -DINSTALL_DEV=ON
 %cmake_build
-%if %{with python}
-pushd ../python
-%python_build
-popd
-%endif
+cd ..
+export TVM_LIBRARY_PATH="$(pwd)/%{__builddir}"
+for folder in '' nnvm topi; do
+  pushd ./$folder/python
+  %python_build
+  popd
+done
 
 %install
 %cmake_install
-%if %{with python}
-pushd python 
-%python_install
-popd
-# Remove /usr/tvm/*.so
-rm -rf %{buildroot}/usr/tvm
+# remove endian hack
+rm -f %{buildroot}%{_includedir}/endian.h
+export TVM_LIBRARY_PATH="$(pwd)/%{__builddir}"
+for folder in '' nnvm topi; do
+  pushd ./$folder/python
+  %python_install
+  popd
+done
+# Remove /usr/{tvm,nnvm,topi}/*.so
+rm -rf %{buildroot}%{_prefix}/{tvm,nnvm,topi}
 # Remove .cpp file
-rm %{buildroot}/%{python_sitearch}/tvm/_ffi/_cython/core.cpp
-%fdupes %{buildroot}%{python_sitearch}
-%endif
+%python_expand rm %{buildroot}/%{$python_sitearch}/tvm/_ffi/_cython/core.cpp
+%python_expand %fdupes %{buildroot}%{$python_sitearch}
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
 
-%if %{with llvm}
-# UnitTests requires LLVM support
 %check
-LD_LIBRARY_PATH="$(pwd)/build/" \
-  ./tests/scripts/task_cpp_unittest.sh
-%if %{with python}
-# Drop test which needs an openCL device
+pushd %{__builddir}
+%make_build cpptest
+export LD_LIBRARY_PATH=$(pwd)
+for test in *_test; do
+    ./$test
+done
+popd
+export TVM_INCLUDE_PATH=%{buildroot}%{_prefix}
+# this test needs working vulkan
 rm tests/python/unittest/test_runtime_ndarray.py
-# Disable python tests for now as a number of them requires hardware for Vulkan
-# ./tests/scripts/task_python_unittest.sh
-%endif
-%endif
+# test_device_module_dump or test_conv2d_scalar_bop or test_broadcast_bop or 
test_tensor_scalar_bop or test_vulkan or test_add_pipeline or 
test_cmp_load_store - also need vulkan
+# test_task_tuner_without_measurement or test_fit or test_tuner or 
test_opencl_ternary_expression or test_opencl_inf_nan or test_gpu or 
test_simplex_data_transferring or test_duplex_data_transferring - Needs openCL
+# test_fp16_to_fp32 fails on non-x86 as it uses skylake as llvm target
+%{python_expand # test with both $python sitearch and sitelib
+export 
PYTHONPATH="%{buildroot}%{$python_sitearch}:%{buildroot}%{$python_sitelib}"
+$python -m pytest -v tests/python/unittest -k 'not (test_device_module_dump or 
test_conv2d_scalar_bop or test_broadcast_bop or test_tensor_scalar_bop or 
test_vulkan or test_add_pipeline or test_cmp_load_store or 
test_task_tuner_without_measurement or test_fit or test_tuner or 
test_opencl_ternary_expression or test_opencl_inf_nan or test_gpu or 
test_simplex_data_transferring or test_duplex_data_transferring or 
test_fp16_to_fp32)'}
 
 %post -n %{name} -p /sbin/ldconfig
 %postun -n %{name} -p /sbin/ldconfig
 
-%files
+%files -n libtvm
 %license LICENSE
 %doc README.md
 %{_libdir}/libtvm.so
@@ -179,15 +217,29 @@
 %{_libdir}/libtvm_runtime.so
 
 %files -n %{name}-devel
+%dir %{_includedir}/nnvm
+%dir %{_includedir}/topi
 %dir %{_includedir}/tvm
+%{_includedir}/nnvm/*
+%{_includedir}/topi/*
 %{_includedir}/tvm/*
 
-%if %{with python}
 %files %{python_files}
 %dir %{python_sitearch}/tvm
 %{python_sitearch}/tvm/*
 %dir %{python_sitearch}/tvm*egg-info/
 %{python_sitearch}/tvm*egg-info/*
-%endif
+
+%files %{python_files nnvm}
+%dir %{python_sitelib}/nnvm
+%{python_sitelib}/nnvm/*
+%dir %{python_sitelib}/nnvm*egg-info/
+%{python_sitelib}/nnvm*egg-info/*
+
+%files %{python_files topi}
+%dir %{python_sitelib}/topi
+%{python_sitelib}/topi/*
+%dir %{python_sitelib}/topi*egg-info/
+%{python_sitelib}/topi*egg-info/*
 
 %changelog

++++++ lib-finder-python-cmake.patch ++++++
Index: incubator-tvm-0.6.1/nnvm/python/nnvm/libinfo.py
===================================================================
--- incubator-tvm-0.6.1.orig/nnvm/python/nnvm/libinfo.py
+++ incubator-tvm-0.6.1/nnvm/python/nnvm/libinfo.py
@@ -46,7 +46,7 @@ def find_lib_path():
 
     api_path = os.path.join(base_path, '..', '..', 'lib')
     cmake_build_path_win = os.path.join(base_path, '..', '..', '..', 'build', 
'Release')
-    cmake_build_path = os.path.join(base_path, '..', '..', '..', 'build')
+    cmake_build_path = os.path.join(base_path, '..', '..', '..', 'build_cmake')
     install_path = os.path.join(base_path, '..', '..', '..')
     dll_path = [base_path, api_path, cmake_build_path_win, cmake_build_path,
                 install_path]
@@ -61,11 +61,11 @@ def find_lib_path():
     if sys.platform.startswith('win32'):
         vs_configuration = 'Release'
         if platform.architecture()[0] == '64bit':
-            dll_path.append(os.path.join(base_path, '..', '..', '..', 'build', 
vs_configuration))
+            dll_path.append(os.path.join(base_path, '..', '..', '..', 
'build_cmake', vs_configuration))
             dll_path.append(os.path.join(base_path, '..', '..', '..', 
'windows', 'x64',
                                          vs_configuration))
         else:
-            dll_path.append(os.path.join(base_path, '..', '..', '..', 'build', 
vs_configuration))
+            dll_path.append(os.path.join(base_path, '..', '..', '..', 
'build_cmake', vs_configuration))
             dll_path.append(os.path.join(base_path, '..', '..', '..', 
'windows', vs_configuration))
         dll_path = [os.path.join(p, '%s.dll' % lib_name) for p in dll_path]
     elif sys.platform.startswith('darwin'):

Reply via email to