-
Notifications
You must be signed in to change notification settings - Fork 621
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
Gpu dltensor operator #1261
Gpu dltensor operator #1261
Conversation
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
!build |
CI MESSAGE: [903516]: BUILD STARTED |
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
CI MESSAGE: [903636]: BUILD STARTED |
CI MESSAGE: [903516]: BUILD PASSED |
CI MESSAGE: [903636]: BUILD PASSED |
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
!build |
CI MESSAGE: [905467]: BUILD STARTED |
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
CI MESSAGE: [905655]: BUILD STARTED |
CI MESSAGE: [905655]: BUILD PASSED |
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
CI MESSAGE: [935573]: BUILD PASSED |
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
!build |
CI MESSAGE: [937421]: BUILD STARTED |
CI MESSAGE: [937421]: BUILD FAILED |
cupy_case(cupy_kernel_mix_channels) | ||
|
||
|
||
def test_cupy_kernel_gray_scale(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use yield as before:
def test_cupy():
for testcase in [cupy_simple, cupy_kernel_square_diff, cupy_kernel_mix_channels, cupy_kernel_gray_scale]:
yield cupy_case, testcase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, nice trick
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
!build |
CI MESSAGE: [943583]: BUILD STARTED |
CI MESSAGE: [943583]: BUILD PASSED |
@@ -116,6 +116,20 @@ void PythonFunctionImpl<CPUBackend>::RunImpl(SampleWorkspace &ws) { | |||
} | |||
} | |||
|
|||
static cudaStream_t current_cuda_stream = nullptr; | |||
|
|||
cudaStream_t GetCurrentStream() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How this GetCurrentStream
is suppose to be used?
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
!build |
CI MESSAGE: [945702]: BUILD STARTED |
CI MESSAGE: [945702]: BUILD PASSED |
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
!build |
CI MESSAGE: [947100]: BUILD STARTED |
CI MESSAGE: [947100]: BUILD FAILED |
Signed-off-by: Rafal <Banas.Rafal97@gmail.com>
!build |
CI MESSAGE: [948783]: BUILD STARTED |
CI MESSAGE: [948783]: BUILD FAILED |
CI MESSAGE: [948783]: BUILD PASSED |
Why we need this PR?
DLTensorPythonFunction
operator, which can be later used to implement more specific GPU operators like Cupy operator or to extend existingTorchPythonFunction
operator for GPU tensors.What happened in this PR?
It extends the existing DLTensor operator to support GPU tensors. Most of the work was done by implementing the CPU operator.
The most important part is the
CopyWithStride
function for the GPU, as the rest of the code is just repeating the logic from the CPU operator.JIRA TASK: [DALI-574]