-
Notifications
You must be signed in to change notification settings - Fork 768
[Driver][SYCL] Remove object upon failure #18190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: sycl
Are you sure you want to change the base?
Conversation
Typical behaviors when the compilation fails is to have the resulting output object to be removed. Due to the fact that there are multiple compilations that occur during an offload compilation, the actual final output object may not be directly associated with the compile causing it to not be removed. Update the cleanup file list to remove the output result file regardless of the associated job action when we are performing offload. Signed-off-by: Michael D Toguchi <[email protected]>
Signed-off-by: Michael D Toguchi <[email protected]>
362ae2b
to
eaa113d
Compare
@@ -2708,7 +2708,11 @@ int Driver::ExecuteCompilation( | |||
// Remove result files if we're not saving temps. | |||
if (!isSaveTempsEnabled()) { | |||
const JobAction *JA = cast<JobAction>(&FailingCommand->getSource()); | |||
C.CleanupFileMap(C.getResultFiles(), JA, true); | |||
// When performing offload compilations, the result files may not match | |||
// the JobAction that fails. In that case, do not pass in the JobAction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// When performing offload compilations, the result files may not match the JobAction that fails.
Can you add some details on why they don't match?
And also give an example Offload JobAction for this scenario?
// REQUIRES: system-linux | ||
|
||
// RUN: touch %t.o | ||
// RUN: not %clangxx -fsycl -Xsycl-target-frontend -DCOMPILE_HOST_FAIL=1 -o %t.o %s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand this test. Could you please elaborate?
I think you are creating a new object file.
And triggering a host compilation failure.
And the expectation is that the object file created gets removed?
The test description mentions, Verify object removal when the offload compilation fails
, but you are triggering a host compilation failure.
Can you trigger any offload compilation action failure instead?
Typical behaviors when the compilation fails is to have the resulting output object to be removed. Due to the fact that there are multiple compilations that occur during an offload compilation, the actual final output object may not be directly associated with the compile causing it to not be removed.
Update the cleanup file list to remove the output result file regardless of the associated job action when we are performing offload.