intel / intel/llvm

[SYCL] Unnecessary read_write dependencies when multiple devices read same buffer

Open
#2,053 5 comments 0 reactions 0 assignees View on GitHub
cuda
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

I have some code that launches multiple kernels and distributes them on multiple queues which are for different CUDA devices. When only 1 gpu is used, we get the following dependency graph:
![dep_graph](https://user-images.githubusercontent.com/16190101/86711842-6373b000-bfea-11ea-9dc0-e492b3230f05.jpg)

When the kernels are distributed among different devices, then we get the following graph:
![dep_graph_multi](https://user-images.githubusercontent.com/16190101/86711892-70909f00-bfea-11ea-8f7f-e88b62099eef.jpg)

I would expect the graph not to change much and I would expect no dependencies between different "tri_kernel" kernels. The kernels access buffers in read-only mode and these buffers are shared between different kernel launches. In the latter dependency graph, even though I am using multiple devices, I observe that only one of them runs at a time because of dependencies.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.