Skip to content

[mlir][spirv] Non-deterministic structurization in SPIR-V deserializer #128547

Open
@IgWod-IMG

Description

@IgWod-IMG

Currently when the MLIR code is being structured inside the SPIR-V deserializer (run with: mlir-translate --deserialize-spirv example.spv) the order in which regions are structured is non-deterministic. This is because the DenseMap that holds block merge information (blockMergeInfo) uses a pointer to Block as a key. Then when structurizeControlFlow iterates over the map, the order elements are seen across different runs may vary, as pointer will have different addresses across different runs. So far this doesn't negatively affect supported shaders (or at least not to my knowledge), but it makes debugging harder.

Reported as discussed in #127639

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions