diff --git a/etc/scripts/docenizers/docenizer-ptx-sass.py b/etc/scripts/docenizers/docenizer-ptx-sass.py index 24af590bc..a92ac7a00 100644 --- a/etc/scripts/docenizers/docenizer-ptx-sass.py +++ b/etc/scripts/docenizers/docenizer-ptx-sass.py @@ -1,18 +1,12 @@ +import argparse import collections import json -import os.path -import argparse from collections import defaultdict +from dataclasses import dataclass import pandas as pd import requests from bs4 import BeautifulSoup -from dataclasses import dataclass - -try: - import lxml # for pandas.read_html -except ImportError: - raise parser = argparse.ArgumentParser(description='Docenizes HTML version of the official cuda PTX/SASS documentation') parser.add_argument('-i', '--inputfolder', type=str, @@ -42,15 +36,11 @@ def fullname_plus_annotation(fullname: str, fragment: str) -> str: def combine_docs(docs: list[Doc], fullname_fragments) -> tuple[str, str]: - # For tooltip, prefer "Add two values." if available, otherwise shortest meaningful description + # For tooltip, prefer the shortest meaningful description tooltip_txt = None for doc in docs: if doc.text and len(doc.text) > 10 and len(doc.text) < 200: - # Check for the exact expected text first - if doc.text == "Add two values.": - tooltip_txt = doc.text - break - # Otherwise prefer short, descriptive text + # Prefer short, descriptive text if not tooltip_txt or len(doc.text) < len(tooltip_txt): tooltip_txt = doc.text @@ -81,24 +71,7 @@ def combine_docs(docs: list[Doc], fullname_fragments) -> tuple[str, str]: # Put the actual documentation first, then the links combined_html = '' if html_parts: - # Look for the "Performs addition" paragraph first - performs_addition = None - other_parts = [] - for part in html_parts: - if 'Performs addition and writes the resulting value' in part: - performs_addition = part - else: - other_parts.append(part) - - # Put "Performs addition" first if we have it - if performs_addition: - combined_html = performs_addition - if other_parts: - combined_html += '\n' + '\n'.join(other_parts) - else: - combined_html = '\n'.join(html_parts) - - combined_html += '\n' + combined_html = '\n'.join(html_parts) + '\n' combined_html += 'For more information, visit ' + ', '.join(links) + '.' @@ -116,63 +89,88 @@ def main(): symbol_to_fullname_frag0: defaultdict[str, list[tuple[str, str]]] = collections.defaultdict(list) - # Regular expression to match instruction names - import re - instruction_pattern = re.compile(r'^([a-z]+)(?:\.([a-z0-9]+(?:\.[a-z0-9]+)*))?$') + # Find all sections with instruction documentation structure + all_sections = soup.find_all(['section', 'div'], id=lambda x: x and '-instructions-' in x) - # Find all code blocks once to avoid quadratic complexity - all_codes = soup.find_all('code') + # Build priority map based on section hierarchy + instruction_priority = {} - # Map each code block to its closest parent section with an ID - code_to_section = {} - for code in all_codes: - # Find the closest parent with an id attribute - for parent in code.find_parents(): - if parent.get('id'): - code_to_section[code] = (parent.get('id'), parent.name) - break + for section in all_sections: + section_id = section.get('id', '') - # Process each code block once - for code, (section_id, section_name) in code_to_section.items(): - # Skip if parent is a table - if section_name == 'table': + # Check if this section has the standard instruction documentation structure + rubrics = section.find_all('p', class_='rubric') + rubric_texts = [r.get_text(strip=True) for r in rubrics] + + # Only process sections with proper instruction documentation structure + if not any(r in rubric_texts for r in ['Syntax', 'Description', 'Semantics', 'Examples']): continue - text = code.get_text(strip=True) - match = instruction_pattern.match(text) - if match and len(text) < 40: # Reasonable length for an instruction - base_instr = match.group(1) - # Filter out common non-instruction words - if base_instr not in ['the', 'for', 'and', 'or', 'if', 'else', 'while', - 'struct', 'union', 'enum', 'return', 'goto', 'break', - 'continue', 'do', 'switch', 'case', 'default', 'typedef', - 'static', 'extern', 'const', 'volatile', 'inline']: - # Use the full instruction as the fullname, base as the symbol - instr_fullname = text.lstrip('.').lstrip('%') - # Special handling for common instructions - prefer instruction sections - if base_instr in ['add', 'sub', 'mul', 'div', 'mov', 'ld', 'st']: - # Only add if this is an instruction section or we don't have one yet - existing = [x[1] for x in symbol_to_fullname_frag0[base_instr]] - if not existing or 'instruction' in section_id.lower(): - # If we already have entries and this is an instruction section, clear old ones - if existing and 'instruction' in section_id.lower() and not any('instruction' in x.lower() for x in existing): - symbol_to_fullname_frag0[base_instr] = [] - symbol_to_fullname_frag0[base_instr].append((instr_fullname, section_id)) - else: - symbol_to_fullname_frag0[base_instr].append((instr_fullname, section_id)) + # Extract instruction name from section ID (last segment after final dash) + if '-' not in section_id: + continue - # For common base instructions without variants, add explicit integer arithmetic mappings - for base_instr in ['add', 'sub', 'mul', 'div']: - if base_instr in symbol_to_fullname_frag0: - # Check if we have the integer arithmetic section - int_section = f'integer-arithmetic-instructions-{base_instr}' - if soup.find(id=int_section): - # Add this section explicitly - symbol_to_fullname_frag0[base_instr].append((base_instr, int_section)) + instruction_name = section_id.rsplit('-', 1)[-1] + + # Determine priority based on section type + priority = 0 + if 'integer-arithmetic-instructions' in section_id: + priority = 10 + elif 'floating-point-instructions' in section_id: + priority = 9 + elif 'half-precision-floating-point-instructions' in section_id: + priority = 8 + elif 'extended-precision-arithmetic-instructions' in section_id: + priority = 7 + elif 'comparison-and-selection-instructions' in section_id: + priority = 6 + elif 'logical-instructions' in section_id: + priority = 5 + elif 'data-movement-and-conversion-instructions' in section_id: + priority = 4 + elif 'texture-instructions' in section_id: + priority = 3 + elif 'surface-instructions' in section_id: + priority = 2 + else: + priority = 1 + + # Find the first code element in this section for fullname + first_code = section.find('code') + if first_code: + fullname = first_code.get_text(strip=True).lstrip('.').lstrip('%') + else: + fullname = instruction_name + + # Store or update if higher priority + if instruction_name not in instruction_priority or instruction_priority[instruction_name][1] < priority: + instruction_priority[instruction_name] = ((fullname, section_id), priority) + + # Build the final mapping from the priority-filtered results + for instruction_name, ((fullname, section_id), _) in instruction_priority.items(): + symbol_to_fullname_frag0[instruction_name].append((fullname, section_id)) + + # Also check for instruction variants with dots (e.g., add.s32) + for section in all_sections: + section_id = section.get('id', '') + + # Look for code elements that might be instruction variants + codes = section.find_all('code') + for code in codes[:5]: # Check first few codes only + text = code.get_text(strip=True) + if '.' in text and len(text) < 40: + base = text.split('.')[0].lstrip('%@') + if base and base.isalpha() and len(base) < 20: + # Check if this base is already in our instruction map + if base in instruction_priority: + fullname = text.lstrip('.').lstrip('%') + # Add variant + symbol_to_fullname_frag0[base].append((fullname, section_id)) # Remove duplicates and sort symbol_to_fullname_frag: list[tuple[str, list[tuple[str, str]]]] = sorted( - (instr, sorted(set(fullname_frags))) for instr, fullname_frags in symbol_to_fullname_frag0.items()) + (instr, sorted(set(fullname_frags))) for instr, fullname_frags in symbol_to_fullname_frag0.items() + if fullname_frags) # Only include if we have fragments # Fail loudly if no instructions were found if not symbol_to_fullname_frag: @@ -197,53 +195,57 @@ def main(): title = h.get_text(strip=True) break - # Look for both short description and detailed description + # First, try to find the short description that appears between instruction name and Syntax + short_desc = None + instruction_rubric = article.find('p', class_='rubric') # First rubric is usually instruction name + if instruction_rubric: + # Look for the next paragraph after instruction name + next_p = instruction_rubric.find_next_sibling('p') + if next_p and 'rubric' not in next_p.get('class', []): + # This is likely the short description + short_desc_text = next_p.get_text(strip=True) + if short_desc_text and len(short_desc_text) < 100: # Short descriptions are typically brief + short_desc = short_desc_text + + # Find Description rubric to locate the detailed description structurally + desc_rubric = article.find('p', class_='rubric', string='Description') + html = None txt = None - short_desc = None - # Find a short description for tooltip - for p in article.find_all('p'): - p_text = p.get_text(strip=True) - # Skip rubric paragraphs and empty ones - if p_text and 'rubric' not in p.get('class', []): - # Short descriptions like "Add two values." - if len(p_text) < 100 and p_text.endswith('.') and not short_desc: - short_desc = p_text - - # Find the Description section for HTML - desc_header = None - for elem in article.find_all(['p', 'div']): - if elem.get_text(strip=True) == 'Description': - desc_header = elem - break - - if desc_header: - # Get the next
tag after Description for HTML - next_elem = desc_header.find_next_sibling('p') + if desc_rubric: + # The actual description is in the paragraph following the Description rubric + next_elem = desc_rubric.find_next_sibling('p') if next_elem and next_elem.get_text(strip=True): - html = str(next_elem) - # Use short description for tooltip if we have it, otherwise use this - txt = short_desc if short_desc else next_elem.get_text(strip=True)[:500] - if not short_desc and len(next_elem.get_text(strip=True)) > 500: - txt += "..." + # Skip if this is another rubric + if 'rubric' not in next_elem.get('class', []): + html = str(next_elem) + # Use short description for tooltip if available, otherwise use detailed description + txt = short_desc if short_desc else next_elem.get_text(strip=True) + # Truncate for tooltip if too long + if len(txt) > 200: + txt = txt[:200] + "..." - # Fallback if no Description section + # Fallback: look for any non-rubric paragraph with meaningful content if not html: for p in article.find_all('p'): + # Skip rubric paragraphs + if 'rubric' in p.get('class', []): + continue p_text = p.get_text(strip=True) - # Skip rubric paragraphs and very short ones - if p_text and len(p_text) > 10 and 'rubric' not in p.get('class', []): + # Look for paragraphs with actual content + if p_text and len(p_text) > 10: html = str(p) - txt = p_text[:500] - if len(p_text) > 500: + # Still prefer short description for tooltip if we found one + txt = short_desc if short_desc else p_text[:200] + if not short_desc and len(p_text) > 200: txt += "..." break # Last resort - use title if not html: html = f'
{title}
' - txt = title + txt = short_desc if short_desc else title return Doc(title, txt, html) @@ -253,7 +255,7 @@ def main(): for fullname, fragment in fullname_fragments: try: docs.append(get_doc(fragment)) - except Exception as e: + except Exception: # If we can't parse the doc, create a minimal one docs.append(Doc(fullname, f"Documentation for {fullname}", f"{fullname}
")) @@ -303,7 +305,7 @@ def main(): """.lstrip()) # SASS for name, description in sass_docs: - url = f"https://docs.nvidia.com/cuda/cuda-binary-utilities/index.html#instruction-set-reference" + url = "https://docs.nvidia.com/cuda/cuda-binary-utilities/index.html#instruction-set-reference" f.write(f' case "{name}":\n') f.write(' return {}'.format(json.dumps({ "tooltip": description, diff --git a/lib/asm-docs/generated/asm-docs-ptx.ts b/lib/asm-docs/generated/asm-docs-ptx.ts index 6d636d093..220113a50 100644 --- a/lib/asm-docs/generated/asm-docs-ptx.ts +++ b/lib/asm-docs/generated/asm-docs-ptx.ts @@ -3,151 +3,123 @@ import type {AssemblyInstructionInfo} from '../../../types/assembly-docs.interfa export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined { if (!opcode) return; switch (opcode) { - case "a": + case "2": return { - "html": "PTX 2.2 adds a new directive for specifying kernel parameter attributes; specifically, there is a\nnew directives for specifying that a kernel parameter is a pointer, for specifying to which state\nspace the parameter points, and for optionally specifying the alignment of the memory to which the\nparameter points.
\nFor more information, visit a .", - "tooltip": "PTX 2.2 adds a new directive for specifying kernel parameter attributes; specifically, there is a\n\nnew directives for specifying that a kernel parameter is a pointer, for specifying to which state\n\nspac...", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-2-2" + "html": "Write scalar register d with the packed value of vector register a, or write vector register\nd with the unpacked values from scalar register a.
PTX ISA version 6.5 introduces the following new features:
\nTake absolute value of a and store the result in d.
Take the absolute value of a and store the result in d.
Take the absolute value of a and store it in d.
The membar instruction guarantees that prior memory accesses requested by this thread (ld,\nst, atom and red instructions) are performed at the specified level, before later\nmemory operations requested by this thread following the membar instruction. The level\nqualifier specifies the set of threads that may observe the ordering effect of this operation.
PTX ISA version 6.2 introduces the following new features:
\nFor more information, visit activemask .", - "tooltip": "PTX ISA version 6.2 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-6-2" - }; - - case "acube": - return { - "html": "PTX ISA version 4.3 introduces the following new features:
\nFor more information, visit acube .", - "tooltip": "PTX ISA version 4.3 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-4-3" + "html": "activemask queries predicated-on active threads from the executing warp and sets the destination\nd with 32-bit integer mask where bit position in the mask corresponds to the thread\u2019s\nlaneid.
Performs addition and writes the resulting value into a destination register.
\nPerforms integer addition and writes the carry-out value into the condition code register.
\nConverts input operand a from .atype into .f32 type. The converted value is then\nused for the addition. The resulting value is stored in the destination operand d.
Performs addition and writes the resulting value into a destination register.
\nPerforms integer addition and writes the carry-out value into the condition code register.
\nFor more information, visit add(int) , add.cc .", "tooltip": "Add two values.", "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#integer-arithmetic-instructions-add" }; case "addc": return { - "html": "Multiplies two values, extracts either the high or low part of the result, and adds a third value\nalong with carry-in. Writes the result to the destination register and optionally writes the\ncarry-out from the addition into the condition code register.
\nFor more information, visit addc .", - "tooltip": "32-bitmadcintroduced in PTX ISA version 3.0.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#extended-precision-arithmetic-instructions-madc" - }; - - case "addr": - return { - "html": "The clusterlaunchcontrol.try_cancel instruction requests atomically cancelling the launch of\na cluster that has not started running yet. It asynchronously writes an opaque response to shared\nmemory indicating whether the operation succeeded or failed. The completion of the asynchronous\noperation is tracked using the mbarrier completion mechanism at .cluster scope.
Performs integer addition with carry-in and optionally writes the carry-out value into the condition\ncode register.
\nFor more information, visit addc .", + "tooltip": "Add two values with carry-in and optional carry-out.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#extended-precision-arithmetic-instructions-addc" }; case "alloca": return { - "html": "PTX ISA version 7.3 introduces the following new features:
\nFor more information, visit alloca .", - "tooltip": "PTX ISA version 7.3 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-7-3" + "html": "The alloca instruction dynamically allocates memory on the stack frame of the current function\nand updates the stack pointer accordingly. The returned pointer ptr points to local memory and\ncan be used in the address operand of ld.local and st.local instructions.
Compute the bit-wise and operation for the bits in a and b.
PTX ISA version 7.4 introduces the following new features:
\nFor more information, visit applypriority .", - "tooltip": "PTX ISA version 7.4 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-7-4" + "html": "The applypriority instruction applies the cache eviction priority specified by the\n.level::eviction_priority qualifier to the address range [a..a+size) in the specified cache\nlevel.
Four-way SIMD parallel comparison with secondary operation.
\nFor more information, visit asel .", - "tooltip": "Integer quad byte SIMD comparison.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#simd-video-instructions-vset4" + "html": "A thread executing mbarrier.arrive performs an arrive-on operation\non the mbarrier object at the location specified by the address operand addr. The 32-bit\nunsigned integer operand count specifies the count argument to the arrive-on\noperation.
st.async is a non-blocking instruction which initiates an asynchronous store operation that\nstores the value specified by source operand b to the destination memory location\nspecified by operand a.
Execute an instruction or instruction block for threads that have the guard predicate\nTrue. Threads with a False guard predicate do nothing.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
Atomically loads the original value at location a into destination register d, performs a\nreduction operation with operand b and the value in location a, and stores the result of the\nspecified operation at location a, overwriting the original value. Operand a specifies a\nlocation in the specified state space. If no state space is given, perform the memory accesses using\nGeneric Addressing. atom with scalar type may be used only\nwith .global and .shared spaces and with generic addressing, where the address points to\n.global or .shared space. atom with vector type may be used only with .global space\nand with generic addressing where the address points to .global space.
Performs a reduction operation with operand b and the value in location a, and stores the\nresult of the specified operation at location a, overwriting the original value. Operand a\nspecifies a location in the specified state space. If no state space is given, perform the memory\naccesses using Generic Addressing. red with scalar type may\nbe used only with .global and .shared spaces and with generic addressing, where the address\npoints to .global or .shared space. red with vector type may be used only with\n.global space and with generic addressing where the address points to .global space.
Two-way SIMD parallel arithmetic operation with secondary operation.
\nFor more information, visit atype .", - "tooltip": "The SIMD video instructions operate on pairs of 16-bit values and quads of 8-bit values.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#simd-video-instructions" - }; - - case "b": - return { - "html": "PTX 2.2 adds a new directive for specifying kernel parameter attributes; specifically, there is a\nnew directives for specifying that a kernel parameter is a pointer, for specifying to which state\nspace the parameter points, and for optionally specifying the alignment of the memory to which the\nparameter points.
\nFor more information, visit b .", - "tooltip": "PTX 2.2 adds a new directive for specifying kernel parameter attributes; specifically, there is a\n\nnew directives for specifying that a kernel parameter is a pointer, for specifying to which state\n\nspac...", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-2-2" + "html": "Atomically loads the original value at location a into destination register d, performs a\nreduction operation with operand b and the value in location a, and stores the result of the\nspecified operation at location a, overwriting the original value. Operand a specifies a\nlocation in the specified state space. If no state space is given, perform the memory accesses using\nGeneric Addressing. atom with scalar type may be used only\nwith .global and .shared spaces and with generic addressing, where the address points to\n.global or .shared space. atom with vector type may be used only with .global space\nand with generic addressing where the address points to .global space.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
Performs barrier synchronization and communication within a CTA. Each CTA instance has sixteen\nbarriers numbered 0..15.
PTX ISA version 6.0 introduces the following new features:
\nFor more information, visit bar , bar.arrive , bar.cta , bar.red.popc.u32 , bar.sync , bar.warp.sync .", + "html": "Performs barrier synchronization and communication within a CTA. Each CTA instance has sixteen\nbarriers numbered 0..15.
bar.warp.sync will cause executing thread to wait until all threads corresponding to\nmembermask have executed a bar.warp.sync with the same membermask value before resuming\nexecution.
PTX ISA version 6.0 introduces the following new features:
\nPTX ISA version 7.8 introduces the following new features:
\nPerforms barrier synchronization and communication within a cluster.
\nPerforms barrier synchronization and communication within a CTA. Each CTA instance has sixteen\nbarriers numbered 0..15.
Given a 32-bit value mask and an integer value base (between 0 and 31), find the n-th (given\nby offset) set bit in mask from the base bit, and store the bit position in d. If not\nfound, store 0xffffffff in d.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
Extract bit field from a and place the zero or sign-extended result in d. Source b gives\nthe bit field starting bit position, and source c gives the bit field length in bits.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
Align and insert a bit field from a into b, and place the result in f. Source c\ngives the starting bit position for the insertion, and source d gives the bit field length in\nbits.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
Find the bit position of the most significant non-sign bit in a and place the result in\nd. Operand a has the instruction type, and destination d has type .u32. For unsigned\nintegers, bfind returns the bit position of the most significant 1. For signed integers,\nbfind returns the bit position of the most significant 0 for negative inputs and the most\nsignificant 1 for non-negative inputs.
PTX ISA version 7.6 introduces the following new features:
\nFor more information, visit bmsk .", - "tooltip": "PTX ISA version 7.6 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-7-6" + "html": "Generates a 32-bit mask starting from the bit position specified in operand a, and of the width\nspecified in operand b. The generated bitmask is stored in the destination operand d.
The curly braces create a group of instructions, used primarily for defining a function body. The\ncurly braces also provide a mechanism for determining the scope of a variable: any variable declared\nwithin a scope is not available outside the scope.
\nFor more information, visit {} .", + "tooltip": "Instruction grouping.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#control-flow-instructions-curly-braces" + }; + case "brev": return { - "html": "This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
Perform bitwise reversal of input.
\nFor more information, visit brev(int) .", + "tooltip": "Bit reverse.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#integer-arithmetic-instructions-brev" }; case "brkpt": @@ -171,53 +150,46 @@ import type {AssemblyInstructionInfo} from '../../../types/assembly-docs.interfa "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#miscellaneous-instructions-brkpt" }; - case "brx": + case "bulk": return { - "html": "PTX ISA version 6.0 introduces the following new features:
\nIndex into a list of possible destination labels, and continue execution from the chosen\nlabel. Conditional branches are specified by using a guard predicate.
\nFor more information, visit brx.idx , brx.idx.uni .", - "tooltip": "PTX ISA version 6.0 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-6-0" - }; - - case "bsel": - return { - "html": "Four-way SIMD parallel comparison with secondary operation.
\nFor more information, visit bsel .", - "tooltip": "Integer quad byte SIMD comparison.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#simd-video-instructions-vset4" - }; - - case "btype": - return { - "html": "Two-way SIMD parallel arithmetic operation with secondary operation.
\nFor more information, visit btype .", - "tooltip": "The SIMD video instructions operate on pairs of 16-bit values and quads of 8-bit values.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#simd-video-instructions" - }; - - case "c": - return { - "html": "Four-way SIMD parallel comparison with secondary operation.
\nFor more information, visit c .", - "tooltip": "Integer quad byte SIMD comparison.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#simd-video-instructions-vset4" + "html": "st.bulk instruction initializes a region of shared memory starting from the location specified\nby destination address operand a.
Declares a list of potential branch targets for a subsequent brx.idx, and associates the list\nwith the label at the start of the line.
The call instruction stores the address of the next instruction, so execution can resume at that\npoint after executing a ret instruction. A call is assumed to be divergent unless the\n.uni suffix is present. The .uni suffix indicates that the call is guaranteed to be\nnon-divergent, i.e. all active threads in a warp that are currently executing this instruction have\nidentical values for the guard predicate and call target.
PTX ISA version 8.6 introduces the following new features:
\nFor more information, visit clusterlaunchcontrol .", - "tooltip": "PTX ISA version 8.6 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-8-6" + "html": "The clusterlaunchcontrol.try_cancel instruction requests atomically cancelling the launch of\na cluster that has not started running yet. It asynchronously writes an opaque response to shared\nmemory indicating whether the operation succeeded or failed. The completion of the asynchronous\noperation is tracked using the mbarrier completion mechanism at .cluster scope.
Performs integer addition and writes the carry-out value into the condition code register.
\nFor more information, visit add.cc .", + "tooltip": "Add two values with carry-out.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#extended-precision-arithmetic-instructions-add-cc" + }; + + case "cluster": + return { + "html": "Performs barrier synchronization and communication within a cluster.
\nFor more information, visit barrier.cluster .", + "tooltip": "Barrier synchronization within a cluster.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-barrier-cluster" }; case "clz": return { - "html": "This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
Count the number of leading zeros in a starting with the most-significant bit and place the\nresult in 32-bit destination register d. Operand a has the instruction type, and destination\nd has type .u32. For .b32 type, the number of leading zeros is between 0 and 32,\ninclusively. For .b64 type, the number of leading zeros is between 0 and 64, inclusively.
Instruction tcgen05.mma is an asynchronous instruction which initiates an MxNxK matrix\nmultiply and accumulate operation,\nD = A*B+D\nwhere the A matrix is MxK, the B matrix is KxN, and the D matrix is MxN.
cp.async.bulk.commit_group instruction creates a new per-thread bulk async-group and batches\nall prior cp{.reduce}.async.bulk.{.prefetch}{.tensor} instructions satisfying the following\nconditions into the new bulk async-group:
cp.async is a non-blocking instruction which initiates an asynchronous copy operation of data\nfrom the location specified by source address operand src to the location specified by\ndestination address operand dst. Operand src specifies a location in the global state space\nand dst specifies a location in the shared state space.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
Copy sign bit of a into value of b, and return the result as d.
Find the cosine of the angle a (in radians).
Find the cosine of the angle a (in radians).
The pending count can be queried from the opaque mbarrier state using mbarrier.pending_count.
The pending count can be queried from the opaque mbarrier state using mbarrier.pending_count.
PTX ISA version 7.4 introduces the following new features:
\nPTX ISA version 8.2 introduces the following new features:
\ncp.async.bulk.prefetch is a non-blocking instruction which may initiate an asynchronous prefetch\nof data from the location specified by source address operand srcMem, in .src statespace, to\nthe L2 cache.
PTX ISA version 8.6 introduces the following new features:
\nThe test_wait and try_wait operations test for the completion of the current or the immediately\npreceding phase of an mbarrier object at the location specified by the operand addr.
Following are the restrictions on the types .b4x16, .b4x16_p64, .b6x16_p32 and\n.b6p2x16:
cp.reduce.async.bulk is a non-blocking instruction which initiates an asynchronous reduction\noperation on an array of memory locations specified by the destination address operand dstMem\nwith the source array whose location is specified by the source address operand srcMem. The size\nof the source and the destination array must be the same and is specified by the operand size.
cp.reduce.async.bulk.tensor is a non-blocking instruction which initiates an asynchronous\nreduction operation of tensor data in the .dst state space with tensor data in the .src\nstate space.
cp.async is a non-blocking instruction which initiates an asynchronous copy operation of data\nfrom the location specified by source address operand src to the location specified by\ndestination address operand dst. Operand src specifies a location in the global state space\nand dst specifies a location in the shared state space.
cp.async.commit_group instruction creates a new cp.async-group per thread and batches all\nprior cp.async instructions initiated by the executing thread but not committed to any\ncp.async-group into the new cp.async-group. If there are no uncommitted cp.async\ninstructions then cp.async.commit_group results in an empty cp.async-group.
cp.async.bulk is a non-blocking instruction which initiates an asynchronous bulk-copy operation\nfrom the location specified by source address operand srcMem to the location specified by\ndestination address operand dstMem.
cp.async.bulk.commit_group instruction creates a new per-thread bulk async-group and batches\nall prior cp{.reduce}.async.bulk.{.prefetch}{.tensor} instructions satisfying the following\nconditions into the new bulk async-group:
cp.async.bulk.prefetch is a non-blocking instruction which may initiate an asynchronous prefetch\nof data from the location specified by source address operand srcMem, in .src statespace, to\nthe L2 cache.
cp.async.bulk.prefetch.tensor is a non-blocking instruction which may initiate an asynchronous\nprefetch of tensor data from the location in .src statespace to the L2 cache.
cp.async.bulk.tensor is a non-blocking instruction which initiates an asynchronous copy\noperation of tensor data from the location in .src state space to the location in the .dst\nstate space.
cp.async.bulk.wait_group instruction will cause the executing thread to wait until only N or\nfewer of the most recent bulk async-groups are pending and all the prior bulk async-groups\ncommitted by the executing threads are complete. For example, when N is 0, the executing thread\nwaits on all the prior bulk async-groups to complete. Operand N is an integer constant.
Causes an arrive-on operation to be\ntriggered by the system on the mbarrier object upon the completion of all prior cp.async\noperations initiated by the\nexecuting thread. The mbarrier object is at the location specified by the operand addr. The\narrive-on operation is\nasynchronous to execution of cp.async.mbarrier.arrive.
cp.async.wait_group instruction will cause executing thread to wait till only N or fewer of\nthe most recent cp.async-groups are pending and all the prior cp.async-groups committed by\nthe executing threads are complete. For example, when N is 0, the executing thread waits on all\nthe prior cp.async-groups to complete. Operand N is an integer constant.
cp.reduce.async.bulk is a non-blocking instruction which initiates an asynchronous reduction\noperation on an array of memory locations specified by the destination address operand dstMem\nwith the source array whose location is specified by the source address operand srcMem. The size\nof the source and the destination array must be the same and is specified by the operand size.
Following are the restrictions on the types .b4x16, .b4x16_p64, .b6x16_p32 and\n.b6p2x16:
cp.reduce.async.bulk.tensor is a non-blocking instruction which initiates an asynchronous\nreduction operation of tensor data in the .dst state space with tensor data in the .src\nstate space.
Instruction tcgen05.cp initiates an asynchronous copy operation from shared memory to the\nlocation specified by the address operand taddr in the Tensor Memory.
PTX ISA version 7.4 introduces the following new features:
\nThe createpolicy instruction creates a cache eviction policy for the specified cache level in an\nopaque 64-bit register specified by the destination operand cache-policy. The cache eviction\npolicy specifies how cache eviction priorities are applied to global memory addresses used in memory\noperations with .level::cache_hint qualifier.
The membar instruction guarantees that prior memory accesses requested by this thread (ld,\nst, atom and red instructions) are performed at the specified level, before later\nmemory operations requested by this thread following the membar instruction. The level\nqualifier specifies the set of threads that may observe the ordering effect of this operation.
The clusterlaunchcontrol.try_cancel instruction requests atomically cancelling the launch of\na cluster that has not started running yet. It asynchronously writes an opaque response to shared\nmemory indicating whether the operation succeeded or failed. The completion of the asynchronous\noperation is tracked using the mbarrier completion mechanism at .cluster scope.
Perform a MxNxK matrix multiply and accumulate operation, D = A*B+C, where the A matrix is\nMxK, the B matrix is KxN, and the C and D matrices are MxN.
PTX ISA version 4.3 introduces the following new features:
\nFor more information, visit cube .", - "tooltip": "PTX ISA version 4.3 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-4-3" + "html": "The createpolicy instruction creates a cache eviction policy for the specified cache level in an\nopaque 64-bit register specified by the destination operand cache-policy. The cache eviction\npolicy specifies how cache eviction priorities are applied to global memory addresses used in memory\noperations with .level::cache_hint qualifier.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
Convert between different types and sizes.
\nPTX ISA version 6.5 introduces the following new features:
\nTable 15 and\nTable 16 show what\nprecision and format the cvt instruction uses given operands of differing types. For example, if a\ncvt.s32.u16 instruction is given a u16 source operand and s32 as a destination operand,\nthe u16 is zero-extended to s32.
Convert a const, Kernel Function Parameters\n(.param), global, local, or shared address to a generic address, or vice-versa. The\nsource and destination addresses must be the same size. Use cvt.u32.u64 or cvt.u64.u32 to\ntruncate or zero-extend addresses.
Convert between different types and sizes.
\nConvert two 32-bit integers a and b into specified type and pack the results into d.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
Convert a const, Kernel Function Parameters\n(.param), global, local, or shared address to a generic address, or vice-versa. The\nsource and destination addresses must be the same size. Use cvt.u32.u64 or cvt.u64.u32 to\ntruncate or zero-extend addresses.
PTX ISA version 3.1 introduces the following new features:
\nPTX ISA version 8.3 introduces the following new features:
\nFor more information, visit cvta , cvta.const , cvta.global , cvta.param , cvta.to , cvta.to.const , cvta.to.param .", - "tooltip": "Introduced in PTX ISA version 2.0.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-2-0" - }; - - case "d": - return { - "html": "Four-way SIMD parallel comparison with secondary operation.
\nPick four arbitrary bytes from two 32-bit registers, and reassemble them into a 32-bit destination\nregister.
\nFor more information, visit d , d.b0 , d.b1 , d.b2 , d.b3 .", - "tooltip": "Permute bytes from register pair.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#simd-video-instructions-vset4" - }; - - case "debug": - return { - "html": "Specifies the set of features in the target architecture for which the current PTX code was\ngenerated. In general, generations of SM architectures follow an onion layer model, where each\ngeneration adds new features and retains all features of previous generations. The onion layer model\nallows the PTX code generated for a given target to be run on later generation devices.
\nFor more information, visit debug .", - "tooltip": "Architecture and Platform target.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#ptx-module-directives-target" - }; - - case "depthtextures": - return { - "html": "tex.{1d,2d,3d}
Convert a const, Kernel Function Parameters\n(.param), global, local, or shared address to a generic address, or vice-versa. The\nsource and destination addresses must be the same size. Use cvt.u32.u64 or cvt.u64.u32 to\ntruncate or zero-extend addresses.
PTX ISA version 7.4 introduces the following new features:
\nFor more information, visit discard .", - "tooltip": "PTX ISA version 7.4 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-7-4" + "html": "Semantically, this behaves like a weak write of an unstable indeterminate value:\nreads of memory locations with unstable indeterminate values may return different\nbit patterns each time until the memory is overwritten.\nThis operation hints to the implementation that data in the specified cache .level\ncan be destructively discarded without writing it back to memory.
Divides a by b, stores result in d.
Divides a by b, stores result in d.
tcgen05.alloc is a potentially blocking instruction which dynamically allocates\nthe specified number of columns in the Tensor Memory and writes\nthe address of the allocated Tensor Memory into shared memory\nat the location specified by address operand dst. The tcgen05.alloc blocks if the\nrequested amount of Tensor Memory is not available and unblocks\nas soon as the requested amount of Tensor Memory becomes\navailable for allocation.
Two-way 16-bit to 8-bit dot product which is accumulated in 32-bit result.
\nFor more information, visit dp2a(int) .", + "tooltip": "Two-way dot product-accumulate.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#integer-arithmetic-instructions-dp2a" }; - case "dtype": + case "dp4a": return { - "html": "Two-way SIMD parallel arithmetic operation with secondary operation.
\nFor more information, visit dtype .", - "tooltip": "The SIMD video instructions operate on pairs of 16-bit values and quads of 8-bit values.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#simd-video-instructions" + "html": "Four-way byte dot product which is accumulated in 32-bit result.
\nFor more information, visit dp4a(int) .", + "tooltip": "Four-way byte dot product-accumulate.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#integer-arithmetic-instructions-dp4a" }; - case "e": + case "drop": return { - "html": "PTX ISA version 8.5 introduces the following new features:
\nFor more information, visit e .", - "tooltip": "PTX ISA version 8.5 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-8-5" + "html": "A thread executing mbarrier.arrive_drop on the mbarrier object at the location specified by\nthe address operand addr performs the following steps:
Pick four arbitrary bytes from two 32-bit registers, and reassemble them into a 32-bit destination\nregister.
\nFor more information, visit ecl .", - "tooltip": "Permute bytes from register pair.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-prmt" - }; - - case "ecr": - return { - "html": "Pick four arbitrary bytes from two 32-bit registers, and reassemble them into a 32-bit destination\nregister.
\nFor more information, visit ecr .", - "tooltip": "Permute bytes from register pair.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-prmt" - }; - - case "elect": - return { - "html": "elect.sync elects one predicated active leader thread from among a set of threads specified by\nmembermask. laneid of the elected thread is returned in the 32-bit destination operand\nd. The sink symbol \u2018_\u2019 can be used for destination operand d. The predicate destination\np is set to True for the leader thread, and False for all other threads.
PTX ISA version 8.0 introduces the following new features:
\nFor more information, visit elect , elect.sync .", - "tooltip": "Elect a leader thread from a set of threads.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-elect-sync" - }; - - case "eq": - return { - "html": "Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the destination operand.
\nFor more information, visit eq .", - "tooltip": "Operandc,pandqhas type.pred.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#half-precision-comparison-instructions-setp" - }; - - case "equ": - return { - "html": "Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the destination operand.
\nFor more information, visit equ .", - "tooltip": "Operandc,pandqhas type.pred.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#half-precision-comparison-instructions-setp" + "html": "Raise 2 to the power a.
Specifies the set of features in the target architecture for which the current PTX code was\ngenerated. In general, generations of SM architectures follow an onion layer model, where each\ngeneration adds new features and retains all features of previous generations. The onion layer model\nallows the PTX code generated for a given target to be run on later generation devices.
\nFor more information, visit f .", - "tooltip": "Architecture and Platform target.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#ptx-module-directives-target" - }; - - case "false": - return { - "html": "Instruction clusterlaunchcontrol.query_cancel can be used to decode opaque response\nwritten by instruction clusterlaunchcontrol.try_cancel.
Compute a fast, gross approximation to the reciprocal as follows:
\nFor more information, visit rcp.approx.ftz.f64(fp) .", + "tooltip": "Compute a fast, gross approximation to the reciprocal of a value.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#floating-point-instructions-rcp-approx-ftz-f64" }; case "fence": return { - "html": "PTX ISA version 7.8 introduces the following new features:
\nPTX ISA version 7.5 introduces the following new features:
\nThe shared memory accesses by tcgen05.mma and tcgen05.cp operations are performed\nin the asynchronous proxy (async proxy).
The membar instruction guarantees that prior memory accesses requested by this thread (ld,\nst, atom and red instructions) are performed at the specified level, before later\nmemory operations requested by this thread following the membar instruction. The level\nqualifier specifies the set of threads that may observe the ordering effect of this operation.
wgmma.fence instruction establishes an ordering between prior accesses to any warpgroup\nregisters and subsequent accesses to the same registers by a wgmma.mma_async instruction. Only\nthe accumulator register and the input registers containing the fragments of matrix A require this\nordering.
Atomic reduction operations like red do not form acquire patterns with acquire fences.
The call instruction stores the address of the next instruction, so execution can resume at that\npoint after executing a ret instruction. A call is assumed to be divergent unless the\n.uni suffix is present. The .uni suffix indicates that the call is guaranteed to be\nnon-divergent, i.e. all active threads in a warp that are currently executing this instruction have\nidentical values for the guard predicate and call target.
PTX ISA version 7.0 introduces the following new features:
\nThis section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
Performs a fused multiply-add with no loss of precision in the intermediate product and addition.
\nMultiplies two values and adds a third, and then writes the resulting value into a destination\nregister.
\nConverts input operands a and b from .atype into .f32 type. The converted values\nare then used to perform fused multiply-add operation with no loss of precision in the intermediate\nproduct and addition. The resulting value is stored in the destination operand d.
PTX ISA version 6.0 introduces the following new features:
\nFor more information, visit fns .", - "tooltip": "PTX ISA version 6.0 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-6-0" - }; - - case "foo": - return { - "html": "In PTX, functions are declared and defined using the .func directive. A function declaration\nspecifies an optional list of return parameters, the function name, and an optional list of input\nparameters; together these specify the function\u2019s interface, or prototype. A function definition\nspecifies both the interface and the body of the function. A function must be declared or defined\nprior to being called.
The call instruction stores the address of the next instruction, so execution can resume at that\npoint after executing a ret instruction. A call is assumed to be divergent unless the\n.uni suffix is present. The .uni suffix indicates that the call is guaranteed to be\nnon-divergent, i.e. all active threads in a warp that are currently executing this instruction have\nidentical values for the guard predicate and call target.
The call instruction stores the address of the next instruction, so execution can resume at that\npoint after executing a ret instruction. A call is assumed to be divergent unless the\n.uni suffix is present. The .uni suffix indicates that the call is guaranteed to be\nnon-divergent, i.e. all active threads in a warp that are currently executing this instruction have\nidentical values for the guard predicate and call target.
The createpolicy instruction creates a cache eviction policy for the specified cache level in an\nopaque 64-bit register specified by the destination operand cache-policy. The cache eviction\npolicy specifies how cache eviction priorities are applied to global memory addresses used in memory\noperations with .level::cache_hint qualifier.
PTX ISA version 9.0 introduces the following new features:
\nFor more information, visit frequency .", - "tooltip": "PTX ISA version 9.0 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-9-0" - }; - - case "func": - return { - "html": "The call instruction stores the address of the next instruction, so execution can resume at that\npoint after executing a ret instruction. A call is assumed to be divergent unless the\n.uni suffix is present. The .uni suffix indicates that the call is guaranteed to be\nnon-divergent, i.e. all active threads in a warp that are currently executing this instruction have\nidentical values for the guard predicate and call target.
PTX 2.2 adds a new directive for specifying kernel parameter attributes; specifically, there is a\nnew directives for specifying that a kernel parameter is a pointer, for specifying to which state\nspace the parameter points, and for optionally specifying the alignment of the memory to which the\nparameter points.
\nFor more information, visit g .", - "tooltip": "PTX 2.2 adds a new directive for specifying kernel parameter attributes; specifically, there is a\n\nnew directives for specifying that a kernel parameter is a pointer, for specifying to which state\n\nspac...", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-2-2" - }; - - case "ge": - return { - "html": "Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the destination operand.
\nFor more information, visit ge .", - "tooltip": "Operandc,pandqhas type.pred.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#half-precision-comparison-instructions-setp" - }; - - case "generic": - return { - "html": "Write register d with the value of a.
PTX ISA version 7.8 introduces the following new features:
\nFor more information, visit getctarank .", - "tooltip": "PTX ISA version 7.8 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-7-8" - }; - - case "geu": - return { - "html": "Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the destination operand.
\nFor more information, visit geu .", - "tooltip": "Operandc,pandqhas type.pred.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#half-precision-comparison-instructions-setp" - }; - - case "gl": - return { - "html": "The membar instruction guarantees that prior memory accesses requested by this thread (ld,\nst, atom and red instructions) are performed at the specified level, before later\nmemory operations requested by this thread following the membar instruction. The level\nqualifier specifies the set of threads that may observe the ordering effect of this operation.
The tensormap.cp_fenceproxy instructions perform the following operations in order :
The tensormap.cp_fenceproxy instructions perform the following operations in order :
The membar instruction guarantees that prior memory accesses requested by this thread (ld,\nst, atom and red instructions) are performed at the specified level, before later\nmemory operations requested by this thread following the membar instruction. The level\nqualifier specifies the set of threads that may observe the ordering effect of this operation.
Performs a fused multiply-add with no loss of precision in the intermediate product and addition.
\nFor more information, visit fma(fp) .", + "tooltip": "Fused multiply-add.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#floating-point-instructions-fma" + }; + + case "fns": + return { + "html": "Given a 32-bit value mask and an integer value base (between 0 and 31), find the n-th (given\nby offset) set bit in mask from the base bit, and store the bit position in d. If not\nfound, store 0xffffffff in d.
Write the destination register d with the rank of the CTA which contains the address specified\nin operand a.
PTX ISA version 7.8 introduces the following new features:
\nThe griddepcontrol instruction allows the dependent grids and prerequisite grids as defined by\nthe runtime, to control execution in the following way:
The griddepcontrol instruction allows the dependent grids and prerequisite grids as defined by\nthe runtime, to control execution in the following way:
Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the destination operand.
\nFor more information, visit gt .", - "tooltip": "Operandc,pandqhas type.pred.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#half-precision-comparison-instructions-setp" + "html": "cp.async.commit_group instruction creates a new cp.async-group per thread and batches all\nprior cp.async instructions initiated by the executing thread but not committed to any\ncp.async-group into the new cp.async-group. If there are no uncommitted cp.async\ninstructions then cp.async.commit_group results in an empty cp.async-group.
Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the destination operand.
\nFor more information, visit gtu .", - "tooltip": "Operandc,pandqhas type.pred.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#half-precision-comparison-instructions-setp" - }; - - case "hi": - return { - "html": "Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the first destination operand. A related value computed using\nthe complement of the compare result is written to the second destination operand.
\nFor more information, visit hi .", - "tooltip": "The signed and unsigned comparison operators areeq,ne,lt,le,gt,ge.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#comparison-and-selection-instructions-setp" - }; - - case "hs": - return { - "html": "Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the first destination operand. A related value computed using\nthe complement of the compare result is written to the second destination operand.
\nFor more information, visit hs .", - "tooltip": "The signed and unsigned comparison operators areeq,ne,lt,le,gt,ge.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#comparison-and-selection-instructions-setp" - }; - - case "i": - return { - "html": "A warpgroup executing sparse wgmma.mma_async.m64nNk16 will compute an MMA operation of shape\n.m64nNk16 where N is a valid n dimension as listed in\nMatrix Shape.
Instruction tcgen05.mma.ws.sp is an asynchronous instruction which initiates\nan MxNxK matrix multiply and accumulate operation,\nD = A*B+D\nwhere the A matrix is Mx(K/2), the B matrix is KxN, and the D matrix\nis MxN. Sparse Matrices describes the details of the\nsparsity.
Index into a list of possible destination labels, and continue execution from the chosen\nlabel. Conditional branches are specified by using a guard predicate.
\nFor more information, visit index .", + "html": "Index into a list of possible destination labels, and continue execution from the chosen\nlabel. Conditional branches are specified by using a guard predicate.
\nFor more information, visit brx.idx .", "tooltip": "Branch to a label indexed from a list of potential branch targets.", "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#control-flow-instructions-brx-idx" }; - case "initval": + case "init": return { - "html": "st.bulk instruction initializes a region of shared memory starting from the location specified\nby destination address operand a.
mbarrier.init initializes the mbarrier object at the location specified by the address operand\naddr with the unsigned 32-bit integer count. The value of operand count must be in the range\nas specified in Contents of the mbarrier object.
mbarrier.inval invalidates the mbarrier object at the location specified by the address\noperand addr.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
Write predicate register p with 1 if generic address a falls within the specified state\nspace window and with 0 otherwise. Destination p has type .pred; the source address\noperand must be of type .u32 or .u64.
Write predicate register p with 1 if generic address a falls within the specified state\nspace window and with 0 otherwise. Destination p has type .pred; the source address\noperand must be of type .u32 or .u64.
PTX ISA version 4.0 introduces the following new features:
\nFor more information, visit istypep .", - "tooltip": "PTX ISA version 4.0 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-4-0" - }; - - case "label": - return { - "html": "Declares the source file location (source file, line number, and column position) to be associated\nwith lexically subsequent PTX instructions. .loc refers to file_index which is defined by a\n.file directive.
The data movement shape indicates the dimension of the data to be moved to or from the\nTensor Memory. These shapes are described as a tuple lane x size where:
elect.sync elects one predicated active leader thread from among a set of threads specified by\nmembermask. laneid of the elected thread is returned in the 32-bit destination operand\nd. The sink symbol \u2018_\u2019 can be used for destination operand d. The predicate destination\np is set to True for the leader thread, and False for all other threads.
The data movement shape indicates the dimension of the data to be moved to or from the\nTensor Memory. These shapes are described as a tuple lane x size where:
Write predicate register p with 1 if register a points to an opaque variable of the\nspecified type, and with 0 otherwise. Destination p has type .pred; the source address\noperand must be of type .u64.
Load register variable d from the location specified by the source address operand a in\nspecified state space. If no state space is given, perform the load using Generic Addressing.
Load register variable d from the location specified by the source address operand a in the\nglobal state space, and optionally cache in non-coherent read-only cache.
The alloca instruction dynamically allocates memory on the stack frame of the current function\nand updates the stack pointer accordingly. The returned pointer ptr points to local memory and\ncan be used in the address operand of ld.local and st.local instructions.
Load register variable d from the location specified by the source address operand a in\nspecified state space. If no state space is given, perform the load using Generic Addressing.
Load register variable d from the location specified by the source address operand a in the\nglobal state space, and optionally cache in non-coherent read-only cache.
The alloca instruction dynamically allocates memory on the stack frame of the current function\nand updates the stack pointer accordingly. The returned pointer ptr points to local memory and\ncan be used in the address operand of ld.local and st.local instructions.
PTX ISA version 6.5 introduces the following new features:
\nFor more information, visit ldmatrix .", - "tooltip": "PTX ISA version 6.5 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-6-5" + "html": "Collectively load one or more matrices across all threads in a warp from the location indicated by\nthe address operand p, from .shared state space into destination register r. If no state\nspace is provided, generic addressing is used, such that the address in p points into\n.shared space. If the generic address doesn\u2019t fall in .shared state space, then the behavior\nis undefined.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
Load read-only data into register variable d from the location specified by the source address\noperand a in the global state space, where the address is guaranteed to be the same across all\nthreads in the warp. If no state space is given, perform the load using Generic Addressing.
Load read-only data into register variable d from the location specified by the source address\noperand a in the global state space, where the address is guaranteed to be the same across all\nthreads in the warp. If no state space is given, perform the load using Generic Addressing.
Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the destination operand.
\nFor more information, visit le .", - "tooltip": "Operandc,pandqhas type.pred.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#half-precision-comparison-instructions-setp" + "html": "Determine the log2 of a.
PTX 2.3 adds support for texture arrays. The texture array feature supports access to an array of 1D\nor 2D textures, where an integer indexes into the array of textures, and then one or two\nsingle-precision floating point coordinates are used to address within the selected 1D or 2D\ntexture.
\nFor more information, visit len .", - "tooltip": "PTX 2.3 adds support for texture arrays. The texture array feature supports access to an array of 1D\n\nor 2D textures, where an integer indexes into the array of textures, and then one or two\n\nsingle-pre...", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-2-3" - }; - - case "leu": - return { - "html": "Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the destination operand.
\nFor more information, visit leu .", - "tooltip": "Operandc,pandqhas type.pred.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#half-precision-comparison-instructions-setp" - }; - - case "level": - return { - "html": "The membar instruction guarantees that prior memory accesses requested by this thread (ld,\nst, atom and red instructions) are performed at the specified level, before later\nmemory operations requested by this thread following the membar instruction. The level\nqualifier specifies the set of threads that may observe the ordering effect of this operation.
Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the first destination operand. A related value computed using\nthe complement of the compare result is written to the second destination operand.
\nFor more information, visit lo .", - "tooltip": "The signed and unsigned comparison operators areeq,ne,lt,le,gt,ge.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#comparison-and-selection-instructions-setp" - }; - - case "local": - return { - "html": "Convert a const, Kernel Function Parameters\n(.param), global, local, or shared address to a generic address, or vice-versa. The\nsource and destination addresses must be the same size. Use cvt.u32.u64 or cvt.u64.u32 to\ntruncate or zero-extend addresses.
Query an attribute of a texture or sampler. Operand a is either a .texref or .samplerref variable, or a .u64 register.
Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the first destination operand. A related value computed using\nthe complement of the compare result is written to the second destination operand.
\nFor more information, visit ls .", - "tooltip": "The signed and unsigned comparison operators areeq,ne,lt,le,gt,ge.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#comparison-and-selection-instructions-setp" - }; - - case "lt": - return { - "html": "Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the destination operand.
\nFor more information, visit lt .", - "tooltip": "Operandc,pandqhas type.pred.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#half-precision-comparison-instructions-setp" - }; - - case "ltu": - return { - "html": "Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the destination operand.
\nFor more information, visit ltu .", - "tooltip": "Operandc,pandqhas type.pred.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#half-precision-comparison-instructions-setp" - }; - - case "m": - return { - "html": "In this section we describe how the contents of thread registers are associated with fragments of A\nmatrix and the sparsity metadata.
\nFor more information, visit m .", - "tooltip": "In this section we describe how the contents of thread registers are associated with fragments of A\n\nmatrix and the sparsity metadata.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#asynchronous-warpgroup-level-matrix-fragments-for-sparse-wgmma" + "html": "Compute bitwise logical operation on inputs a, b, c and store the result in destination\nd.
Multiplies two values and adds a third, and then writes the resulting value into a destination\nregister.
\nPTX ISA version 3.0 introduces the following new features:
\nThis section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
PTX ISA version 3.1 introduces the following new features:
\nFor more information, visit mad(fp) , mad.cc , mad.f32 , mad.f64(fp) , mad.ftz.f32(fp) , mad.rn.f32 , mad.rn.f64(fp) , mad.sat.f32(fp) .", + "html": "Multiplies two values, optionally extracts the high or low half of the intermediate result, and adds\na third value. Writes the result into a destination register.
\nMultiplies two values, extracts either the high or low part of the result, and adds a third\nvalue. Writes the result to the destination register and the carry-out from the addition into the\ncondition code register.
\nMultiplies two values, extracts either the high or low part of the result, and adds a third value\nalong with carry-in. Writes the result to the destination register and optionally writes the\ncarry-out from the addition into the condition code register.
\nMultiplies two values and adds a third, and then writes the resulting value into a destination\nregister.
\nFor more information, visit mad(int) , mad.cc , mad.cc , mad.f32(fp) .", "tooltip": "Multiply two values and add a third value.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#floating-point-instructions-mad" + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#integer-arithmetic-instructions-mad" + }; + + case "mad24": + return { + "html": "Compute the product of two 24-bit integer values held in 32-bit source registers, and add a third,\n32-bit value to either the high or low 32-bits of the 48-bit result. Return either the high or low\n32-bits of the 48-bit result.
\nFor more information, visit mad24(int) .", + "tooltip": "Multiply two 24-bit integer values and add a third value.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#integer-arithmetic-instructions-mad24" }; case "madc": return { - "html": "PTX ISA version 3.0 introduces the following new features:
\nFor more information, visit madc .", - "tooltip": "PTX ISA version 3.0 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-3-0" + "html": "Multiplies two values, extracts either the high or low part of the result, and adds a third value\nalong with carry-in. Writes the result to the destination register and optionally writes the\ncarry-out from the addition into the condition code register.
\nFor more information, visit madc .", + "tooltip": "Multiplies two values, extracts either the high or low part of the result, and adds a third value\n\nalong with carry-in. Writes the result to the destination register and optionally writes the\n\ncarry-out...", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#extended-precision-arithmetic-instructions-madc" }; case "mapa": return { - "html": "PTX ISA version 7.8 introduces the following new features:
\nFor more information, visit mapa .", - "tooltip": "PTX ISA version 7.8 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-7-8" - }; - - case "mask": - return { - "html": "The \"used_bytes_mask\" pragma is a directive that specifies used bytes in a load\noperation based on the mask provided.
PTX ISA version 6.0 introduces the following new features:
\nFor more information, visit match.sync .", - "tooltip": "PTX ISA version 6.0 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-6-0" + "html": "Get address in the CTA specified by operand b which corresponds to the address specified by\noperand a.
PTX ISA version 7.0 introduces the following new features:
\nStore the maximum of a, b and optionally c in d.
Store the maximum of a and b in d.
Store the maximum of a and b in d.
The instruction tcgen05.commit is an asynchronous instruction which makes the mbarrier object,\nspecified by the address operand mbar, track the completion of all the prior asynchronous\ntcgen05 operations, as listed in\nmbarrier based completion mechanism,\ninitiated by the executing thread. Upon the completion of the tracked asynchronous tcgen05\noperations, the signal specified by the .completion_mechanism is triggered by the system\non the mbarrier object.
PTX ISA version 7.0 introduces the following new features:
\nPTX ISA version 8.0 introduces the following new features:
\nmbarrier.inval invalidates the mbarrier object at the location specified by the address\noperand addr.
mbarrier.init initializes the mbarrier object at the location specified by the address operand\naddr with the unsigned 32-bit integer count. The value of operand count must be in the range\nas specified in Contents of the mbarrier object.
A thread executing mbarrier.arrive performs an arrive-on operation\non the mbarrier object at the location specified by the address operand addr. The 32-bit\nunsigned integer operand count specifies the count argument to the arrive-on\noperation.
The following table summarizes the support of various mbarrier operations on mbarrier objects\nlocated at different shared memory locations:
\nThe pending count can be queried from the opaque mbarrier state using mbarrier.pending_count.
A thread executing mbarrier.arrive_drop on the mbarrier object at the location specified by\nthe address operand addr performs the following steps:
A thread executing mbarrier.complete_tx performs a complete-tx\noperation on the mbarrier object at the location specified by the address operand addr. The\n32-bit unsigned integer operand txCount specifies the completeCount argument to the\ncomplete-tx operation.
A thread executing mbarrier.expect_tx performs an expect-tx\noperation on the mbarrier object at the location specified by the address operand addr. The\n32-bit unsigned integer operand txCount specifies the expectCount argument to the\nexpect-tx operation.
mbarrier.inval invalidates the mbarrier object at the location specified by the address\noperand addr.
cp.async is a non-blocking instruction which initiates an asynchronous copy operation of data\nfrom the location specified by source address operand src to the location specified by\ndestination address operand dst. Operand src specifies a location in the global state space\nand dst specifies a location in the shared state space.
A thread must explicitly wait for the completion of an asynchronous copy operation in order to\naccess the result of the operation. Once an asynchronous copy operation is initiated, modifying the\nsource memory location or tensor descriptor or reading from the destination memory location before\nthe asynchronous operation completes, exhibits undefined behavior.
\nA thread can track the completion of one or more asynchronous operations using the current phase of\nan mbarrier object. When the current phase of the mbarrier object is complete, it implies that\nall asynchronous operations tracked by this phase are complete, and all threads participating in\nthat mbarrier object can access the result of the asynchronous operations.
\nThe test_wait and try_wait operations test for the completion of the current or the immediately\npreceding phase of an mbarrier object at the location specified by the operand addr.
PTX ISA version 7.8 introduces the following new features:
\nPTX ISA version 7.5 introduces the following new features:
\nThis section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
elect.sync elects one predicated active leader thread from among a set of threads specified by\nmembermask. laneid of the elected thread is returned in the 32-bit destination operand\nd. The sink symbol \u2018_\u2019 can be used for destination operand d. The predicate destination\np is set to True for the leader thread, and False for all other threads.
The membar instruction guarantees that prior memory accesses requested by this thread (ld,\nst, atom and red instructions) are performed at the specified level, before later\nmemory operations requested by this thread following the membar instruction. The level\nqualifier specifies the set of threads that may observe the ordering effect of this operation.
PTX ISA version 7.0 introduces the following new features:
\nStore the minimum of a, b and optionally c in d.
Store the minimum of a and b in d.
Store the minimum of a and b in d.
PTX ISA version 3.1 introduces the following new features:
\nFor more information, visit mipmaps .", - "tooltip": "PTX ISA version 3.1 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-3-1" + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#integer-arithmetic-instructions-min" }; case "mma": return { - "html": "PTX ISA version 6.4 introduces the following new features:
\nPerform a MxNxK matrix multiply and accumulate operation, D = A*B+C, where the A matrix is\nMxK, the B matrix is KxN, and the C and D matrices are MxN.
A warp executing sparse mma.m16n8k128 with .u4 / .s4 / .e2m1 integer type will compute an MMA\noperation of shape .m16n8k128.
A warp executing sparse mma.m16n8k16 with .tf32 floating point type will compute an MMA\noperation of shape .m16n8k16.
A warp executing mma.m16n8k256 will compute an MMA operation of shape .m16n8k256.
A warp executing sparse mma.m16n8k32 with .u8 / .s8 integer type will compute an MMA\noperation of shape .m16n8k32.
A warp executing mma.m16n8k4 will compute an MMA operation of shape .m16n8k4.
A warp executing sparse mma.m16n8k64 with .u4 / .s4 integer type will compute an MMA\noperation of shape .m16n8k64.
A warp executing sparse mma.m16n8k8 with .tf32 floating point type will compute an MMA\noperation of shape .m16n8k8.
A warp executing mma.m8n8k128 will compute an MMA operation of shape .m8n8k128.
A warp executing mma.m8n8k16 will compute an MMA operation of shape .m8n8k16.
A warp executing mma.m8n8k32 will compute an MMA operation of shape .m8n8k32.
A warp executing mma.m8n8k4 with .f64 floating point type will compute an MMA operation of\nshape .m8n8k4.
PTX ISA version 8.4 introduces the following new features:
\nInstruction tcgen05.mma.ws.sp is an asynchronous instruction which initiates\nan MxNxK matrix multiply and accumulate operation,\nD = A*B+D\nwhere the A matrix is Mx(K/2), the B matrix is KxN, and the D matrix\nis MxN. Sparse Matrices describes the details of the\nsparsity.
Perform a MxNxK matrix multiply and accumulate operation, D = A*B+C, where the A matrix is\nMxK, the B matrix is KxN, and the C and D matrices are MxN.
Perform a warp-level matrix multiply-and-accumulate computation D = A * B + C using matrices A,\nB and C loaded in registers a, b and c respectively, and store the result matrix in\nregister d. The register arguments a, b, c and d hold unspecified fragments of\nthe corresponding matrices as described in Matrix Fragments for WMMA
Write register d with the value of a.
Write register d with the value of a.
PTX ISA version 7.8 introduces the following new features:
\nFor more information, visit movmatrix .", - "tooltip": "PTX ISA version 7.8 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-7-8" - }; - - case "msb": - return { - "html": "Extract bit field from a and place the zero or sign-extended result in d. Source b gives\nthe bit field starting bit position, and source c gives the bit field length in bits.
Move a row-major matrix across all threads in a warp, reading elements from source a, and\nwriting the transposed elements to destination d.
Compute the product of two values.
\nFor more information, visit mul(int) , mul.f32(fp) , mul.f32x2(fp) , mul.f64(fp) , mul.ftz.f32(fp) , mul.ftz.f32x2(fp) , mul.sat.f32(fp) .", + "html": "Compute the product of two values.
\nFor more information, visit mul(int) .", "tooltip": "Multiply two values.", "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#integer-arithmetic-instructions-mul" }; + case "mul24": + return { + "html": "Compute the product of two 24-bit integer values held in 32-bit source registers, and return either\nthe high or low 32-bits of the 48-bit result.
\nFor more information, visit mul24(int) .", + "tooltip": "Multiply two 24-bit integer values.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#integer-arithmetic-instructions-mul24" + }; + case "multimem": return { - "html": "PTX ISA version 8.1 introduces the following new features:
\nFor more information, visit multimem.red , multimem.st .", - "tooltip": "PTX ISA version 8.1 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-8-1" - }; - - case "n": - return { - "html": "The \"frequency\" pragma is a directive that specifies the number of times a basic block is\nexecuted by an executing thread. The optimizing compiler backend treats this pragma as a hint\nwhich will be used for optimizations.
Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the destination operand.
\nFor more information, visit nan .", - "tooltip": "Operandc,pandqhas type.pred.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#half-precision-comparison-instructions-setp" + "html": "Instruction multimem.ld_reduce performs the following operations:
PTX ISA version 6.3 introduces the following new features:
\nFor more information, visit nanosleep .", - "tooltip": "PTX ISA version 6.3 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-6-3" + "html": "Suspends the thread for a sleep duration approximately close to the delay t, specified in\nnanoseconds. t may be a register or an immediate value.
Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the destination operand.
\nFor more information, visit ne .", - "tooltip": "Operandc,pandqhas type.pred.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#half-precision-comparison-instructions-setp" + "html": "Load register variable d from the location specified by the source address operand a in the\nglobal state space, and optionally cache in non-coherent read-only cache.
PTX ISA version 6.0 introduces the following new features:
\nNegate the sign of a and store the result in d.
Negate the sign of a and store the result in d.
\nFor more information, visit neg(int) .", "tooltip": "Arithmetic negate.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-6-0" - }; - - case "neu": - return { - "html": "Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the destination operand.
\nFor more information, visit neu .", - "tooltip": "Operandc,pandqhas type.pred.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#half-precision-comparison-instructions-setp" + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#integer-arithmetic-instructions-neg" }; case "not": @@ -934,172 +563,74 @@ import type {AssemblyInstructionInfo} from '../../../types/assembly-docs.interfa "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#logic-and-shift-instructions-not" }; - case "ntid": + case "or": return { - "html": "The Parallel Thread Execution (PTX) programming model is explicitly parallel: a PTX program\nspecifies the execution of a given thread of a parallel thread array. A cooperative thread array,\nor CTA, is an array of threads that execute a kernel concurrently or in parallel.
\nFor more information, visit ntid , ntid.x , ntid.y , ntid.z .", - "tooltip": "TheParallel Thread Execution (PTX)programming model is explicitly parallel: a PTX program\n\nspecifies the execution of a given thread of a parallel thread array. Acooperative thread array,\n\nor CTA, is an...", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#cooperative-thread-arrays" + "html": "Compute the bit-wise or operation for the bits in a and b.
Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the destination operand.
\nFor more information, visit num .", - "tooltip": "Operandc,pandqhas type.pred.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#half-precision-comparison-instructions-setp" + "html": "Convert two 32-bit integers a and b into specified type and pack the results into d.
The ordered floating-point comparisons are eq, ne, lt, le, gt, and ge. If\neither operand is NaN, the result is\nFalse. Table 23 lists the floating-point\ncomparison operators.
PTX instructions generally have from zero to four operands, plus an optional guard predicate\nappearing after an @ symbol to the left of the opcode:
The tensormap.replace instruction replaces the field, specified by .field qualifier,\nof the tensor-map object at the location specified by the address operand addr with a\nnew value. The new value is specified by the argument new_val.
Collectively store one or more matrices across all threads in a warp to the location indicated by\nthe address operand p, in .shared state space. If no state space is provided, generic\naddressing is used, such that the address in p points into .shared space. If the generic\naddress doesn\u2019t fall in .shared state space, then the behavior is undefined.
tcgen05.alloc is a potentially blocking instruction which dynamically allocates\nthe specified number of columns in the Tensor Memory and writes\nthe address of the allocated Tensor Memory into shared memory\nat the location specified by address operand dst. The tcgen05.alloc blocks if the\nrequested amount of Tensor Memory is not available and unblocks\nas soon as the requested amount of Tensor Memory becomes\navailable for allocation.
Triggers one or more of a fixed number of performance monitor events, with event index or mask\nspecified by immediate operand a.
PTX ISA version 3.0 introduces the following new features:
\nFor more information, visit pmevent , pmevent.mask .", + "html": "Triggers one or more of a fixed number of performance monitor events, with event index or mask\nspecified by immediate operand a.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
PTX 2.3 adds support for texture arrays. The texture array feature supports access to an array of 1D\nor 2D textures, where an integer indexes into the array of textures, and then one or two\nsingle-precision floating point coordinates are used to address within the selected 1D or 2D\ntexture.
\nFor more information, visit pos .", - "tooltip": "PTX 2.3 adds support for texture arrays. The texture array feature supports access to an array of 1D\n\nor 2D textures, where an integer indexes into the array of textures, and then one or two\n\nsingle-pre...", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-2-3" + "html": "Count the number of one bits in a and place the resulting population count in 32-bit\ndestination register d. Operand a has the instruction type and destination d has type\n.u32.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
cp.async.bulk.prefetch is a non-blocking instruction which may initiate an asynchronous prefetch\nof data from the location specified by source address operand srcMem, in .src statespace, to\nthe L2 cache.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
The prefetch instruction brings the cache line containing the specified address in global or\nlocal memory state space into the specified cache level.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
The alloca instruction dynamically allocates memory on the stack frame of the current function\nand updates the stack pointer accordingly. The returned pointer ptr points to local memory and\ncan be used in the address operand of ld.local and st.local instructions.
Pass module-scoped, entry-scoped, or statement-level directives to the PTX backend compiler.
\nFor more information, visit ptxas .", - "tooltip": "Pass directives to PTX backend compiler.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#performance-tuning-directives-pragma" - }; - - case "py": - return { - "html": "In PTX, functions are declared and defined using the .func directive. A function declaration\nspecifies an optional list of return parameters, the function name, and an optional list of input\nparameters; together these specify the function\u2019s interface, or prototype. A function definition\nspecifies both the interface and the body of the function. A function must be declared or defined\nprior to being called.
Compute bitwise logical operation on inputs a, b, c and store the result in destination\nd.
PTX 2.2 adds a new directive for specifying kernel parameter attributes; specifically, there is a\nnew directives for specifying that a kernel parameter is a pointer, for specifying to which state\nspace the parameter points, and for optionally specifying the alignment of the memory to which the\nparameter points.
\nFor more information, visit r .", - "tooltip": "PTX 2.2 adds a new directive for specifying kernel parameter attributes; specifically, there is a\n\nnew directives for specifying that a kernel parameter is a pointer, for specifying to which state\n\nspac...", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-2-2" - }; - - case "rbits": - return { - "html": "Convert between different types and sizes.
\nFor more information, visit rbits .", - "tooltip": "Convert a value from one type to another.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt" + "html": "Pick four arbitrary bytes from two 32-bit registers, and reassemble them into a 32-bit destination\nregister.
\nFor more information, visit prmt .", + "tooltip": "Permute bytes from register pair.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-prmt" }; case "rcp": return { - "html": "This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
Compute 1/a, store result in d.
The underlying, stack-based ABI is supported in PTX ISA version 2.1 for sm_2x targets.
Compute 1/a, store result in d.
Compute a fast, gross approximation to the reciprocal as follows:
\nFor more information, visit rcp(fp) , rcp.approx.f32(fp) , rcp.approx.ftz.f64(fp) .", "tooltip": "Take the reciprocal of a value.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-2-0" + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#floating-point-instructions-rcp" }; case "red": return { - "html": "This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
Performs a reduction operation with operand b and the value in location a, and stores the\nresult of the specified operation at location a, overwriting the original value. Operand a\nspecifies a location in the specified state space. If no state space is given, perform the memory\naccesses using Generic Addressing. red with scalar type may\nbe used only with .global and .shared spaces and with generic addressing, where the address\npoints to .global or .shared space. red with vector type may be used only with\n.global space and with generic addressing where the address points to .global space.
PTX ISA version 8.1 introduces the following new features:
\nFor more information, visit red , red.add.bf16 , red.add.bf16x2 , red.add.f16 , red.add.f16x2 , red.add.f32 , red.add.f64 , red.add.noftz.bf16 , red.add.noftz.bf16x2 , red.add.noftz.f16 , red.add.noftz.f16x2 , red.async , red.f16x2 , red.global , red.global.add.u64 , red.shared , red.shared.add.u64 .", - "tooltip": "Reduction operations on global and shared memory.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-2-0" - }; - - case "redux": - return { - "html": "PTX ISA version 7.0 introduces the following new features:
\nFor more information, visit redux.sync .", - "tooltip": "PTX ISA version 7.0 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-7-0" - }; - - case "reg": - return { - "html": "All the memory instructions take an address operand that specifies the memory location being\naccessed. This addressable operand is one of:
\nFor more information, visit reg .", - "tooltip": "All the memory instructions take an address operand that specifies the memory location being\n\naccessed. This addressable operand is one of:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#addresses-as-operands" - }; - - case "release": - return { - "html": "The membar instruction guarantees that prior memory accesses requested by this thread (ld,\nst, atom and red instructions) are performed at the specified level, before later\nmemory operations requested by this thread following the membar instruction. The level\nqualifier specifies the set of threads that may observe the ordering effect of this operation.
Performs a reduction operation with operand b and the value in location a, and stores the\nresult of the specified operation at location a, overwriting the original value. Operand a\nspecifies a location in the specified state space. If no state space is given, perform the memory\naccesses using Generic Addressing. red with scalar type may\nbe used only with .global and .shared spaces and with generic addressing, where the address\npoints to .global or .shared space. red with vector type may be used only with\n.global space and with generic addressing where the address points to .global space.
red.async is a non-blocking instruction which initiates an asynchronous reduction operation\nspecified by .op, with the operand b and the value at destination shared memory location\nspecified by operand a.
The tensormap.replace instruction replaces the field, specified by .field qualifier,\nof the tensor-map object at the location specified by the address operand addr with a\nnew value. The new value is specified by the argument new_val.
Return execution to caller\u2019s environment. A divergent return suspends threads until all threads are\nready to return to the caller. This allows multiple divergent ret instructions.
Compute 1/sqrt(a) and store the result in d.
PTX ISA version 4.0 introduces the following new features:
\nFor more information, visit rsqrt(fp) , rsqrt.approx(fp) , rsqrt.approx.f64(fp) , rsqrt.approx.ftz.f32(fp) , rsqrt.approx.ftz.f64 , rsqrt.f32(fp) , rsqrt.f64(fp) , rsqrt.ftz.f32(fp) .", + "html": "Compute 1/sqrt(a) and store the result in d.
Compute a double-precision (.f64) approximation of the square root reciprocal of a value. The\nleast significant 32 bits of the double-precision (.f64) destination d are all zeros.
Each matrix can be stored in memory with a row-major or column-major layout. In a row-major\nformat, consecutive elements of each row are stored in contiguous memory locations, and the row is\ncalled the leading dimension of the matrix. In a column-major format, consecutive elements of\neach column are stored in contiguous memory locations and the column is called the leading\ndimension of the matrix.
\nFor more information, visit s .", - "tooltip": "Each matrix can be stored in memory with arow-majororcolumn-majorlayout. In arow-majorformat, consecutive elements of each row are stored in contiguous memory locations, and the row is\n\ncalled theleadi...", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-storage" - }; - case "sad": return { "html": "Adds the absolute value of a-b to c and writes the resulting value into d.
PTX ISA version 5.0 introduces the following new features:
\nFor more information, visit scope .", - "tooltip": "PTX ISA version 5.0 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-5-0" - }; - case "selp": return { - "html": "Conditional selection. If c is True, a is stored in d, b otherwise. Operands\nd, a, and b must be of the same type. Operand c is a predicate.
Conditional selection. If c is True, a is stored in d, b otherwise. Operands\nd, a, and b must be of the same type. Operand c is a predicate.
PTX ISA version 6.5 introduces the following new features:
\nCompares two numeric values and optionally combines the result with another predicate value by\napplying a Boolean operator. If this result is True, 1.0f is written for floating-point\ndestination types, and 0xffffffff is written for integer destination types. Otherwise,\n0x00000000 is written.
Compares two numeric values and optionally combines the result with another predicate value by\napplying a Boolean operator. If this result is True, 1.0f is written for floating-point\ndestination types, and 0xffffffff is written for integer destination types. Otherwise,\n0x00000000 is written.
PTX ISA version 8.0 introduces the following new features:
\nsetmaxnreg provides a hint to the system to update the maximum number of per-thread registers\nowned by the executing warp to the value specified by the imm-reg-count operand.
setmaxnreg provides a hint to the system to update the maximum number of per-thread registers\nowned by the executing warp to the value specified by the imm-reg-count operand.
PTX ISA version 7.8 introduces the following new features:
\nCompares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the first destination operand. A related value computed using\nthe complement of the compare result is written to the second destination operand.
\nFor more information, visit setp , setp.dtype.f32 , setp.dtype.f64 , setp.ftz.dtype.f32 .", - "tooltip": "PTX ISA version 7.8 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-7-8" - }; - - case "shared": - return { - "html": "Convert a const, Kernel Function Parameters\n(.param), global, local, or shared address to a generic address, or vice-versa. The\nsource and destination addresses must be the same size. Use cvt.u32.u64 or cvt.u64.u32 to\ntruncate or zero-extend addresses.
Compares two values and combines the result with another predicate value by applying a Boolean\noperator. This result is written to the first destination operand. A related value computed using\nthe complement of the compare result is written to the second destination operand.
\nFor more information, visit setp .", + "tooltip": "Compares two values and combines the result with another predicate value by applying a Boolean\n\noperator. This result is written to the first destination operand. A related value computed using\n\nthe com...", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#comparison-and-selection-instructions-setp" }; case "shf": return { - "html": "PTX ISA version 3.1 introduces the following new features:
\nShift the 64-bit value formed by concatenating operands a and b left or right by the amount\nspecified by the unsigned 32-bit value in c. Operand b holds bits 63:32 and operand a\nholds bits 31:0 of the 64-bit source value. The source is shifted left or right by the clamped\nor wrapped value in c. For shf.l, the most-significant 32-bits of the result are written\ninto d; for shf.r, the least-significant 32-bits of the result are written into d.
Shift the 64-bit value formed by concatenating operands a and b left or right by the amount\nspecified by the unsigned 32-bit value in c. Operand b holds bits 63:32 and operand a\nholds bits 31:0 of the 64-bit source value. The source is shifted left or right by the clamped\nor wrapped value in c. For shf.l, the most-significant 32-bits of the result are written\ninto d; for shf.r, the least-significant 32-bits of the result are written into d.
PTX ISA version 3.0 introduces the following new features:
\nExchange register data between threads of a warp.
\nFor more information, visit shfl , shfl.sync .", + "html": "Exchange register data between threads of a warp.
\nFor more information, visit shfl , shfl.sync .", "tooltip": "Register data shuffle within threads of a warp.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-3-0" + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-shfl" + }; + + case "shift": + return { + "html": "Instruction tcgen05.shift is an asynchronous instruction which initiates the shifting of 32-byte\nelements downwards across all the rows, except the last, by one row. The address operand taddr\nspecifies the base address of the matrix in the Tensor Memory whose rows must\nbe down shifted.
Shift a right by the amount specified by unsigned 32-bit value in b. Signed shifts fill with\nthe sign bit, unsigned and untyped shifts fill with 0.
Shift a left by the amount specified by unsigned 32-bit value in b.
Find the sine of the angle a (in radians).
Find the sine of the angle a (in radians).
PTX ISA version 9.0 introduces the following new features:
\nFor more information, visit size .", - "tooltip": "PTX ISA version 9.0 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-9-0" - }; - case "slct": return { - "html": "Conditional selection. If c >= 0, a is stored in d, otherwise b is stored in\nd. Operands d, a, and b are treated as a bitsize type of the same width as the first\ninstruction type; operand c must match the second instruction type (.s32 or .f32). The\nselected input is copied to the output without modification.
Conditional selection. If c >= 0, a is stored in d, otherwise b is stored in\nd. Operands d, a, and b are treated as a bitsize type of the same width as the first\ninstruction type; operand c must match the second instruction type (.s32 or .f32). The\nselected input is copied to the output without modification.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
Compute sqrt(a) and store the result in d.
Instruction wgmma.mma_async issues a MxNxK matrix multiply and accumulate operation, D =\nA*B+D, where the A matrix is MxK, the B matrix is KxN, and the D matrix is MxN.
The tensormap.cp_fenceproxy instructions perform the following operations in order :
Compute sqrt(a) and store the result in d.
Store the value of operand b in the location specified by the destination address\noperand a in specified state space. If no state space is given, perform the store using\nGeneric Addressing. Stores to const memory are illegal.
The alloca instruction dynamically allocates memory on the stack frame of the current function\nand updates the stack pointer accordingly. The returned pointer ptr points to local memory and\ncan be used in the address operand of ld.local and st.local instructions.
Store the value of operand b in the location specified by the destination address\noperand a in specified state space. If no state space is given, perform the store using\nGeneric Addressing. Stores to const memory are illegal.
st.async is a non-blocking instruction which initiates an asynchronous store operation that\nstores the value specified by source operand b to the destination memory location\nspecified by operand a.
st.bulk instruction initializes a region of shared memory starting from the location specified\nby destination address operand a.
PTX ISA version 7.3 introduces the following new features:
\nSets the current stack pointer to source register a.
Sets the current stack pointer to source register a.
PTX ISA version 7.3 introduces the following new features:
\nSets the current stack pointer to source register a.
The pending count can be queried from the opaque mbarrier state using mbarrier.pending_count.
Copies the current value of stack pointer into the destination register d. Pointer returned by\nstacksave can be used in a subsequent stackrestore instruction to restore the stack\npointer. If d is modified prior to use in stackrestore instruction, it may corrupt data in\nthe stack.
PTX ISA version 7.8 introduces the following new features:
\nFor more information, visit stmatrix .", - "tooltip": "PTX ISA version 7.8 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-7-8" - }; - - case "stride": - return { - "html": "Collectively store a matrix across all threads in a warp at the location indicated by address\noperand p in the specified state space from source register r.
Collectively store one or more matrices across all threads in a warp to the location indicated by\nthe address operand p, in .shared state space. If no state space is provided, generic\naddressing is used, such that the address in p points into .shared space. If the generic\naddress doesn\u2019t fall in .shared state space, then the behavior is undefined.
Performs subtraction and writes the resulting value into a destination register.
\nPerforms integer subtraction and writes the borrow-out value into the condition code register.
\nConverts input operand a from .atype into .f32 type. The converted value is then\nused for the subtraction. The resulting value is stored in the destination operand d.
Performs subtraction and writes the resulting value into a destination register.
\nPerforms integer subtraction and writes the borrow-out value into the condition code register.
\nFor more information, visit sub(int) , sub.cc .", "tooltip": "Subtract one value from another.", "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#integer-arithmetic-instructions-sub" }; @@ -1300,114 +803,79 @@ import type {AssemblyInstructionInfo} from '../../../types/assembly-docs.interfa case "suld": return { - "html": "This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
suld.b.{1d,2d,3d}
PTX ISA version 3.0 introduces the following new features:
\nFor more information, visit suld , suld.3d , suld.b , suld.b.3d , suld.b.trap , suld.p .", + "html": "suld.b.{1d,2d,3d}
The underlying, stack-based ABI is supported in PTX ISA version 2.1 for sm_2x targets.
Query an attribute of a surface. Operand a is a .surfref variable or a .u64 register.
PTX ISA version 8.1 introduces the following new features:
\nReduction to surface memory using a surface coordinate vector. The instruction performs a reduction\noperation with data from operand c to the surface named by operand a at coordinates given by\noperand b. Operand a is a .surfref variable or .u64 register. Operand b is a\nscalar or singleton tuple for 1d surfaces; is a two-element vector for 2d surfaces; and is a\nfour-element vector for 3d surfaces, where the fourth element is ignored. Coordinate elements are of\ntype .s32.
Reduction to surface memory using a surface coordinate vector. The instruction performs a reduction\noperation with data from operand c to the surface named by operand a at coordinates given by\noperand b. Operand a is a .surfref variable or .u64 register. Operand b is a\nscalar or singleton tuple for 1d surfaces; is a two-element vector for 2d surfaces; and is a\nfour-element vector for 3d surfaces, where the fourth element is ignored. Coordinate elements are of\ntype .s32.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
sust.{1d,2d,3d}
sust.{1d,2d,3d}
The membar instruction guarantees that prior memory accesses requested by this thread (ld,\nst, atom and red instructions) are performed at the specified level, before later\nmemory operations requested by this thread following the membar instruction. The level\nqualifier specifies the set of threads that may observe the ordering effect of this operation.
Exchange register data between threads of a warp.
\nFor more information, visit shfl.sync .", + "tooltip": "Register data shuffle within threads of a warp.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-shfl-sync" }; case "szext": return { - "html": "PTX ISA version 7.6 introduces the following new features:
\nFor more information, visit szext .", - "tooltip": "PTX ISA version 7.6 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-7-6" - }; - - case "t": - return { - "html": "Suspends the thread for a sleep duration approximately close to the delay t, specified in\nnanoseconds. t may be a register or an immediate value.
Instruction tcgen05.shift is an asynchronous instruction which initiates the shifting of 32-byte\nelements downwards across all the rows, except the last, by one row. The address operand taddr\nspecifies the base address of the matrix in the Tensor Memory whose rows must\nbe down shifted.
Sign-extends or zero-extends an N-bit value from operand a where N is specified in operand\nb. The resulting value is stored in the destination operand d.
PTX ISA version 7.0 introduces the following new features:
\nTake hyperbolic tangent value of a.
Take hyperbolic tangent value of a.
PTX ISA version 8.3 introduces the following new features:
\nFor more information, visit tensormap.replace .", - "tooltip": "PTX ISA version 8.3 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-8-3" + "html": "cp.async.bulk.tensor is a non-blocking instruction which initiates an asynchronous copy\noperation of tensor data from the location in .src state space to the location in the .dst\nstate space.
This section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
testp tests common properties of floating-point numbers and returns a predicate value of 1\nif True and 0 if False.
testp tests common properties of floating-point numbers and returns a predicate value of 1\nif True and 0 if False.
PTX ISA version 4.3 introduces the following new features:
\ntex.{1d,2d,3d}
tex.{1d,2d,3d}
The Parallel Thread Execution (PTX) programming model is explicitly parallel: a PTX program\nspecifies the execution of a given thread of a parallel thread array. A cooperative thread array,\nor CTA, is an array of threads that execute a kernel concurrently or in parallel.
\nFor more information, visit tid , tid.x , tid.y , tid.z .", - "tooltip": "TheParallel Thread Execution (PTX)programming model is explicitly parallel: a PTX program\n\nspecifies the execution of a given thread of a parallel thread array. Acooperative thread array,\n\nor CTA, is an...", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#cooperative-thread-arrays" - }; - - case "timestamp": - return { - "html": "Associates a source filename with an integer index. .loc directives reference source files by\nindex.
Index into a list of possible destination labels, and continue execution from the chosen\nlabel. Conditional branches are specified by using a guard predicate.
\nFor more information, visit tlist .", - "tooltip": "Branch to a label indexed from a list of potential branch targets.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#control-flow-instructions-brx-idx" - }; - - case "transpose": - return { - "html": "If the bit Transpose A Matrix / Transpose B Matrix in the\nInstruction descriptor is 0, then K-major is\nused for matrix A / B respectively. If the bit Transpose A Matrix in the\nInstruction descriptor is 1 then M-major is\nused for matrix A. If the bit Transpose B Matrix in the\nInstruction descriptor is 1, then N-major is\nused for matrix B.
Texture fetch of the 4-texel bilerp footprint using a texture coordinate vector. The instruction\nloads the bilerp footprint from the texture named by operand a at coordinates given by operand\nc into vector destination d. The texture component fetched for each texel sample is\nspecified by .comp. The four texel samples are placed into destination vector d in\ncounter-clockwise order starting at lower left.
Instruction clusterlaunchcontrol.query_cancel can be used to decode opaque response\nwritten by instruction clusterlaunchcontrol.try_cancel.
A thread executing mbarrier.expect_tx performs an expect-tx\noperation on the mbarrier object at the location specified by the address operand addr. The\n32-bit unsigned integer operand txCount specifies the expectCount argument to the\nexpect-tx operation.
The underlying, stack-based ABI is supported in PTX ISA version 2.1 for sm_2x targets.
Query an attribute of a texture or sampler. Operand a is either a .texref or .samplerref variable, or a .u64 register.
Query an attribute of a texture or sampler. Operand a is either a .texref or .samplerref variable, or a .u64 register.
Divides a by b, stores result in d.
Perform scalar arithmetic operation with optional saturate, and optional secondary arithmetic operation or subword data merge.
\nFor more information, visit vabsdiff .", - "tooltip": "Integer byte/half-word/word addition/subtraction.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#scalar-video-instructions-vadd-vsub-vabsdiff-vmin-vmax" - }; - - case "vadd": - return { - "html": "Perform scalar arithmetic operation with optional saturate, and optional secondary arithmetic operation or subword data merge.
\nFor more information, visit vadd .", - "tooltip": "Integer byte/half-word/word addition/subtraction.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#scalar-video-instructions-vadd-vsub-vabsdiff-vmin-vmax" - }; - - case "var": - return { - "html": "All the memory instructions take an address operand that specifies the memory location being\naccessed. This addressable operand is one of:
\nFor more information, visit var .", - "tooltip": "All the memory instructions take an address operand that specifies the memory location being\n\naccessed. This addressable operand is one of:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#addresses-as-operands" + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#texture-instructions-txq" }; case "vmad": @@ -1468,23 +908,30 @@ import type {AssemblyInstructionInfo} from '../../../types/assembly-docs.interfa case "vmax": return { - "html": "Perform scalar arithmetic operation with optional saturate, and optional secondary arithmetic operation or subword data merge.
\nFor more information, visit vmax .", + "html": "Perform scalar arithmetic operation with optional saturate, and optional secondary arithmetic operation or subword data merge.
\nFor more information, visit vadd .", "tooltip": "Integer byte/half-word/word addition/subtraction.", "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#scalar-video-instructions-vadd-vsub-vabsdiff-vmin-vmax" }; - case "vmin": + case "vmax2": return { - "html": "Perform scalar arithmetic operation with optional saturate, and optional secondary arithmetic operation or subword data merge.
\nFor more information, visit vmin .", - "tooltip": "Integer byte/half-word/word addition/subtraction.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#scalar-video-instructions-vadd-vsub-vabsdiff-vmin-vmax" + "html": "Two-way SIMD parallel arithmetic operation with secondary operation.
\nFor more information, visit vadd2 .", + "tooltip": "Integer dual half-word SIMD addition/subtraction.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#simd-video-instructions-vadd2-vsub2-vavrg2-vabsdiff2-vmin2-vmax2" + }; + + case "vmax4": + return { + "html": "Four-way SIMD parallel arithmetic operation with secondary operation.
\nFor more information, visit vadd4 .", + "tooltip": "Integer quad byte SIMD addition/subtraction.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#simd-video-instructions-vadd4-vsub4-vavrg4-vabsdiff4-vmin4-vmax4" }; case "vote": return { - "html": "PTX ISA version 4.0 introduces the following new features:
\nThis section describes the floating-point changes in PTX ISA version 2.0 for sm_20 targets. The\ngoal is to achieve IEEE 754 compliance wherever possible, while maximizing backward compatibility\nwith legacy PTX ISA version 1.x code and sm_1x targets.
vote.sync will cause executing thread to wait until all non-exited threads corresponding to\nmembermask have executed vote.sync with the same qualifiers and same membermask value\nbefore resuming execution.
Performs a reduction of the source predicate across all active threads in a warp. The destination\npredicate value is the same across all threads in the warp.
\nvote.sync will cause executing thread to wait until all non-exited threads corresponding to\nmembermask have executed vote.sync with the same qualifiers and same membermask value\nbefore resuming execution.
Semantics
\nFor more information, visit vshl .", - "tooltip": "Integer byte/half-word/word left/right shift.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#scalar-video-instructions-vshl-vshr" + "html": "Two-way SIMD parallel comparison with secondary operation.
\nFor more information, visit vset2 .", + "tooltip": "Integer dual half-word SIMD comparison.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#simd-video-instructions-vset2" + }; + + case "vset4": + return { + "html": "Four-way SIMD parallel comparison with secondary operation.
\nFor more information, visit vset4 .", + "tooltip": "Integer quad byte SIMD comparison.", + "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#simd-video-instructions-vset4" }; case "vshr": return { - "html": "Semantics
\nFor more information, visit vshr .", + "html": "Integer byte/half-word/word left/right shift.
\nFor more information, visit vshl .", "tooltip": "Integer byte/half-word/word left/right shift.", "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#scalar-video-instructions-vshl-vshr" }; - case "vsub": + case "wait": return { - "html": "Perform scalar arithmetic operation with optional saturate, and optional secondary arithmetic operation or subword data merge.
\nFor more information, visit vsub .", - "tooltip": "Integer byte/half-word/word addition/subtraction.", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#scalar-video-instructions-vadd-vsub-vabsdiff-vmin-vmax" + "html": "The test_wait and try_wait operations test for the completion of the current or the immediately\npreceding phase of an mbarrier object at the location specified by the operand addr.
PTX ISA version 8.0 introduces the following new features:
\nwgmma.fence instruction establishes an ordering between prior accesses to any warpgroup\nregisters and subsequent accesses to the same registers by a wgmma.mma_async instruction. Only\nthe accumulator register and the input registers containing the fragments of matrix A require this\nordering.
wgmma.commit_group instruction creates a new wgmma-group per warpgroup and batches all prior\nwgmma.mma_async instructions initiated by the executing warp but not committed to any\nwgmma-group into the new wgmma-group. If there are no uncommitted wgmma.mma_async instructions\nthen wgmma.commit_group results in an empty wgmma-group.
wgmma.fence instruction establishes an ordering between prior accesses to any warpgroup\nregisters and subsequent accesses to the same registers by a wgmma.mma_async instruction. Only\nthe accumulator register and the input registers containing the fragments of matrix A require this\nordering.
Instruction wgmma.mma_async issues a MxNxK matrix multiply and accumulate operation, D =\nA*B+D, where the A matrix is MxK, the B matrix is KxN, and the D matrix is MxN.
wgmma.wait_group instruction will cause the executing thread to wait until only N or fewer of\nthe most recent wgmma-groups are pending and all the prior wgmma-groups committed by the executing\nthreads are complete. For example, when N is 0, the executing thread waits on all the prior\nwgmma-groups to complete. Operand N is an integer constant.
PTX ISA version 6.0 introduces the following new features:
\nPerform a warp-level matrix multiply-and-accumulate computation D = A * B + C using matrices A,\nB and C loaded in registers a, b and c respectively, and store the result matrix in\nregister d. The register arguments a, b, c and d hold unspecified fragments of\nthe corresponding matrices as described in Matrix Fragments for WMMA
PTX ISA version 6.3 introduces the following new features:
\nPTX ISA version 6.4 introduces the following new features:
\nFor more information, visit wmma , wmma.and.popc , wmma.load , wmma.mma , wmma.store , wmma.xor.popc .", - "tooltip": "PTX ISA version 6.0 introduces the following new features:", - "url": "https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#changes-in-ptx-isa-version-6-0" + "html": "Collectively load a matrix across all threads in a warp from the location indicated by address\noperand p in the specified state space into destination register r.
Collectively store a matrix across all threads in a warp at the location indicated by address\noperand p in the specified state space from source register r.
Perform a warp-level matrix multiply-and-accumulate computation D = A * B + C using matrices A,\nB and C loaded in registers a, b and c respectively, and store the result matrix in\nregister d. The register arguments a, b, c and d hold unspecified fragments of\nthe corresponding matrices as described in Matrix Fragments for WMMA
Instruction clusterlaunchcontrol.query_cancel can be used to decode opaque response\nwritten by instruction clusterlaunchcontrol.try_cancel.
Instruction tcgen05.mma.ws is an asynchronous instruction which initiates an MxNxK\nmatrix multiply and accumulate operation,\nD = A*B+D\nwhere the A matrix is MxK, the B matrix is KxN, and the D matrix is MxN.
Instruction clusterlaunchcontrol.query_cancel can be used to decode opaque response\nwritten by instruction clusterlaunchcontrol.try_cancel.
Instruction clusterlaunchcontrol.query_cancel can be used to decode opaque response\nwritten by instruction clusterlaunchcontrol.try_cancel.