diff --git a/easybuild/easyconfigs/o/ONNX-IR/ONNX-IR-0.1.12-gfbf-2024a.eb b/easybuild/easyconfigs/o/ONNX-IR/ONNX-IR-0.1.12-gfbf-2024a.eb new file mode 100644 index 000000000000..71c92a9f5803 --- /dev/null +++ b/easybuild/easyconfigs/o/ONNX-IR/ONNX-IR-0.1.12-gfbf-2024a.eb @@ -0,0 +1,28 @@ +easyblock = 'PythonPackage' + +name = 'ONNX-IR' +version = '0.1.12' + +homepage = 'https://github.com/onnx/ir-py' +description = """ +An in-memory IR that supports the full ONNX spec, designed for graph construction, analysis and +transformation. +""" + +toolchain = {'name': 'gfbf', 'version': '2024a'} + +sources = ['onnx_ir-%(version)s.tar.gz'] +checksums = ['742e0bff875d0547724187560b3f441833191c8aa939c05f14176f4892784deb'] + +dependencies = [ + ('Python', '3.12.3'), + ('ml_dtypes', '0.5.0'), + ('SciPy-bundle', '2024.05'), + ('ONNX', '1.20.0'), +] + +preinstallopts = """sed -i '/^license/d' pyproject.toml && """ +# Ensure compatibilty with numpy < 2 which had no strings module +preinstallopts += """sed -i 's/np.strings.encode/np.char.encode/' src/onnx_ir/_convenience/_constructors.py && """ + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/o/ONNX-Script/ONNX-Script-0.5.6-gfbf-2024a.eb b/easybuild/easyconfigs/o/ONNX-Script/ONNX-Script-0.5.6-gfbf-2024a.eb new file mode 100644 index 000000000000..39bce9f770e7 --- /dev/null +++ b/easybuild/easyconfigs/o/ONNX-Script/ONNX-Script-0.5.6-gfbf-2024a.eb @@ -0,0 +1,27 @@ +easyblock = 'PythonPackage' + +name = 'ONNX-Script' +version = '0.5.6' + +homepage = 'https://microsoft.github.io/onnxscript/' +description = """ +ONNX Script enables developers to naturally author ONNX functions and models using a subset of +Python. +""" + +source_urls = ['https://pypi.python.org/packages/source/%(nameletterlower)s/onnxscript'] +sources = ['onnxscript-%(version)s.tar.gz'] +checksums = ['cc3338b2976daffd2af0bb6ac4866a4dca76aefface1666a0d7bc65ad9850822'] + +toolchain = {'name': 'gfbf', 'version': '2024a'} + +dependencies = [ + ('Python', '3.12.3'), + ('ml_dtypes', '0.5.0'), + ('ONNX', '1.20.0'), + ('ONNX-IR', '0.1.12'), +] + +options = {'modulename': 'onnxscript'} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/o/ONNX/ONNX-1.20.0-gfbf-2024a.eb b/easybuild/easyconfigs/o/ONNX/ONNX-1.20.0-gfbf-2024a.eb new file mode 100644 index 000000000000..289e35db25d9 --- /dev/null +++ b/easybuild/easyconfigs/o/ONNX/ONNX-1.20.0-gfbf-2024a.eb @@ -0,0 +1,61 @@ +easyblock = 'PythonPackage' + +name = 'ONNX' +version = '1.20.0' + +homepage = 'https://onnx.ai' +description = """ +Open Neural Network Exchange (ONNX) is an open ecosystem that empowers AI +developers to choose the right tools as their project evolves. ONNX provides an +open source format for AI models, both deep learning and traditional ML. It +defines an extensible computation graph model, as well as definitions of +built-in operators and standard data types. Currently we focus on the +capabilities needed for inferencing (scoring).""" + +toolchain = {'name': 'gfbf', 'version': '2024a'} + +sources = [SOURCELOWER_TAR_GZ] +checksums = ['1a93ec69996b4556062d552ed1aa0671978cfd3c17a40bf4c89a1ae169c6a4ad'] + +builddependencies = [ + ('CMake', '3.29.3'), +] + +dependencies = [ + ('Python', '3.12.3'), + ('SciPy-bundle', '2024.05'), + ('protobuf-python', '5.28.0'), + ('typing-extensions', '4.11.0'), + ('ml_dtypes', '0.5.0'), +] + +# hardcode version in pyproject.toml rather than determining it dynamically +preinstallopts = """sed -i 's/"version",//g' pyproject.toml && """ +preinstallopts += """sed -i 's/readme = .*/version = "%(version)s"/g' pyproject.toml && """ +preinstallopts += """sed -i '/^license/d' pyproject.toml && """ + +# fix for: undefined symbol: _ZN6google8protobuf8internal15ThreadSafeArena13thread_cache_E +# see also https://bugs.archlinux.org/task/75242 +# author: Kenneth Hoste (HPC-UGent) +preinstallopts += "sed -i '50 s/if(MSVC)/#if(MSVC)/' CMakeLists.txt && " +preinstallopts += "sed -i '53 s/endif()/#endif()/' CMakeLists.txt && " + +# specify C++17 standard and link to protobuf shared library (also requires patch to use -DPROTOBUF_USE_DLLS); +# required to fix "error: 'string_view' in namespace 'std' does not name a type", +# see also https://github.com/onnx/onnx/issues/5430 +preinstallopts += "export CMAKE_ARGS='-DCMAKE_CXX_STANDARD=17 -DONNX_USE_PROTOBUF_SHARED_LIBS=ON' && " + +preinstallopts += 'env MAX_JOBS="%(parallel)s"' + +sanity_check_paths = { + 'files': ['bin/check-model', 'bin/check-node', 'bin/backend-test-tools'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +sanity_check_commands = [ + 'check-model -h', + 'check-node -h', + 'backend-test-tools -h', +] + +moduleclass = 'devel'