[GSD-11525] NEO::DirectSubmissionHw memset/memcpy error
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 300
- PR merge metrics
- No merged PRs in 30d
Description
Related to #821 ; Demonstration programs are generating a memcpy error at runtime. It's unclear what is going on - advice on debugging this issue would be appreciated.
```
#include
int main(int argc, char* argv[]) {
sycl::queue q;
std::cout << "Running on "
<< q.get_device().get_info()
<< "\n";
}
```
```
ONEAPI_DEVICE_SELECTOR=opencl:gpu ./hellosycl0
```
```
Running on Intel(R) Arc(TM) A750 Graphics
Thread 1 "hellosycl0" received signal SIGBUS, Bus error.
Download failed: Invalid argument. Continuing without source file ./string/./string/memset.c.
__GI_memset (dstpp=0x3ff3baf000, c=0, len=) at ./string/memset.c:56
warning: 56 ./string/memset.c: No such file or directory
(gdb) bt
#0 __GI_memset (dstpp=0x3ff3baf000, c=0, len=) at ./string/memset.c:56
#1 0x0000003ff488e446 in NEO::DirectSubmissionHw >::allocateResources() ()
from libigdrcl.so
#2 0x0000003ff488e22e in NEO::DirectSubmissionHw >::initialize(bool) ()
from libigdrcl.so
#3 0x0000003ff47ee4ae in NEO::CommandStreamReceiverHw::initDirectSubmission() () from libigdrcl.so
#4 0x0000003ff4632984 in NEO::CommandQueue::initializeGpgpuInternals() const () from libigdrcl.so
#5 0x0000003ff4632812 in NEO::CommandQueue::initializeGpgpu() const () from libigdrcl.so
#6 0x0000003ff46329f6 in NEO::CommandQueue::getGpgpuCommandStreamReceiver() const () from libigdrcl.so
#7 0x0000003ff46d29b0 in NEO::CommandQueueHw::flush() () from libigdrcl.so
#8 0x0000003ff45d07ec in clReleaseCommandQueue () from libigdrcl.so
#9 0x0000003ff65c5054 in clReleaseCommandQueue () from libOpenCL.so.1
#10 0x0000003ff6f3d576 in urQueueRelease () from libur_adapter_opencl.so.0
#11 0x0000003ff70672b8 in urQueueRelease () from libur_loader.so.0
#12 0x0000003ff727d32e in sycl::_V1::detail::queue_impl::~queue_impl() () from libsycl.so.8
#13 0x0000000000013486 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)1>::_M_release_last_use (this=0x12c34a0)
at /usr/lib/gcc/riscv64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:175
#14 0x0000000000013462 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)1>::_M_release (this=0x12c34a0)
at /usr/lib/gcc/riscv64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:311
#15 0x00000000000133aa in std::__shared_count<(__gnu_cxx::_Lock_policy)1>::~__shared_count (this=0x3fffffee68)
at /usr/lib/gcc/riscv64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1071
#16 0x0000000000013806 in std::__shared_ptr::~__shared_ptr (this=0x3fffffee60)
at /usr/lib/gcc/riscv64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1524
#17 0x00000000000137e8 in std::shared_ptr::~shared_ptr (this=0x3fffffee60)
at /usr/lib/gcc/riscv64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:175
#18 0x000000000001240a in sycl::_V1::queue::~queue (this=0x3fffffee60) at llvm-6.1.0/build/bin/../include/sycl/queue.hpp:132
#19 0x00000000000121d8 in main (argc=1, argv=0x3ffffff028) at hellosycl.cpp:9
(gdb) q
```
```
#include
#define N 100
int main(int argc, char* argv[]) {
sycl::queue q;
std::cout << "Running on "
<< q.get_device().get_info()
<< "\n";
int aData[N];
int bData[N];
sycl::buffer aBuf(&aData[0], N);
sycl::buffer bBuf(&bData[0], N);
q.submit([&](auto & h) {
sycl::accessor aA(aBuf, h, sycl::write_only, sycl::no_init);
sycl::accessor aB(aBuf, h, sycl::write_only, sycl::no_init);
h.parallel_for(N, [=](auto i) {
aA[i] = 10;
aB[i] = 20;
});
});
}
```
```
ONEAPI_DEVICE_SELECTOR=opencl:gpu ./hellosycl1
```
```
Running on Intel(R) Arc(TM) A750 Graphics
Thread 1 "hellosycl1" received signal SIGBUS, Bus error.
Download failed: Invalid argument. Continuing without source file ./string/./string/wordcopy.c.
0x0000003ff79078fa in _wordcopy_fwd_aligned (dstp=, dstp@entry=274678583296, srcp=, srcp@entry=274577375312, len=len@entry=136)
at ./string/wordcopy.c:120
warning: 120 ./string/wordcopy.c: No such file or directory
(gdb) bt
#0 0x0000003ff79078fa in _wordcopy_fwd_aligned (dstp=, dstp@entry=274678583296, srcp=, srcp@entry=274577375312, len=len@entry=136)
at ./string/wordcopy.c:120
#1 0x0000003ff79021ba in __GI_memcpy (dstpp=0x3ff41e9000, srcpp=, len=1088) at ./string/memcpy.c:51
#2 0x0000003ff4a9917c in NEO::DrmMemoryManager::copyMemoryToAllocationBanks(NEO::GraphicsAllocation*, unsigned long, void const*, unsigned long, std::bitset<4ul>) ()
from libigdrcl.so
#3 0x0000003ff4a0c8da in NEO::MemoryTransferHelper::transferMemoryToAllocation(bool, NEO::Device const&, NEO::GraphicsAllocation*, unsigned long, void const*, unsigned long) ()
from libigdrcl.so
#4 0x0000003ff4a27474 in NEO::KernelInfo::createKernelAllocation(NEO::Device const&, bool) () from libigdrcl.so
#5 0x0000003ff4667830 in NEO::Program::processProgramInfo(NEO::ProgramInfo&, NEO::ClDevice const&) () from libigdrcl.so
#6 0x0000003ff46674ba in NEO::Program::processGenBinary(NEO::ClDevice const&) () from libigdrcl.so
#7 0x0000003ff46670d0 in NEO::Program::processGenBinaries(NEO::ClDeviceVector const&, std::unordered_map, std::equal_to, std::allocator > >&) () from libigdrcl.so
#8 0x0000003ff465e81e in NEO::Program::build(NEO::ClDeviceVector const&, char const*) () from libigdrcl.so
#9 0x0000003ff45d335a in clBuildProgram () from intel-opencl/libigdrcl.so
#10 0x0000003ff6f39ba8 in urProgramBuild () from llvm-6.1.0/build/lib/libur_adapter_opencl.so.0
#11 0x0000003ff7065e3a in urProgramBuild () from llvm-6.1.0/build/lib/libur_loader.so.0
#12 0x0000003ff73e4be6 in sycl::_V1::detail::ProgramManager::build(std::unique_ptr, std::shared_ptr, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, std::vector >&, unsigned int, std::vector > const&, bool) () from llvm-6.1.0/build/lib/libsycl.so.8
#13 0x0000003ff73f09ca in sycl::_V1::detail::ProgramManager::getBuiltURProgram(sycl::_V1::detail::ObjectWithDeps const&, sycl::_V1::context const&, std::vector > const&, sycl::_V1::detail::ObjectWithDeps const*, std::vector > const&)::{lambda()#1}::operator()() const () from llvm-6.1.0/build/lib/libsycl.so.8
#14 0x0000003ff73f4c7a in sycl::_V1::detail::ProgramManager::getBuiltURProgram(sycl::_V1::detail::ObjectWithDeps const&, sycl::_V1::context const&, std::vector > const&, sycl::_V1::detail::ObjectWithDeps const*, std::vector > const&) () from llvm-6.1.0/build/lib/libsycl.so.8
#15 0x0000003ff73f6632 in sycl::_V1::detail::ProgramManager::getBuiltURProgram(std::shared_ptr const&, std::shared_ptr const&, std::__cxx11::basic_string, std::allocator > const&, sycl::_V1::detail::NDRDescT const&, bool) ()
from llvm-6.1.0/build/lib/libsycl.so.8
#16 0x0000003ff73fce44 in sycl::_V1::detail::ProgramManager::getOrCreateKernel(std::shared_ptr const&, std::shared_ptr const&, std::__cxx11::basic_string, std::allocator > const&, sycl::_V1::detail::NDRDescT const&) ()
from llvm-6.1.0/build/lib/libsycl.so.8
#17 0x0000003ff742ce62 in sycl::_V1::detail::enqueueImpKernel(std::shared_ptr const&, sycl::_V1::detail::NDRDescT&, std::vector >&, std::shared_ptr const&, std::shared_ptr const&, std::__cxx11::basic_string, std::allocator > const&, std::vector >&, std::shared_ptr const&, std::function const&, ur_kernel_cache_config_t, bool, bool, unsigned long, sycl::_V1::detail::RTDeviceBinaryImage const*) () from libsycl.so.8
#18 0x0000003ff74325f4 in sycl::_V1::detail::ExecCGCommand::enqueueImpQueue() () from libsycl.so.8
#19 0x0000003ff7426b92 in sycl::_V1::detail::Command::enqueue(sycl::_V1::detail::EnqueueResultT&, sycl::_V1::detail::BlockingT, std::vector >&) () from libsycl.so.8
#20 0x0000003ff743b6b4 in sycl::_V1::detail::Scheduler::GraphProcessor::enqueueCommand(sycl::_V1::detail::Command*, std::shared_lock&, sycl::_V1::detail::EnqueueResultT&, std::vector >&, sycl::_V1::detail::Command*, sycl::_V1::detail::BlockingT) [clone .part.0] ()
from libsycl.so.8
#21 0x0000003ff7438fec in sycl::_V1::detail::Scheduler::enqueueCommandForCG(std::shared_ptr, std::vector >&, sycl::_V1::detail::BlockingT) () from llvm-6.1.0/build/lib/libsycl.so.8
#22 0x0000003ff743b00a in sycl::_V1::detail::Scheduler::addCG(std::unique_ptr >, std::shared_ptr const&, bool, ur_exp_command_buffer_handle_t_*, std::vector > const&) ()
from llvm-6.1.0/build/lib/libsycl.so.8
#23 0x0000003ff746c98a in sycl::_V1::handler::finalize() () from /home/ct/Downloads/llvm-6.1.0/build/lib/libsycl.so.8
#24 0x0000003ff740262c in void sycl::_V1::detail::queue_impl::finalizeHandler(sycl::_V1::handler&, sycl::_V1::event&) ()
from llvm-6.1.0/build/lib/libsycl.so.8
#25 0x0000003ff7402e40 in sycl::_V1::detail::queue_impl::submit_impl(std::function const&, std::shared_ptr const&, std::sha--Type for more, q to quit, c to continue without paging--
red_ptr const&, std::shared_ptr const&, bool, sycl::_V1::detail::code_location const&, bool, sycl::_V1::detail::SubmissionInfo const&) () from libsycl.so.8
#26 0x0000003ff74871b8 in sycl::_V1::queue::submit_with_event_impl(std::function, sycl::_V1::detail::SubmissionInfo const&, sycl::_V1::detail::code_location const&, bool) () from libsycl.so.8
#27 0x0000000000013fb0 in sycl::_V1::queue::submit_with_event(main::{lambda(auto:1&)#1}, sycl::_V1::queue*, sycl::_V1::detail::code_location const&) (
this=0x3fffffee58, CGF=..., SecondaryQueuePtr=0x0, CodeLoc=...) at /include/sycl/queue.hpp:2826
#28 0x0000000000013edc in sycl::_V1::queue::submit(main::{lambda(auto:1&)#1}, sycl::_V1::detail::code_location const&) (this=0x3fffffee58, CGF=...,
CodeLoc=...) at llvm-6.1.0/build/bin/../include/sycl/queue.hpp:365
#29 0x0000000000013dda in main (argc=1, argv=0x3ffffff028) at hellosycl1.cpp:18
```
Contributor guide
Assessment
This issue has not been assessed yet.