reprospect.testing.binaries.sass.instruction.atomic module
- class reprospect.testing.binaries.sass.instruction.atomic.AtomicMatcher(arch: NVIDIAArch, operation: str = 'ADD', scope: ThreadScope | str | None = None, consistency: str = 'STRONG', dtype: TypeInfo | int | DTypeLike | None = None, memory: MemorySpace | str = MemorySpace.GLOBAL, version: Version | None = None)View on GitHub
Bases:
ArchitectureAndVersionAwarePatternMatcherMatcher for atomic operations on:
generic memory (
ATOM)shared memory (
ATOMS)global memory (
ATOMG)
Unlike reduction operations on generic memory, these atomic operations use the return value.
The SASS opcode may take several modifiers:
operation (e.g. CAS)
scope (e.g.
reprospect.testing.binaries.sass.instruction.atomic.ThreadScope.DEVICE)consistency (e.g. STRONG)
References:
- TEMPLATE: Final[str] = '{opcode} (?P<operands>P(?:T|\\d+)), (?P<operands>R(?:Z|\\d+)), {address}, (?P<operands>R(?:Z|\\d+))'
- TEMPLATE_CAS: Final[str] = '{opcode} (?P<operands>P(?:T|\\d+)), (?P<operands>R(?:Z|\\d+)), {address}, (?P<operands>R[0-9]+), (?P<operands>R[0-9]+)'
- __init__(arch: NVIDIAArch, operation: str = 'ADD', scope: ThreadScope | str | None = None, consistency: str = 'STRONG', dtype: TypeInfo | int | DTypeLike | None = None, memory: MemorySpace | str = MemorySpace.GLOBAL, version: Version | None = None) NoneView on GitHub
- memory: Final[MemorySpace]
- scope: Final[ThreadScope | None]
- class reprospect.testing.binaries.sass.instruction.atomic.ReductionMatcher(arch: NVIDIAArch, operation: str = 'ADD', scope: ThreadScope | str | None = None, consistency: str = 'STRONG', dtype: TypeInfo | int | DTypeLike | None = None)View on GitHub
Bases:
ArchitectureAwarePatternMatcherMatcher for reduction operations on generic memory.
The corresponding SASS opcode is
REDon pre-Hopper architectures andREDGon Hopper and later architectures.These reduction operation instructions are typically emitted when the return value of an atomic operation is unused. When the return value is used, the compiler typically emits an atomic instruction instead.
The SASS opcode may take several modifiers:
operation (e.g. ADD)
scope (e.g.
reprospect.testing.binaries.sass.instruction.atomic.ThreadScope.DEVICE)consistency (e.g. STRONG)
References:
- __init__(arch: NVIDIAArch, operation: str = 'ADD', scope: ThreadScope | str | None = None, consistency: str = 'STRONG', dtype: TypeInfo | int | DTypeLike | None = None) NoneView on GitHub
- scope: Final[ThreadScope | None]
- class reprospect.testing.binaries.sass.instruction.atomic.ThreadScope(*values)View on GitHub
Bases:
StrEnumReferences:
- BLOCK = 'BLOCK'
- DEVICE = 'DEVICE'
- SYSTEM = 'SYSTEM'
- THREADS = 'THREADS'
- __str__()
Return str(self).
- convert(*, arch: NVIDIAArch) strView on GitHub
Convert to SASS modifier.
For instance,
__NV_THREAD_SCOPE_DEVICEmaps toGPU.References:
Warning
__NV_THREAD_SCOPE_THREADthread scope is currently implemented using wider__NV_THREAD_SCOPE_BLOCKthread scope.