reprospect.test.sass.instruction.atomic module
- class reprospect.test.sass.instruction.atomic.AtomicMatcher(arch: NVIDIAArch, operation: str = 'ADD', scope: ThreadScope | str | None = None, consistency: str = 'STRONG', dtype: tuple[str | None, int] | 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
RED, these operations capture the return value.The
ATOMopcode may take several modifiers:operation (e.g. CAS)
scope (e.g.
reprospect.test.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: tuple[str | None, int] | None = None, memory: MemorySpace | str = MemorySpace.GLOBAL, version: Version | None = None) NoneView on GitHub
- Parameters:
dtype – For instance, (‘F’, 64) for a 64-bit floating-point or (S, 32) for a signed 32-bit integer.
- memory: Final[MemorySpace]
- class reprospect.test.sass.instruction.atomic.ReductionMatcher(arch: NVIDIAArch, operation: str = 'ADD', scope: ThreadScope | str | None = None, consistency: str = 'STRONG', dtype: tuple[str, int] | None = None)View on GitHub
Bases:
ArchitectureAwarePatternMatcherMatcher for reduction operations on generic memory (
RED).REDinstructions are typically used when the atomic operation return value is not used. Otherwise, it would typically map toATOM.The
REDopcode may take several modifiers:operation (e.g. ADD)
scope (e.g.
reprospect.test.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: tuple[str, int] | None = None) NoneView on GitHub
- Parameters:
dtype – For instance, (‘F’, 64) for a 64-bit floating-point or (S, 32) for a signed 32-bit integer.
- class reprospect.test.sass.instruction.atomic.ThreadScope(*values)View on GitHub
Bases:
StrEnumReferences:
- BLOCK = 'BLOCK'
- DEVICE = 'DEVICE'
- 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.