Repository navigation
Conversation
rocSPARSE level_3 spmm was never added to the parent CMakeLists.txt and Makefile, and HIP-Basic execution_context and rocProfiler-SDK thread_trace are listed in the parent CMakeLists.txt but not in the parent Makefile. Add them next to their neighbours. Signed-off-by: Dezhen Lu <dezhen.lu@student.uni-tuebingen.de>
…code Makefiles
$^ also passed rocprofiler_utils.hpp to the compiler, which clang
rejects with -o ("cannot specify -o when generating multiple output
files"). List the .cpp files instead, as pc_sampling does.
Signed-off-by: Dezhen Lu <dezhen.lu@student.uni-tuebingen.de>
Author
|
I only noticed after opening this that #597 already wires up the same three examples ( The second commit isn't covered there. Since #571 the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a repost of #588, which is no longer visible. It is rebased onto the current default branch.
Motivation
rocSPARSE/level_3/spmm,HIP-Basic/execution_contextandrocProfiler-SDK/thread_traceeach have their ownCMakeLists.txtandMakefile, but the parent directory doesn't list them. So the top-level builds and CI skip them.spmmis missing from both parent files. The other two are missing only from the parentMakefile.Technical Details
This adds the missing entries, in the same alphabetical position the neighbouring entries use:
Libraries/rocSPARSE/level_3/CMakeLists.txt:add_subdirectory(spmm)betweensddmmandspsmLibraries/rocSPARSE/level_3/Makefile:spmmbetweensddmmandspsmHIP-Basic/Makefile:execution_contextbetweeneventsandgpu_arch, outside the CUDA-only and HIP-only blocks, as inHIP-Basic/CMakeLists.txt. Its own Makefile already handles both runtimes.Libraries/rocProfiler-SDK/Makefile:thread_traceafterpc_sampling. CMake already builds and tests it unconditionally on Linux, and its Makefile links the same libraries as the CMake target.No workflow or skip manifest changes. CI builds from these lists, and none of the three examples is in
skip_manifest.py.How I found it
I was reading the rocSPARSE level 3 examples and noticed that
spmmhas a README entry and VS projects but no line in the parentCMakeLists.txt.git logshows it came in with #102 next tosddmmandspsm, which were added to both parent files whilespmmwasn't. I then wrote a small script that walks the tree and reports every directory with its ownCMakeLists.txtorMakefilethat the parent doesn't reference. Apart from the three that are commented out in their parentCMakeLists.txtwith a comment saying why (mv_objdetect,opencv_orb,groupedgemm_get_all_algos_ext), these three were the only hits.Where this can show up in practice
If someone builds the examples from the top level with CMake or Make, they don't get these three binaries, and
ctest/make testdon't run them. CI has never compiledspmmon Linux, and the Visual Studio workflow, which does have projects for it, is currently disabled. So right now a rocSPARSE API change that brokespmmwouldn't show up in any CI job. I don't have a report from someone who ran into this. This is my reading of the build files.The second commit lists the
.cppsources explicitly in thethread_traceandcode_object_isa_decodeMakefiles. Since #571 moved the Makefiles to amdclang++,$^also passesrocprofiler_utils.hppto the compiler, and clang rejects that with-o("cannot specify -o when generating multiple output files").pc_samplingalready lists its sources this way.Test Plan
Without a ROCm install (macOS, arm64):
make -nin each of the three parent directories, before and after:allandtestnow also enterspmm,execution_contextandthread_tracerespectively, and nothing else changes.spmm/main.cpp,-fsyntax-onlywith the flags from its Makefile (c++ -std=c++17 -Wall -Wextra -D__HIP_PLATFORM_AMD__) against the rocSPARSE headers from rocm-libraries and the HIP headers from rocm-systems at today's heads. The headers those libraries generate at build time (rocsparse-config.h,rocsparse-version.h,rocsparse-export.h,hip/hip_version.h) were stubbed.sddmm,spsmandcsrmmwere checked the same way for comparison.spmm/main.cppagainst therocsparse_spmmheader docs: it calls the buffer size, preprocess and compute stages in the documented order.Test Result
make -n: one new target per directory, as listed above.spmmand the three comparison examples have no errors and no warnings.Not run: a CMake configure or any build against a real ROCm install, and none of the examples were run on a GPU. I don't have AMD hardware, so the CI run here will be the first Linux build and
make testrun ofspmm.Added/Updated documentation?
Included Visual Studio files?
spmmalready has VS projects. This PR only touches the Linux CMake and Make lists and doesn't add VS projects for the other two.)Submission Checklist