[tmva][sofie] Parse generated code at test runtime#21184
Open
guitargeek wants to merge 1 commit intoroot-project:masterfrom
Open
[tmva][sofie] Parse generated code at test runtime#21184guitargeek wants to merge 1 commit intoroot-project:masterfrom
guitargeek wants to merge 1 commit intoroot-project:masterfrom
Conversation
cfba928 to
a47de91
Compare
Test Results 22 files 22 suites 3d 15h 35m 27s ⏱️ Results for commit 2f82ccb. ♻️ This comment has been updated with latest results. |
TMVA SOFIE development is challenging sometimes, because of how the tests are structured. The tests that covers many possible models imported from ONNX or ROOT have the issue that they includes **all** emitted code in the compiled executables. This means that one gets a build failure on the first model that generated invalid code, and that was it. Therefore, it's difficult to debug what is going wrong. This commit suggests include the generated code with the interpreter instead. Then, one can check for each individual model if the code was valid, and if not, skip over to the next test a print the emitted code that failed to compile. It has some performance overhead, but the tests still only take about 6 seconds. The drastically improved debugging experience justifies these few extra seconds spent on testing. This was motivated by the effort to refactor the SOFIE-emitted code to make it differentiable with Clad.
a47de91 to
2f82ccb
Compare
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.
TMVA SOFIE development is challenging sometimes, because of how the tests are structured.
The tests that covers many possible models imported from ONNX or ROOT have the issue that they includes all emitted code in the compiled executables. This means that one gets a build failure on the first model that generated invalid code, and that was it. Therefore, it's difficult to debug what is going wrong.
This commit suggests include the generated code with the interpreter instead. Then, one can check for each individual model if the code was valid, and if not, skip over to the next test a print the emitted code that failed to compile.
It has some performance overhead, but the tests still only take about 6 seconds. The drastically improved debugging experience justifies these few extra seconds spent on testing.
This was motivated by the effort to refactor the SOFIE-emitted code to make it differentiable with Clad.