Skip to content

Make ClipNorm work on GPU Broadcasted #144

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

Merged
merged 3 commits into from
Jul 10, 2023
Merged

Conversation

mcabbott
Copy link
Member

Fixes #127

@@ -506,6 +507,19 @@ y2z(x) = x
y = Optimisers.subtract!(x, nothing)
@test y === x
end

@testset "_norm(dx, p) works" begin
Copy link
Member

Choose a reason for hiding this comment

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

can we test the interface instead of an internal method?

Copy link
Member Author

Choose a reason for hiding this comment

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

At present there are no GPU tests, and norm(::Broadcasted{..., Array}) works without error. So other tests which didn't fail before do call _norm.

Copy link
Member Author

Choose a reason for hiding this comment

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

#71 was going to add some tests, but did not run into this failure. I haven't checked whether JLArray will in fact see it, but Metal's array type (apple M1) does.

@mcabbott mcabbott requested a review from CarloLucibello May 13, 2023 22:13
@mcabbott mcabbott requested a review from ToucheSir July 10, 2023 13:52
@mcabbott mcabbott merged commit 6eaf26d into FluxML:master Jul 10, 2023
@mcabbott mcabbott deleted the bc_norm branch July 10, 2023 14:42
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.

OptimiserChain(..., ClipNorm) fails on GPU
3 participants