Skip to content

[Bug] sync() error message incorrectly says shared_array #646

@alanray-tech

Description

@alanray-tech

Summary

block.sync() raises a ValueError with an incorrect function name in the error message.

Details

In python/quadrants/lang/simt/block.py, line 19:

def sync():
    arch = impl.get_runtime().prog.config().arch
    if arch == _qd_core.cuda or arch == _qd_core.amdgpu:
        return impl.call_internal("block_barrier", with_runtime_context=False)
    if arch_uses_spv(arch):
        return impl.call_internal("workgroupBarrier", with_runtime_context=False)
    raise ValueError(f"qd.block.shared_array is not supported for arch {arch}")

The error message says qd.block.shared_array but it should say qd.simt.block.sync (or at minimum qd.block.sync).

Suggested fix

raise ValueError(f"qd.simt.block.sync is not supported for arch {arch}")

Found during

Review of #638 (docs for qd.simt.block.*).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions