Skip to content

[execution] support for higher dim memory allocation in the execution engine? #147

@charithaintc

Description

@charithaintc

I have kernel (fused attention) that deals with 4d tensors. and it fails with.

  File "/home/jovyan/lighthouse/examples/xegpu/fused_attention.py", line 362, in <module>
    times = runner.benchmark(
            ^^^^^^^^^^^^^^^^^
  File "/home/jovyan/lighthouse/lighthouse/execution/runner.py", line 186, in benchmark
    return self._execute_kernel(
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/jovyan/lighthouse/lighthouse/execution/runner.py", line 154, in _execute_kernel
    with allocator() as inputs:
  File "/home/jovyan/miniforge3/envs/imex-dev-torch-mlir/lib/python3.11/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/home/jovyan/lighthouse/lighthouse/execution/memory_manager.py", line 139, in clone_host_buffers
    buf = self.alloc(
          ^^^^^^^^^^^
  File "/home/jovyan/lighthouse/lighthouse/execution/memory_manager.py", line 88, in alloc
    assert rank in (1, 2), "Only 1d or 2d arrays are supported."
           ^^^^^^^^^^^^^^
AssertionError: Only 1d or 2d arrays are supported.

any plans for supporting this? workarounds also welcome.

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