prefetch GPU Virtual ISA NVIDIA
Data Movement and Conversion Instructions
prefetch{.space}.level [a]; // prefetch to data cache
The prefetch instruction brings the cache line containing the specified address in global or local memory state space into the specified cache level.
Encoding
PTX is a virtual instruction set. It has no single, stable native
binary encoding - the compiler lowers this instruction to different native machine
code depending on the selected NVIDIA target architecture (compute capability).
This page intentionally shows no bit-diagram; see the target/version requirements
below for what governs how this instruction compiles.
Syntax Forms
One mnemonic covers many type / state-space / scope / modifier combinations - each row below is an independently valid form.
| Syntax | Data Types | State Space(s) | Modifiers | Min. Target | Description |
|---|---|---|---|---|---|
| prefetch{.space}.level [a]; // prefetch to data cache | sm_20 | The prefetch instruction brings the cache line containing the specified address in global or local memory state space into the specified cache level. If the. (see the official PTX ISA docs for the full description) |
Operands
At a Glance
Related AMDGPU Concepts
Related
Reference
NVIDIA PTX ISA
Description
The prefetch instruction brings the cache line containing the specified address in global or
local memory state space into the specified cache level.
The optional qualifier .L1::32B can be specified to represent a valid prefetch of at least
32 byte. If specified, the instruction must satisfy the following conditions:
Qualifier .valid_addr must be specified; The .valid_addr qualifier requires at-least
1B-wide memory location referred to by address a to be valid for this access.
Otherwise, the behavior is undefined. Qualifier .space if specified, must be set to .global. If the space is not specified,
generic addressing is used and the generic address must fall within the global state-space. (see the official PTX ISA docs for the full description)
Examples
prefetch.global.L1 [ptr];
prefetch.global.L1::32B.valid_addr [ptr];
prefetch.global.L2::evict_last [ptr];
prefetchu.L1 [addr];
prefetch.const.tensormap [ptr];Reproduced from NVIDIA's official PTX ISA documentation for technical accuracy.
Sources
-
Parallel Thread Execution ISA ↗
- NVIDIA Corporation, Chapter 9 - Instruction Set
Deep-linked directly to this instruction's section.