Skip to content
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

[L0][Bindless Image] Bug fixes and sampled image support #1470

Merged
merged 10 commits into from
Jun 19, 2024

Conversation

wenju-he
Copy link
Contributor

@wenju-he wenju-he commented Mar 25, 2024

This PR fixes some tests on DG2.

  • update level-zero loader tag to v1.17.0 which contains definition of
    ZE_IMAGE_BINDLESS_EXP_FLAG_SAMPLED_IMAGE
  • Use L0 ImageCopy ext API for copying to/from non-usm
  • Use zeCommandListAppendImageCopyRegion for device to device copy
  • fix image1DArray copy
  • fix pixel size of half type
  • support ZE_MEMORY_TYPE_SHARED in bindlessImagesCreate
  • Create sampled image from image and sampler descriptors

…-usm

This PR fixes read_write_*D_subregion.cpp tests on DG2.
@wenju-he wenju-he requested a review from a team as a code owner March 25, 2024 05:04
@wenju-he
Copy link
Contributor Author

Failure in Build - Adapters on HW (L0, Debug, clang, clang++) seems unrelated to this pr.

Run cmake -B/home/test-user/actions-runner/_work/unified-runtime/unified-runtime/build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DUR_ENABLE_TRACING=ON -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUR_BUILD_ADAPTER_L0=ON -DUR_DPCXX=/home/test-user/actions-runner/_work/unified-runtime/unified-runtime/dpcpp_compiler/bin/clang++ -DUR_SYCL_LIBRARY_DIR=/home/test-user/actions-runner/_work/unified-runtime/unified-runtime/dpcpp_compiler/lib   
-- The C compiler identification is Clang 1[4](https://github.com/oneapi-src/unified-runtime/actions/runs/8415343675/job/23047034417?pr=1470#step:5:5).0.0
-- The CXX compiler identification is Clang 14.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python3: /usr/bin/python3.10 (found version "3.10.6") found components: Interpreter 
-- Performing Test USING_LIBSTDCXX
-- Performing Test USING_LIBSTDCXX - Success
-- Fetching sparse source xpti from https://github.com/intel/llvm.git sycl-nightly/20230703
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /home/test-user/actions-runner/_work/unified-runtime/unified-runtime/build/content-xpti/.git/
Switched to a new branch 'main'
error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
error: 1[5](https://github.com/oneapi-src/unified-runtime/actions/runs/8415343675/job/23047034417?pr=1470#step:5:6)98 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
error: pathspec 'sycl-nightly/20230703' did not match any file(s) known to git
CMake Error at /usr/share/cmake-3.22/Modules/ExternalProject.cmake:2882 (message):
  No download info given for 'xpti-populate' and its source directory:

   /home/test-user/actions-runner/_work/unified-runtime/unified-runtime/build/content-xpti/xpti
-- Configuring incomplete, errors occurred!
See also "/home/test-user/actions-runner/_work/unified-runtime/unified-runtime/build/CMakeFiles/CMakeOutput.log".

  is not an existing non-empty directory.  Please specify one of:

   * SOURCE_DIR with an existing non-empty directory
   * DOWNLOAD_COMMAND
   * URL
   * GIT_REPOSITORY
   * SVN_REPOSITORY
   * HG_REPOSITORY
   * CVS_REPOSITORY and CVS_MODULE
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/ExternalProject.cmake:371[6](https://github.com/oneapi-src/unified-runtime/actions/runs/8415343675/job/23047034417?pr=1470#step:5:7) (_ep_add_download_command)
  CMakeLists.txt:15 (ExternalProject_Add)


-- Configuring incomplete, errors occurred!
See also "/home/test-user/actions-runner/_work/unified-runtime/unified-runtime/build/_deps/xpti-subbuild/CMakeFiles/CMakeOutput.log".

CMake Error at /usr/share/cmake-3.22/Modules/FetchContent.cmake:10[7](https://github.com/oneapi-src/unified-runtime/actions/runs/8415343675/job/23047034417?pr=1470#step:5:8)5 (message):
  CMake step for xpti failed: 1
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FetchContent.cmake:1216:EVAL:2 (__FetchContent_directPopulate)
  /usr/share/cmake-3.22/Modules/FetchContent.cmake:1216 (cmake_language)
  /usr/share/cmake-3.22/Modules/FetchContent.cmake:125[9](https://github.com/oneapi-src/unified-runtime/actions/runs/8415343675/job/23047034417?pr=1470#step:5:10) (FetchContent_Populate)
  CMakeLists.txt:[11](https://github.com/oneapi-src/unified-runtime/actions/runs/8415343675/job/23047034417?pr=1470#step:5:12)1 (FetchContent_MakeAvailable)


Error: Process completed with exit code 1.

WaitList.Length, WaitList.ZeEventList));
}
} else if (imageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST) {
uint32_t DstRowPitch = hostExtent.width * PixelSizeInBytes;
uint32_t DstSlicePitch = DstRowPitch * hostExtent.height;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will there ever be a situation where slice pitch is not rowPitch * height? Does it ever make sense to have a different value than that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DstRowPitch and DstSlicePitch are properties of host memory. They can differ from rowPitch and slicePitch of the source image.

@kbenzie kbenzie added the level-zero L0 adapter specific issues label Apr 10, 2024
@wenju-he wenju-he requested a review from a team as a code owner May 14, 2024 00:18
@wenju-he wenju-he changed the title [L0][Bindless Image] Use L0 ImageCopy ext API for copying to/from non-usm [L0][Bindless Image] Bug fixes and sampled image support May 16, 2024
@wenju-he
Copy link
Contributor Author

@nrspruit could you please review? SYCL PR is at intel/llvm#13926

Copy link
Contributor

@nrspruit nrspruit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wenju-he
Copy link
Contributor Author

@kbenzie can this PR be added to read-to-merge queue? thank you.

@kbenzie
Copy link
Contributor

kbenzie commented Jun 18, 2024

@kbenzie can this PR be added to read-to-merge queue? thank you.

I'll add the ready to merge label but please do fix the merge conflicts on intel/llvm#13926 so that its ready to go.

@kbenzie kbenzie added the ready to merge Added to PR's which are ready to merge label Jun 18, 2024
@wenju-he
Copy link
Contributor Author

@kbenzie can this PR be added to read-to-merge queue? thank you.

I'll add the ready to merge label but please do fix the merge conflicts on intel/llvm#13926 so that its ready to go.

done, merge conflict is resolved. thank you.

@kbenzie kbenzie merged commit ded4b88 into oneapi-src:main Jun 19, 2024
50 of 51 checks passed
@wenju-he wenju-he deleted the fix-bindless-L0-copy branch June 19, 2024 21:53
martygrant pushed a commit to intel/llvm that referenced this pull request Jun 20, 2024
UR PR: oneapi-src/unified-runtime#1470

---------

Co-authored-by: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
images UR images level-zero L0 adapter specific issues ready to merge Added to PR's which are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants