prefetch GPU Virtual ISA NVIDIA
prefetch 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.
If the.tensormap qualifier is specified then the prefetch instruction brings the cache line
containing the specified address in the.const or.param memory state space for subsequent
use by the cp.async.bulk.tensor instruction.
If no state space is given, the prefetch uses Generic Addressing.
Optionally, the eviction priority to be applied on the prefetched cache line can be specified by the
modifier.level::eviction_priority. (see the official PTX ISA docs for the full description)
Examples
prefetch.global.L1 [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.