Skip to content

Conversation

@przemektmalon
Copy link
Contributor

This patch introduces map_external_linear_memory to enable mapping interop memory to linear USM, returning a void *.

The PI function piextMemMapExternalLinearMemory has been added to enable this in the PI layer.

A Vulkan test case has been added to test this functionality.

This patch introduces `map_external_linear_memory` to enable mapping
interop memory to linear USM, returning a `void *`.

The PI function `piextMemMapExternalLinearMemory` has been added to
enable this in the PI layer.

A Vulkan test case has been added to test this functionality.
@przemektmalon
Copy link
Contributor Author

Associated UR PR

size_t dim0 = it.get_global_id(0);
size_t dim1 = it.get_global_id(1);

// Normalize coordinates -- +0.5 to look towards centre of pixel
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for the comment!

@przemektmalon
Copy link
Contributor Author

Friendly ping @intel/dpcpp-nativecpu-pi-reviewers

Copy link
Contributor

@uwedolinsky uwedolinsky left a comment

Choose a reason for hiding this comment

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

NativeCPU 👍

@omarahmed1111
Copy link
Contributor

omarahmed1111 commented Jul 31, 2024

@DBDuncan
Copy link
Contributor

DBDuncan commented Aug 2, 2024

@intel/llvm-gatekeepers Should be ok to merge? Does not touch HIP. Bindless images is not supported on AMD yet.

@sommerlukas
Copy link
Contributor

Merging while HIP CI is stuck, as bindless images are not supported on HIP backend.

@sommerlukas sommerlukas merged commit 2321b3a into intel:sycl Aug 2, 2024
@sarnex
Copy link
Contributor

sarnex commented Aug 2, 2024

@intel/bindless-images-reviewers Could this postcommit fail be related?

FAIL: SYCL-Unit :: program_manager/arg_mask/./ProgramManagerArgMaskTests/0/1 (1104 of 1159)
******************** TEST 'SYCL-Unit :: program_manager/arg_mask/./ProgramManagerArgMaskTests/0/1' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/__w/llvm/llvm/build/tools/sycl/unittests/program_manager/arg_mask/./ProgramManagerArgMaskTests-SYCL-Unit-351801-0-1.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=1 GTEST_SHARD_INDEX=0 /__w/llvm/llvm/build/tools/sycl/unittests/program_manager/arg_mask/./ProgramManagerArgMaskTests
--

