Skip to content

Add threading back in for VIFH and VIJFH DataLayouts #1346

Open
@charleskawczynski

Description

@charleskawczynski

#1315 upgraded us to using the latest ClimaComms, and rather than complicating the changes, we temporarily disabled threading for VIFH and VIJFH DataLayouts. In particular:

function Base.copyto!(
    dest::VIFH{S, Ni},
    bc::Base.Broadcast.Broadcasted{VIFHStyle{Ni, A}},
) where {S, Ni, A}
    if enable_threading()
        return _threaded_copyto!(dest, bc)
    end
    # if enable_threading()
    #     return _threaded_copyto!(dest, bc)
    # end
    return _serial_copyto!(dest, bc)
end

and

function Base.copyto!(
    dest::VIJFH{S, Nij},
    bc::Base.Broadcast.Broadcasted{VIJFHStyle{Nij, A}},
) where {S, Nij, A}
    if enable_threading()
        return _threaded_copyto!(dest, bc)
    end
    # if enable_threading()
    #     return _threaded_copyto!(dest, bc)
    # end
    return _serial_copyto!(dest, bc)
end

I commented these threading branches out, but we should add it back in at some point. It seems like we could either pass the device through copyto!, or make the datalayouts have the device

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions