Skip to content

direct compute: vcc_lo / vcc_hi as wave32 SMEM offsets and destinations #3171

Done

Description

@Leyukaka

Part of #2935 (instruction coverage). Target branch main. I am taking it.

Gap. In wave32, vcc_lo (s106) and vcc_hi (s107) are ordinary scalar data. Captured wave32 programs use them as the SGPR offset of s_load_dwordx8 and s_buffer_load_dword (x1, x2, x4, x16), and load into vcc_lo/vcc_hi. Direct compute refuses both with "unsupported scalar memory addressing".

Measured on a local capture of 2,689 compute requests (counts and instruction shape only), with compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests on main 6057071b (the commits since then do not touch gfx1013_compute_native.cpp or gfx1013_direct_compute.inl):

Plan:

  • In wave32 compute, accept s106 and s107 as the SMEM offset, numeric like any other SGPR offset.
  • Accept destination ranges up to s107.
  • Wave64, graphics, and ranges past s107 stay refused.

The change adds the same wave64 parameter to decode() as #3157, so whichever lands second gets a small textual conflict that keeps both.

Tests: a hardware readback of loads with vcc_lo and vcc_hi offsets and a load into vcc_hi, plus compile controls for the refusals.

AI-assisted.

Activity

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

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