Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions repos/spack_repo/builtin/packages/hipblaslt/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def url_for_version(self, version):
]:
depends_on(f"hip@{ver}", when=f"@{ver}")
depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just wondering if you've tested this and it was working? For some reason when I tried adding a rocm-cmake dependency it was still attempting to clone rocm-cmake

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked with a slight variation of this recipe, but my last cleanup might have altered the outcome I had a test going on with this one as well, let me check

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice line 381 the variable FETCHCONTENT_SOURCE_DIR_ROCMCMAKEBUILDTOOLS it points towards the installation of rocm-cmake. This is what prevents the source fetch
I confirm that this recipe works with the added cmake args

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok , I missed that. Thank you!


for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]:
depends_on(f"hipblas@{ver}", when=f"@{ver}")
Expand Down Expand Up @@ -175,6 +176,25 @@ def url_for_version(self, version):
depends_on("py-pyyaml+libyaml", when="@7.1:")
depends_on("py-packaging", when="@7.1:")
depends_on("py-msgpack", when="@7.1:")
depends_on("py-nanobind", when="@7.1:")
depends_on("spdlog", when="@7.1:")

resource(
name="libdivide",
git="https://github.com/ridiculousfish/libdivide.git",
commit="af7be6946c7a217023611e877cdf6ba93e880e30",
destination="deps",
placement="libdivide",
when="@7.1:",
)
resource(
name="yaml_cpp",
url="https://github.com/jbeder/yaml-cpp/archive/0.8.0.tar.gz",
sha256="fbe74bbdcee21d656715688706da3c8becfd946d92cd44705cc6098bb23b3a16",
destination="deps",
placement="yaml_cpp",
when="@7.1:",
)

# Sets the proper for clang++ and clang-offload-blunder.
# Also adds hipblas and msgpack include directories
Expand Down Expand Up @@ -271,6 +291,13 @@ def patch(self):
string=True,
)
if self.spec.satisfies("@7.1:"):
filter_file(
"if(ROCROLLER_ENABLE_YAML_CPP)\n if(ROCROLLER_ENABLE_FETCH)",
"if(ROCROLLER_ENABLE_YAML_CPP)\n find_package(yaml-cpp 0.8.0 QUIET)\n "
+ " if(NOT yaml-cpp_FOUND AND ROCROLLER_ENABLE_FETCH)",
"shared/rocroller/CMakeLists.txt",
string=True,
)
yaml_path = os.path.join(self.spec["py-pyyaml"].prefix, purelib)
packaging_path = os.path.join(self.spec["py-packaging"].prefix, purelib)
msgpack_path = os.path.join(self.spec["py-msgpack"].prefix, purelib)
Expand Down Expand Up @@ -340,6 +367,25 @@ def cmake_args(self):
)
if self.spec.satisfies("@7.1:"):
args.append(self.define("HIPBLASLT_ENABLE_CLIENT", self.run_tests))
args.append(self.define("FETCHCONTENT_TRY_FIND_PACKAGE_MODE", "ALWAYS"))
args.append(self.define("ROCROLLER_ENABLE_FETCH", "OFF"))
args.append(self.define("ROCROLLER_ENABLE_YAML_CPP", "ON"))
args.append(self.define("ROCROLLER_ENABLE_LLVM", "ON"))
libdivide_source = join_path(self.stage.source_path, "deps", "libdivide")
yaml_cpp_source = join_path(self.stage.source_path, "deps", "yaml_cpp")
args.append(self.define("FETCHCONTENT_SOURCE_DIR_LIBDIVIDE", libdivide_source))
args.append(self.define("FETCHCONTENT_SOURCE_DIR_libdivide", libdivide_source))
args.append(self.define("FETCHCONTENT_SOURCE_DIR_YAML_CPP", yaml_cpp_source))
args.append(self.define("FETCHCONTENT_SOURCE_DIR_yaml_cpp", yaml_cpp_source))
args.append(self.define("yaml-cpp_DIR", yaml_cpp_source))
args.append(self.define("spdlog_ROOT", self.spec["spdlog"].prefix))
args.append(self.define("spdlog_DIR", self.spec["spdlog"].prefix.lib.cmake.spdlog))
args.append(
self.define(
"FETCHCONTENT_SOURCE_DIR_ROCMCMAKEBUILDTOOLS",
self.spec["rocm-cmake"].prefix,
)
)
args.append(
self.define(
"TENSILELITE_OFFLOADBUNDLER",
Expand Down
Loading