Repository navigation
test(miopen)[ALMIOPEN-3097]: destroy find-2.0 solutions in na_*find2 tests and re-enable them under ASAN - #15016
aalabsi-amd wants to merge 2 commits into
Conversation
…tests and re-enable them under ASAN The batch-norm + activation find-2.0 tests called miopenFindSolutions and miopenRunSolution but never miopenDestroySolution, so LeakSanitizer failed ASAN runs at exit. Destroy each solution after running it, and drop the ALMIOPEN-3097 ASAN SKIP_TESTS entries for na_inference_find2.cpp and na_train_find2.cpp.
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
JonathanLichtnerAMD
left a comment
There was a problem hiding this comment.
LGTM. Each of the 5 verifiers now destroys the solution returned by miopenFindSolutions, and nothing between find and the run loop can return early. Optional nit: an RAII deleter would keep this leak-proof if someone later adds an ASSERT_* before the loop. No suggested fixes.
Co-authored by Claude (AI).
…find2 tests Review follow-up: wrap solutions in MIOPEN_MANAGE_PTR(miopenSolution_t, miopenDestroySolution) via a FindSolutions() helper that takes ownership right after miopenFindSolutions, so a later ASSERT_* or early return cannot leak them. Also initializes solutions_found, which was read uninitialized when the find call failed.
Done in 0dc7dfc: solutions are now owned by MIOPEN_MANAGE_PTR(miopenSolution_t, miopenDestroySolution) via a |
JIRA ID : ALMIOPEN-3097
Motivation
Under ASAN,
miopen_gtestexits 1 because LeakSanitizer reports leaks at exit from the find-2.0 batch-norm +activation tests. Each
gpu()verifier callsmiopenFindSolutions, runs the returned solutions, and never callsmiopenDestroySolution. Every direct leak points atmiopenFindSolutions(src/api/find2_0_commons.cpp:278,new miopen::Solution{...}). The assertions pass; the leak is in the tests, not the library.Because of this, #13107 excluded both files from ASAN builds (
SKIP_TESTSintest/gtest/CMakeLists.txt), whichdrops all 558 cases of
*/GPU_na_train_find2_*and*/GPU_na_inference_find2_*from every ASAN build.Technical Details
test/gtest/CMakeLists.txt: remove the ALMIOPEN-3097SKIP_TESTSentries, so ASAN builds compile and run bothfiles again.
find_2_conv.cppstays in the ASAN skip list; its leak has not been investigated and is out of scope here.Test Plan
Local ASAN build of this branch against the rockrel Multi-Arch Release ASAN (nightly) #139 artifacts
(run 40425965688, TheRock e73fd19),
-fsanitize=address -shared-libasan,THEROCK_SANITIZER=ASAN,GPU_TARGETS=gfx942:xnack+; test environment as TheRock CIconfigure_asan_env.py(
ASAN_OPTIONS=detect_odr_violation=0:quarantine_size_mb=600:verify_asan_link_order=0:symbolize=1,HSA_XNACK=1,leak detection on):
Test Result
na_*find2cases run under ASANSKIP_TESTS); the Smoke cases passed in the #13107 canary run, but the process failed at exit47556 byte(s) leaked in 452 allocation(s): direct leaks frommiopenFindSolutions<-na_train_find2.cpp:534/710,na_inference_find2.cpp:164Run: Slurm job 68262003 on
banff-cyxtera-s83-2(MI300X,gfx942:sramecc+:xnack+,amdgpu.noretry=-1), 73 min;LSan suppressions file loaded but unused (
Suppressions usednever printed).Second run:
LeakSanitizer or AddressSanitizer output
Submission Checklist