Commit graph

18 commits

Author SHA1 Message Date
Caio Oliveira
fafdd24285 intel/executor: Update bfloat example
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Elaborate on the packed/unpack restrictions, use ADD(x, 0.0f)
as a workaround for F->BF conversion.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34506>
2025-04-14 18:23:43 +00:00
Caio Oliveira
6a55581d41 intel/executor: Fix check for open() failure
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 71ae31dbd8 ("intel/executor: Allow selecting a device to use")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34400>
2025-04-06 19:43:51 -07:00
Caio Oliveira
71ae31dbd8 intel/executor: Allow selecting a device to use
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add a command line option `-d DEVICE` to select
a device either by index or by substring of the
name.

Use `-d list` to print available devices.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34267>
2025-03-31 19:20:10 +00:00
Caio Oliveira
9b2b3255e1 intel/executor: Use getopt for command line arguments
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34267>
2025-03-31 19:20:10 +00:00
Caio Oliveira
5eb1edcf9d intel/executor: Add small example with bfloat
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
José Roberto de Souza
bb31287d24 intel: Initialize upper 32bits of drm_xe_sync.handle
Some compiles don't initialize the upper 32bits of the union that has
u64 addr and u32 handle.
Similar to previous patches but doing that for code in intel/misc.

Cc: stable
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33172>
2025-02-02 21:34:45 -08:00
Caio Oliveira
080c136afb intel/executor: Fix typo when copying result into Lua table
Fixes: e72bf2d02f ("intel: Add executor tool")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33277>
2025-01-29 09:57:23 +00:00
Caio Oliveira
0af8133f09 intel/executor: Add example using scalar register and send gather
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32236>
2024-12-13 02:18:15 +00:00
Caio Oliveira
9383a62d95 intel/executor: Enable PTL
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32196>
2024-11-22 10:26:12 -08:00
Caio Oliveira
15ea28b835 intel/executor: Fix exec_size in @read macro for Xe2
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32122>
2024-11-14 05:31:03 +00:00
Sagar Ghuge
17096f87c1 intel: Switch to COMPUTE_WALKER_BODY
Stuff COMPUTE_WALKER_BODY in COMPUTER_WALKER in both iris and anv.

This also fixes the tracepoint for ray dispatches. Stuffing
COMPUTE_WALKER_BODY allow us to set the
cmd_buffer->state.last_compute_walker.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31822>
2024-10-29 15:54:43 +00:00
Caio Oliveira
4e559077e4 intel/executor: Dump both pre-processed source and assembly
Having the actual generated assembly is helpful when trying to figure
out if the code emission and disassembly are implemented correctly.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31305>
2024-09-27 02:46:28 +00:00
Caio Oliveira
5e47c5f94a intel/executor: Fix a couple of memory leaks in the tool
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31120>
2024-09-13 01:21:24 +00:00
Caio Oliveira
2a5a12cb71 intel/executor: Small fixes to the help message
Add missing @eot to the example.
Reword INTEL_DEBUG=color description.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31076>
2024-09-07 16:32:50 +00:00
Caio Oliveira
5be6f3b089 intel/executor: Fix SWSB for sync.nop
Surfaced after recent improvements on SWSB handling, the previous
assembly code was gracefully lowering the $1 into $1.dst.

Fixes: 37674196221 ("intel: Add executor tool")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30960>
2024-09-02 16:07:55 +00:00
Caio Oliveira
2150bc6d80 intel/brw: Use %td format for pointer difference
Fixes build for 32-bit, again.

Fixes: e72bf2d02f ("intel: Add executor tool")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30669>
2024-08-14 17:28:41 -07:00
Caio Oliveira
8a44b4812a intel/executor: Use PRIx64 to fix building in 32-bit
Fixes: e72bf2d02f ("intel: Add executor tool")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30668>
2024-08-14 21:41:28 +00:00
Caio Oliveira
e72bf2d02f intel: Add executor tool
Add a tool that programs the hardware the minimum amount to be
able to execute compute shaders and then executes a script that
can perform data manipulation and dispatch execution of the shaders
(written in Xe assembly).

The goal is to have a tool to experiment directly with certain
assembly instructions and the shared units without having to
instrument the drivers.

To make more convenient to write assembly, a few macros (indicated by
the @-symbol) will be processed into the full instruction.

For example, the script

```
  local r = execute {
    data={ [42] = 0x100 },
    src=[[
      @mov     g1      42
      @read    g2      g1

      @id      g3

      add(8)   g4<1>UD  g2<8,8,1>UD  g3<8,8,1>UD  { align1 @1 1Q };

      @write   g3       g4
      @eot
    ]]
  }

  dump(r, 4)
```

produces

```
  [0x00000000] 0x00000100 0x00000101 0x00000102 0x00000103
```

There's a help message inside the code that describes the script
environment and the macros for assembly sources.

Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30062>
2024-08-14 03:03:46 +00:00