Skip to content

convolution 1D and 3D cases doesn't work in Linalg on tensors path #5150

Closed

Description

@hanhanW

Describe the bug
The conv test in suite check_vulkan-spirv_vulkan_wgmem doesn't work in Linalg on tensors path. This blocks the migration to setting Linalg on tensors on by default.

To Reproduce

Run: iree-translate -iree-mlir-to-vm-bytecode-module -iree-hal-target-backends=vulkan-spirv -iree-flow-dispatch-linalg-on-tensors -iree-codegen-spirv-experimental-linalg-on-tensors -iree-spirv-use-workgroup-memory iree/test/e2e/vulkan_specific/conv.mlir

Note: gemm.mlir is working with this option.

Activity

  1. added
    bug 🐞
    codegen/spirv
    on Mar 18, 2021
  2. hanhanW commented on Mar 18, 2021

    @hanhanW
    ContributorAuthor

    Oh, I think the reason is that we only plumb conv 2d cases. This is not related to UseWorkgroupMemory.

    The test cases in conv.mlir contain conv_1d and conv_3d. I think we can delete them and disable all conv_1d/3d cases? Once we need them, we can add more support and test around them.

  3. changed the title [-]convolution doesn't work with UseWorkgroupMemory in Linalg on tensors path[/-] [+]convolution 1D and 3D cases doesn't work in Linalg on tensors path[/+] on Mar 18, 2021
  4. hanhanW commented on Mar 18, 2021

    @hanhanW
    ContributorAuthor

    I verified that it is working if I removed 1d and 3d cases.

  5. antiagainst commented on Mar 18, 2021

    @antiagainst
    Member

    +1 to remove. We can add this later when we have a concrete use case for it.

  6. MaheshRavishankar commented on Mar 18, 2021

    @MaheshRavishankar
    Collaborator

    Could we take a second and see what it would take to add support for them. It will expose some technical debt places.

  7. MaheshRavishankar commented on Mar 23, 2021

    @MaheshRavishankar
    Collaborator

    @hanhanW these should work now. Either way, this issue can be closed. We dont have conv_2d specific logic in dispatch region creation anymore.

  8. hanhanW commented on Mar 25, 2021

    @hanhanW
    ContributorAuthor

    I guess it is working on CPU side. For GPU side, we will have to fix some kernel launch config. Otherwise , you will hit workloadPerWorkgroup size greater than 3 not handled in materializeStaticLaunchInformation again.

    E.g.,

    https://github.com/google/iree/blob/d496bc9d53e918c0362ddd498ded750eba6050f3/iree/compiler/Conversion/LinalgToSPIRV/KernelDispatchUtils.cpp#L666-L686

    I tried with similar fix on 1d and 3d conv cases, but it did not work. I will de-prioritize the fix or just remove the support for 1d/3d cases in Linalg on tensors.

  9. MaheshRavishankar commented on Mar 25, 2021

    @MaheshRavishankar
    Collaborator

    Sounds good! THanks for looking into it!

  10. antiagainst commented on Aug 27, 2021

    @antiagainst
    Member

    This is obsolete; conv 1D/3D are supported right now. Closing it.

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

Metadata

Metadata

Assignees

Labels

bug 🐞codegen/spirv

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions