Open
Conversation
* Improper string substitutions for kernel locations * Missing includes Still fails to compile - seems like this path is not used?
pvelesko
commented
Mar 11, 2024
Comment on lines
+327
to
+338
| // template <typename... Typenames, typename K, typename Dim, typename... Args> | ||
| // void launchKernel(K kernel, Dim numBlocks, Dim numThreads, std::uint32_t memPerBlock, | ||
| // hipStream_t stream, Args&&... packedArgs) { | ||
| // #ifndef RTC_TESTING | ||
| // validateArguments(kernel, packedArgs...); | ||
| // kernel<<<numBlocks, numThreads, memPerBlock, stream>>>(std::forward<Args>(packedArgs)...); | ||
| // #else | ||
| // launchRTCKernel<Typenames...>(kernel, numBlocks, numThreads, memPerBlock, stream, | ||
| // std::forward<Args>(packedArgs)...); | ||
| // #endif | ||
| // HIP_CHECK(hipGetLastError()); | ||
| // } |
Contributor
Author
There was a problem hiding this comment.
This wasn't working - fix implemented below. With the following changes I was able to compile using LLVM17.
This solution seems not to respect const. Does the original implementation (can't test since it doesn't compile) ?
pvelesko
commented
Mar 11, 2024
Comment on lines
+1
to
+6
| #ifndef KERNELS_PATH_H | ||
| #define KERNELS_PATH_H | ||
|
|
||
| #define KERNELS_PATH "@CMAKE_CURRENT_SOURCE_DIR@/kernels/" | ||
|
|
||
| #endif No newline at end of file |
Contributor
Author
There was a problem hiding this comment.
This part also didn't compile. Tried escaping in the CMakeLists.txt but didn't work.
Contributor
Author
|
Compilation error in original code |
Contributor
Author
|
Contributor
Author
|
Compilation error with -DRTC_TESTING=ON |
Contributor
Author
* device-side mallloc and free, wall_clock placeholders were implemented
rakesroy
approved these changes
Apr 25, 2024
Contributor
|
!verify |
Contributor
Author
|
@rakesroy Any information regarding intention to merge? |
Contributor
|
Hi @pvelesko, |
Remap HIP_PLATFORM spirv→amd with HIP_PLATFORM_IS_SPIRV flag. Port test reliability fixes (reduced iteration counts, event debug prints). Exclude unsupported test categories and AMD-specific APIs for SPIR-V. Strip hiprtc linking, relax -Werror, add hipconfig fallback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Exclude multiproc tests (fork() incompatible with OpenCL/Level Zero) - Exclude managed memory tests (hipMemAdvise, hipMallocManaged, etc.) - Exclude thread_block_tile (GENERATE combinatorial explosion + wrong results) - Reduce hipDeviceSynchronize iterations (1<<25 -> 1<<20) - Reduce hipMallocConcurrency loop counts (50K -> 5K, 10K -> 1K) - Reduce hipStreamCreateWithPriority alloc sizes (256MB -> 16MB) - Reduce hipHostRegister_Memcpy sizes (100MB -> 10MB) - Reduce hipMemset large allocation (256MB -> 16MB)
…ed memory - Exclude SVM tests for SPIR-V (fine-grain atomics not supported) - Properly exclude managed memory from MemoryTest1 for SPIR-V - Further reduce iteration counts and allocation sizes: - hipDeviceSynchronize: 1<<20 -> 1<<16 - hipStreamCreateWithPriority: 4MB -> 1MB, grid 256 -> 64 - hipHostRegister: LEN 1M -> 256K, LARGE_CHUNK 10x -> 4x - hipMallocConcurrency: 5K -> 500, 1K -> 100 iterations - hipMemcpy_old: NUM_ELM 4M -> 512K
- Use one tests file per executable to avoid duplicate names when multiple exes share the same TEST_SET and accumulation when same exe is rebuilt - Add unique TEST_SUFFIX per executable for CTest names - Change CatchAddTests from file(APPEND) to file(WRITE) to overwrite on rebuild
Replace add_custom_target with add_custom_command(OUTPUT ...) for libLazyLoad.so, bit_extract_kernel.code, and vecadd.cc so Ninja can track outputs and skip commands when up to date. Phony custom targets were rebuilt every time build_tests ran.
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 PR makes the necessary changes to enable these tests to work with chipStar HIP runtime.
CatchAddTests.cmakeand addCATCH2_DISCOVER_TESTS_COMPILE_TIMECMake option to fix the compile-time test discovery.