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

Add broken gpu broadcasting test #1096

Closed
wants to merge 2 commits into from
Closed

Add broken gpu broadcasting test #1096

wants to merge 2 commits into from

Conversation

charleskawczynski
Copy link
Member

@charleskawczynski charleskawczynski commented Jan 11, 2023

This PR adds a broken gpu broadcasting test, which works on the cpu.

quad = Spaces.Quadratures.GLL{3}()
space = Spaces.SpectralElementSpace2D(topology, quad)
(; x) = Fields.coordinate_field(space)
ϕ = @. sin(2 * FT(π) * x)
Copy link
Member

Choose a reason for hiding this comment

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

The issue appears to be the FT here: we will need to add a fix like:
https://github.com/JuliaGPU/CUDA.jl/blob/master/src/broadcast.jl#L17-L19

@charleskawczynski
Copy link
Member Author

I believe we've fixed this with

Base.Broadcast.broadcasted(
    fs::AbstractFieldStyle,
    ::Type{T},
    args...,
) where {T} = Base.Broadcast.broadcasted(fs, (x...) -> T(x...), args...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants