omniperf: New package (with deps) (#46239)

Co-authored-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
This commit is contained in:
afzpatel 2024-09-24 14:21:15 -04:00 committed by GitHub
parent 3771278d50
commit 3b61a1f778
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 294 additions and 0 deletions

View File

@ -0,0 +1,24 @@
From 0672d33d7c449fe75b0be5d476d1151b26e39b99 Mon Sep 17 00:00:00 2001
From: Afzal Patel <Afzal.Patel@amd.com>
Date: Thu, 5 Sep 2024 14:29:36 +0000
Subject: [PATCH] Remove install for VERSION.sha
---
CMakeLists.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 05aac32..9cf588a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -278,7 +278,6 @@ install(
# support files and version info
install(
FILES src/argparser.py src/config.py src/omniperf_base.py src/roofline.py VERSION
- VERSION.sha
DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/${PROJECT_NAME}
COMPONENT main)
# src/omniperf_analyze
--
2.43.5

View File

@ -0,0 +1,49 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Omniperf(CMakePackage):
"""Advanced Profiling and Analytics for AMD Hardware"""
homepage = "https://github.com/ROCm/omniperf"
git = "https://github.com/ROCm/omniperf.git"
url = "https://github.com/ROCm/omniperf/archive/refs/tags/rocm-6.2.1.tar.gz"
tags = ["rocm"]
maintainers("afzpatel", "srekolam", "renjithravindrankannath")
license("MIT")
version("6.2.1", sha256="c14cb73b9fe17a3cca31489a73e8ea49cb278093f8d64c433b1bac387445074a")
depends_on("python@3.8:")
depends_on("py-pip", type="run")
depends_on("py-astunparse@1.6.2", type=("build", "run")) # wants exact version
depends_on("py-colorlover", type=("build", "run"))
depends_on("py-pyyaml")
depends_on("py-matplotlib")
depends_on("py-pandas")
depends_on("py-pymongo")
depends_on("py-tabulate")
depends_on("py-tqdm")
depends_on("py-kaleido")
depends_on("py-plotille")
depends_on("py-dash-svg", type=("build", "run"))
depends_on("py-dash", type=("build", "run"))
depends_on("py-dash-bootstrap-components", type=("build", "run"))
# VERSION.sha is not in the auto-generated ROCm release tarball
patch("0001-remove-VERSION.sha-install.patch")
def cmake_args(self):
args = [self.define("ENABLE_TESTS", self.run_tests)]
return args
@run_after("install")
def after_install(self):
touch(join_path(self.spec.prefix.libexec.omniperf, "VERSION.sha"))

View File

@ -18,6 +18,7 @@ class PyContourpy(PythonPackage):
version("1.0.7", sha256="d8165a088d31798b59e91117d1f5fc3df8168d8b48c4acc10fc0df0d0bdbcc5e")
version("1.0.5", sha256="896631cd40222aef3697e4e51177d14c3709fda49d30983269d584f034acc8a4")
depends_on("py-pybind11", type=("build", "link"))
depends_on("cxx", type="build")
with default_args(type="build"):

View File

@ -0,0 +1,22 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyDashBootstrapComponents(PythonPackage):
"""Bootstrap themed components for use in Plotly Dash"""
homepage = "https://dash-bootstrap-components.opensource.faculty.ai/"
pypi = "dash_bootstrap_components/dash_bootstrap_components-1.6.0.tar.gz"
git = "https://github.com/facultyai/dash-bootstrap-components/"
license("Apache-2.0")
version("1.6.0", sha256="960a1ec9397574792f49a8241024fa3cecde0f5930c971a3fc81f016cbeb1095")
depends_on("python@3.8:", type=("build", "run"))
depends_on("py-setuptools", type="build")

View File

@ -0,0 +1,19 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyDashSvg(PythonPackage):
"""SVG support library for Plotly/Dash"""
homepage = "https://github.com/stevej2608/dash-svg"
pypi = "dash_svg/dash_svg-0.0.12.tar.gz"
license("MIT")
version("0.0.12", sha256="a7115bf437d770b822c2dd53b9d9a981210619b7d17c925cbee04905fc761b4e")
depends_on("py-setuptools", type="build")

View File

@ -0,0 +1,26 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyDash(PythonPackage):
"""Dash is the most downloaded, trusted Python framework
for building ML & data science web apps."""
homepage = "https://dash.plotly.com/"
pypi = "dash/dash-2.17.1.tar.gz"
git = "https://github.com/plotly/dash.git"
license("MIT")
version("2.17.1", sha256="ee2d9c319de5dcc1314085710b72cd5fa63ff994d913bf72979b7130daeea28e")
depends_on("python@3.8:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-typing-extensions")
depends_on("py-flask")
depends_on("py-plotly")
depends_on("py-importlib-metadata")

View File

@ -0,0 +1,20 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyPlotille(PythonPackage):
"""Plot in the terminal using braille dots."""
homepage = "https://github.com/tammoippen/plotille"
pypi = "plotille/plotille-5.0.0.tar.gz"
git = "https://github.com/tammoippen/plotille.git"
version("5.0.0", sha256="99e5ca51a2e4c922ead3a3b0863cc2c6a9a4b3f701944589df10f42ce02ab3dc")
license("MIT")
depends_on("python@3.7:", type=("build", "run"))
depends_on("py-setuptools", type="build")

View File

@ -0,0 +1,44 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Rocal(CMakePackage):
"""The AMD rocAL is designed to efficiently decode and process images and videos from a variety
of storage formats and modify them through a processing graph programmable by the user."""
homepage = "https://github.com/ROCm/rocAL"
url = "https://github.com/ROCm/rocAL/archive/refs/tags/rocm-6.2.0.tar.gz"
maintainers("afzpatel", "srekolam", "renjithravindrankannath")
license("MIT")
version("6.2.0", sha256="c7c265375a40d4478a628258378726c252caac424f974456d488fce43890e157")
depends_on("mivisionx@6.2.0", when="@6.2.0")
depends_on("llvm-amdgpu@6.2.0", when="@6.2.0")
depends_on("rpp@6.2.0", when="@6.2.0")
depends_on("libjpeg-turbo@2.0.6+partial_decoder")
depends_on("rapidjson")
depends_on("ffmpeg@4.4:")
def patch(self):
filter_file(
r"${ROCM_PATH}/llvm/bin/clang++",
"{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix),
"rocAL/rocAL_hip/CMakeLists.txt",
string=True,
)
def cmake_args(self):
args = [
self.define("AMDRPP_PATH", self.spec["rpp"].prefix),
self.define("TURBO_JPEG_PATH", self.spec["libjpeg-turbo"].prefix),
self.define("MIVisionX_PATH", self.spec["mivisionx"].prefix),
self.define("CMAKE_INSTALL_PREFIX_PYTHON", self.spec.prefix),
]
return args

View File

@ -0,0 +1,43 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Rocdecode(CMakePackage):
"""rocDecode is a high performance video decode SDK for AMD hardware"""
homepage = "https://github.com/ROCm/rocDecode"
git = "https://github.com/ROCm/rocDecode.git"
url = "https://github.com/ROCm/rocDecode/archive/refs/tags/rocm-6.2.0.tar.gz"
tags = ["rocm"]
maintainers("afzpatel", "srekolam", "renjithravindrankannath")
license("MIT")
version("6.2.0", sha256="fe0d7c19a4e65b93405566511880b94f25ef68c830d0088f9458da9baea1d4f9")
version("6.1.2", sha256="67a13aeaa495e06683124de5908e61cf2be3beff79b13d858897344aa809775e")
version("6.1.1", sha256="5914c91e433ec7e8511b8a9017d165a0589c1aff9f5527b413d0b3a32a3cc318")
version("6.1.0", sha256="8316dbde87f1fea782af6216c8d013e866542329a673fb24a668335c6169ef8f")
amdgpu_targets = ROCmPackage.amdgpu_targets
variant(
"amdgpu_target",
description="AMD GPU architecture",
values=auto_or_any_combination_of(*amdgpu_targets),
sticky=True,
)
for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0"]:
depends_on(f"hip@{ver}", when=f"@{ver}")
def cmake_args(self):
args = []
if "auto" not in self.spec.variants["amdgpu_target"]:
args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
return args

View File

@ -0,0 +1,46 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Rocpydecode(CMakePackage):
"""rocPyDecode is a set of Python bindings to rocDecode C++ library which provides
full HW acceleration for video decoding on AMD GPUs."""
homepage = "https://github.com/ROCm/rocPyDecode"
url = "https://github.com/ROCm/rocPyDecode/archive/refs/tags/rocm-6.2.0.tar.gz"
maintainers("afzpatel", "srekolam", "renjithravindrankannath")
version("6.2.0", sha256="e465254cd3e96bbb59208e90293d7c6b7744b0fbcd928ef278ec568c83e63ff3")
depends_on("py-pybind11")
depends_on("ffmpeg@4.4:5")
depends_on("rocdecode@6.2.0", when="@6.2.0")
depends_on("dlpack")
def patch(self):
filter_file(
r"${ROCM_PATH}/llvm/bin/clang++",
"{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix),
"CMakeLists.txt",
string=True,
)
filter_file(
r"${ROCM_PATH}/share/rocdecode/utils",
"{0}/share/rocdecode/utils".format(self.spec["rocdecode"].prefix),
"CMakeLists.txt",
string=True,
)
def cmake_args(self):
args = [
self.define("rocDecode_PATH", self.spec["rocdecode"].prefix),
self.define("FFMPEG_INCLUDE_DIR", self.spec["ffmpeg"].prefix.include),
self.define("CMAKE_INSTALL_PREFIX_PYTHON", self.spec.prefix),
self.define("CMAKE_CXX_FLAGS", "-I{0}".format(self.spec["dlpack"].prefix.include)),
]
return args