[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from EliminatedArgMask
[ RUN      ] EliminatedArgMask.KernelBundleWith2Kernels
terminate called after throwing an instance of 'sycl::_V1::exception'
  what():  A local accessor must not be used in a SYCL kernel function that is invoked via single_task or via the simple form of parallel_for that takes a range parameter.
 #0 0x00007facd7034aa8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/__w/llvm/llvm/build/./lib/libLLVMSupport.so.19.0git+0x182aa8)
 #1 0x00007facd703273c llvm::sys::RunSignalHandlers() (/__w/llvm/llvm/build/./lib/libLLVMSupport.so.19.0git+0x18073c)
 #2 0x00007facd7035158 SignalHandler(int) Signals.cpp:0:0
 #3 0x00007facd6990520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007facd69e49fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x00007facd6990476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x00007facd69767f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x00007facd6d20b9e (/lib/x86_64-linux-gnu/libstdc++.so.6+0xa2b9e)
 #8 0x00007facd6d2c20c (/lib/x86_64-linux-gnu/libstdc++.so.6+0xae20c)
 #9 0x00007facd6d2c277 (/lib/x86_64-linux-gnu/libstdc++.so.6+0xae277)
#10 0x00007facd6d2c4d8 (/lib/x86_64-linux-gnu/libstdc++.so.6+0xae4d8)
#11 0x0000000000493baf getKernelArgMaskFromBundle(sycl::_V1::kernel_bundle<(sycl::_V1::bundle_state)0> const&, std::shared_ptr<sycl::_V1::detail::queue_impl>) (/__w/llvm/llvm/build/tools/sycl/unittests/program_manager/arg_mask/./ProgramManagerArgMaskTests+0x493baf)
#12 0x0000000000495689 EliminatedArgMask_KernelBundleWith2Kernels_Test::TestBody() (/__w/llvm/llvm/build/tools/sycl/unittests/program_manager/arg_mask/./ProgramManagerArgMaskTests+0x495689)
#13 0x00007facd7109160 testing::Test::Run() (/__w/llvm/llvm/build/./lib/libllvm_gtest.so.19.0git+0x3e160)
#14 0x00007facd710a5c9 testing::TestInfo::Run() (/__w/llvm/llvm/build/./lib/libllvm_gtest.so.19.0git+0x3f5c9)
#15 0x00007facd710b335 testing::TestSuite::Run() (/__w/llvm/llvm/build/./lib/libllvm_gtest.so.19.0git+0x40335)
#16 0x00007facd711c54d testing::internal::UnitTestImpl::RunAllTests() (/__w/llvm/llvm/build/./lib/libllvm_gtest.so.19.0git+0x5154d)
#17 0x00007facd711b889 testing::UnitTest::Run() (/__w/llvm/llvm/build/./lib/libllvm_gtest.so.19.0git+0x50889)
#18 0x00007facd730224c main (/__w/llvm/llvm/build/./lib/libllvm_gtest_main.so.19.0git+0x124c)
#19 0x00007facd6977d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#20 0x00007facd6977e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#21 0x000000000040a905 _start (/__w/llvm/llvm/build/tools/sycl/unittests/program_manager/arg_mask/./ProgramManagerArgMaskTests+0x40a905)

--
exit: -6
--
shard JSON output does not exist: /__w/llvm/llvm/build/tools/sycl/unittests/program_manager/arg_mask/./ProgramManagerArgMaskTests-SYCL-Unit-351801-0-1.json
********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
********************
Failed Tests (1):
  SYCL-Unit :: program_manager/arg_mask/./ProgramManagerArgMaskTests/0/1

@DBDuncan
Copy link
Contributor

DBDuncan commented Aug 2, 2024

I can only imagine it maybe came from oneapi-src/unified-runtime#1880 ?

@sarnex
Copy link
Contributor

sarnex commented Aug 2, 2024

@intel/unified-runtime-reviewers Can someone please assess the above postcommit fail and see if it could be related to the UR bump added in this PR? Thanks

@aarongreig
Copy link
Contributor

@intel/unified-runtime-reviewers Can someone please assess the above postcommit fail and see if it could be related to the UR bump added in this PR? Thanks

we have reason to suspect that #14873 will fix this, if that merges and post-commit is still failing we will revert the bump and investigate further

@sarnex
Copy link
Contributor

sarnex commented Aug 2, 2024

Seems build passes now, but there are some other postcommit failures. Will post in that PR. Thanks.

@KornevNikita
Copy link
Contributor

KornevNikita commented Aug 5, 2024

@przemektmalon @sarnex this patch (UR TAG update) broke sycl-cts/test_event on linux L0: https://github.com/intel/llvm/actions/runs/10224788809/job/28293133692
This doesn't help - #14944

Do you know possible reasons?

@sarnex
Copy link
Contributor

sarnex commented Aug 5, 2024

Adding @intel/bindless-images-reviewers (see above)

Can someone please investigate the CTS issue? If we can't fix it quickly probably we should revert this patch. Thanks

@omarahmed1111
Copy link
Contributor

@sarnex @KornevNikita I tried that locally and it comes from this PR: oneapi-src/unified-runtime#1880 . I will ping the team for that to see. if there is not a quick fix, will revert that and include the reverted PR in this bump: #14944

@sarnex
Copy link
Contributor

sarnex commented Aug 5, 2024

Thanks Omar!

AlexeySachkov pushed a commit to AlexeySachkov/llvm that referenced this pull request Nov 26, 2024
This patch introduces `map_external_linear_memory` to enable mapping
interop memory to linear USM, returning a `void *`.

The PI function `piextMemMapExternalLinearMemory` has been added to
enable this in the PI layer.

A Vulkan test case has been added to test this functionality.

---------

Co-authored-by: Duncan Brawley <duncan.brawley@codeplay.com>
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.