Skip to content

@neighbors fails for 3D cube #669

@shy86

Description

@shy86

When extending the official 2D @Stencil + @neighbors example to 3D (i.e. a cubic DArray), the code errors.

using Dagger
import Dagger: @stencil, Wrap

A = ones(Blocks(1, 1, 1), Int, 3, 3, 3)
A[:] = 1:length(A)
B = zeros(Blocks(1, 1, 1), Int, 3, 3, 3)

Dagger.spawn_datadeps() do
    @stencil begin
        B[idx] = sum(@neighbors(A[idx], 1, Wrap())) / 27
    end
end

ERROR: DTaskFailedException:
  Root Exception Type: AssertionError
  Root Exception:
AssertionError: Halo mismatch: edges=6 corners=6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions