Skip to content

[SYCL] Fix DAE by avoiding creation of obsolete device images #4977

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

Merged
merged 3 commits into from
Nov 24, 2021

Conversation

AGindinson
Copy link
Contributor

@AGindinson AGindinson commented Nov 17, 2021

Due to an unintentional copy of the RTDeviceBinaryImage object that
was happening in ProgramManager::build(), the NativePrograms map
was getting populated by an extra entry. No duplicating entry was
being created in the m_EliminatedKernelArgMasks, which made the
image-based lookup in ProgramManager::getEliminatedKernelArgMask()
exit early. The returned empty KernelArgMask led to errors during
kernel argument setting whenever several native programs were created
(e.g. for kernel_bundle or device code split use cases).

Tested in intel/llvm-test-suite#575.

Signed-off-by: Artem Gindinson [email protected]
Co-authored-by: Maksim Sabianin [email protected]

AGindinson pushed a commit to AGindinson/llvm-test-suite that referenced this pull request Nov 19, 2021
Until DAE is enabled by default in the compiler driver, make sure that
it works properly with the specialization constant/kernel bundle APIs.

Tests intel/llvm#4977.

Signed-off-by: Artem Gindinson <[email protected]>
@AGindinson AGindinson changed the title [DO-NOT-MERGE][HACK] Fix DAE for SYCL2020 specialization constants [SYCL] Fix DAE by avoiding creation of obsolete device images Nov 19, 2021
@AGindinson AGindinson marked this pull request as ready for review November 19, 2021 15:30
@AGindinson AGindinson requested a review from a team as a code owner November 19, 2021 15:30
@AGindinson AGindinson requested a review from s-kanaev November 19, 2021 15:30
@AGindinson AGindinson marked this pull request as draft November 19, 2021 15:56
@AGindinson
Copy link
Contributor Author

Converted back to draft - I've found that a) the duplicate native program is still created, b) the copy vs by-pointer mechanism is not actually what I've described. Will investigate deeper why the change actually helps the DAE handling.

Due to an unintentional copy of the RTDeviceBinaryImage object that
was happening in ProgramManager::build(), the NativePrograms map
was getting populated by an extra entry. No duplicating entry was
being created in the m_EliminatedKernelArgMasks, which made the
image-based lookup in ProgramManager::getEliminatedKernelArgMask()
exit early. The returned empty KernelArgMask led to errors during
kernel argument setting whenever several native programs were created
(e.g. for `kernel_bundle` or device code split use cases).

Tested in intel/llvm-test-suite#575.

Signed-off-by: Artem Gindinson <[email protected]>
Co-authored-by: Maksim Sabianin <[email protected]>
@AGindinson AGindinson marked this pull request as ready for review November 22, 2021 12:45
@AGindinson
Copy link
Contributor Author

/verify with intel/llvm-test-suite#575

@AGindinson
Copy link
Contributor Author

/verify with intel/llvm-test-suite#575

@AGindinson
Copy link
Contributor Author

/verify with intel/llvm-test-suite#575

@AGindinson
Copy link
Contributor Author

CUDA compilation failures for reduction tests in Jenkins/llvm-test-suite do not seem to be related to either of my patches.

@bader
Copy link
Contributor

bader commented Nov 23, 2021

CUDA compilation failures for reduction tests in Jenkins/llvm-test-suite do not seem to be related to either of my patches.

FYI - #5008.

@bader bader merged commit 5ca3628 into intel:sycl Nov 24, 2021
@AGindinson AGindinson deleted the dae-with-spec-consts branch November 24, 2021 05:34
vladimirlaz pushed a commit to intel/llvm-test-suite that referenced this pull request Nov 25, 2021
Until DAE is enabled by default in the compiler driver, make sure that
it works properly with the specialization constant/kernel bundle APIs.

Extend onto device code split tests

Tests intel/llvm#4977.

Signed-off-by: Artem Gindinson <[email protected]>
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
…#575)

Until DAE is enabled by default in the compiler driver, make sure that
it works properly with the specialization constant/kernel bundle APIs.

Extend onto device code split tests

Tests intel#4977.

Signed-off-by: Artem Gindinson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants