Skip to content

Inefficient host-device communication on GH200 #609

@giordano

Description

@giordano

I ran this code on Grace Hopper with CUDA-enabled Reactant

using Reactant

x = Reactant.to_rarray(randn(Float32, 100, 2))
W = Reactant.to_rarray(randn(Float32, 10, 100))
b = Reactant.to_rarray(randn(Float32, 10))

linear(x, W, b) = (W * x) .+ b

Reactant.with_profiler("./"; create_perfetto_link=true) do
    mylinear = Reactant.@compile linear(x, W, b)
    [mylinear(x, W, b) for i in 1:1111]
end

but there are frequent host-device communications:

Image

Here is the profile trace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions