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

Fix ConvTranspose output padding on AMDGPU #2473

Merged
merged 1 commit into from
Jul 27, 2024

Conversation

paulnovo
Copy link
Contributor

This commit applies the output padding for ConvTranspose layers on AMDGPU devices. Tests are added that ensure the output size is identical to a ConvTranspose layer on the CPU.

In addition, this fixes the following test failure on AMDGPU:

Convolution: Error During Test at /var/lib/buildkite-agent/builds/amdgpu1-luraess-com/julialang/flux-dot-jl/test/ext_amdgpu/basic.jl:27
    Got exception outside of a @test
    MethodError: no method matching ConvTranspose(::typeof(identity), ::ROCArray{Float32, 3, AMDGPU.Runtime.Mem.HIPBuffer}, ::ROCArray{Float32, 1, AMDGPU.Runtime.Mem.HIPBuffer}, ::Tuple{Int64}, ::Tuple{Int64, Int64}, ::Tuple{Int64}, ::Int64)

PR Checklist

  • Tests are added
  • Entry in NEWS.md
  • Documentation, if applicable

Copy link
Member

@pxl-th pxl-th left a comment

Choose a reason for hiding this comment

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

Minor nitpicks, but other than that it's good to go.

This commit applies the output padding for ConvTranspose layers on
AMDGPU devices. Tests are added that ensure the output size is identical
to a ConvTranspose layer on the CPU.

In addition, this fixes the following test failure on AMDGPU:

  Convolution: Error During Test at /var/lib/buildkite-agent/builds/amdgpu1-luraess-com/julialang/flux-dot-jl/test/ext_amdgpu/basic.jl:27
      Got exception outside of a @test
      MethodError: no method matching ConvTranspose(::typeof(identity), ::ROCArray{Float32, 3, AMDGPU.Runtime.Mem.HIPBuffer}, ::ROCArray{Float32, 1, AMDGPU.Runtime.Mem.HIPBuffer}, ::Tuple{Int64}, ::Tuple{Int64, Int64}, ::Tuple{Int64}, ::Int64)
@paulnovo paulnovo force-pushed the fix-convtranspose-outpad-amd branch from 1568085 to eba195b Compare July 27, 2024 18:50
@paulnovo
Copy link
Contributor Author

Minor nitpicks, but other then that it's good to go.

Thank you for the feedback, I added your suggestions and squashed.

@pxl-th pxl-th merged commit 804f73b into FluxML:master Jul 27, 2024
5 of 8 checks passed
@pxl-th
Copy link
Member

pxl-th commented Jul 27, 2024

Thanks!

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.

2 participants