Home > Articles > Programming

This chapter is from the book

8.7. Instruction Sets

NVIDIA has developed three major architectures: Tesla (SM 1.x), Fermi (SM 2.x), and Kepler (SM 3.x). Within those families, new instructions have been added as NVIDIA updated their products. For example, global atomic operations were not present in the very first Tesla-class processor (the G80, which shipped in 2006 as the GeForce GTX 8800), but all subsequent Tesla-class GPUs included them. So when querying the SM version via cuDeviceComputeCapability(), the major and minor versions will be 1.0 for G80 and 1.1 (or greater) for all other Tesla-class GPUs. Conversely, if the SM version is 1.1 or greater, the application can use global atomics.

Table 8.16 gives the SASS instructions that may be printed by cuobjdump when disassembling microcode for Tesla-class (SM 1.x) hardware. The Fermi and Kepler instruction sets closely resemble each other, with the exception of the instructions that support surface load/store, so their instruction sets are given together in Table 8.17. In both tables, the middle column specifies the first SM version to support a given instruction.

Table 8.16 SM 1.x Instruction Set

OPCODE

SM

DESCRIPTION

FLOATING POINT

COS

1.0

Cosine

DADD

1.3

Double-precision floating-point add

DFMA

1.3

Double-precision floating-point fused multiply-add

DMAX

1.3

Double-precision floating-point maximum

DMIN

1.3

Double-precision floating-point minimum

DMUL

1.3

Double-precision floating-point multiply

DSET

1.3

Double-precision floating-point condition set

EX2

1.0

Exponential (base 2)

FADD/FADD32/FADD32I

1.0

Single-precision floating-point add

FCMP

1.0

Single-precision floating-point compare

FMAD/FMAD32/FMAD32I

1.0

Single-precision floating-point multiply-add

FMAX

1.0

Single-precision floating-point maximum

FMIN

1.0

Single-precision floating-point minimum

FMUL/FMUL32/FMUL32I

1.0

Single-precision floating-point multiply

FSET

1.0

Single-precision floating-point conditional set

LG2

1.0

Single-precision floating-point logarithm (base 2)

RCP

1.0

Single-precision floating-point reciprocal

RRO

1.0

Range reduction operator (used before SIN/COS)

RSQ

1.0

Reciprocal square root

SIN

1.0

Sine

FLOW CONTROL

BAR

1.0

Barrier synchronization/ __syncthreads()

BRA

1.0

Conditional branch

BRK

1.0

Conditional break from loop

BRX

1.0

Fetch an address from constant memory and branch to it

C2R

1.0

Condition code to data register

CAL

1.0

Unconditional subroutine call

RET

1.0

Conditional return from subroutine

SSY

1.0

Set synchronization point; used before potentially divergent instructions

DATA CONVERSION

F2F

1.0

Copy floating-point value with conversion to floating point

F2I

1.0

Copy floating-point value with conversion to integer

I2F

1.0

Copy integer value to floating-point with conversion

I2I

1.0

Copy integer value to integer with conversion

INTEGER

IADD/ IADD32/ IADD32I

1.0

Integer addition

IMAD/ IMAD32/ IMAD32I

1.0

Integer multiply-add

IMAX

1.0

Integer maximum

IMIN

1.0

Integer minimum

IMUL/ IMUL32/ IMUL32I

1.0

Integer multiply

ISAD/ ISAD32

1.0

Integer sum of absolute difference

ISET

1.0

Integer conditional set

SHL

1.0

Shift left

SHR

1.0

Shift right

MEMORY OPERATIONS

A2R

1.0

Move address register to data register

ADA

1.0

Add immediate to address register

G2R

1.0

Move from shared memory to register. The .LCK suffix, used to implement shared memory atomics, causes the bank to be locked until an R2G.UNL has been performed.

GATOM.IADD/ EXCH/ CAS/IMIN/ IMAX/ INC/ DEC/IAND/ IOR/ IXOR

1.2

Global memory atomic operations; performs an atomic operation and returns the original value.

GLD

1.0

Load from global memory

GRED.IADD/ IMIN/ IMAX/INC/ DEC/ IAND/ IOR/ IXOR

1.2

Global memory reduction operations; performs an atomic operation with no return value.

GST

1.0

Store to global memory

LLD

1.0

Load from local memory

LST

1.0

Store to local memory

LOP

1.0

Logical operation (AND/OR/XOR)

MOV/MOV32

1.0

Move source to destination

MVC

1.0

Move from constant memory

MVI

1.0

Move immediate

R2A

1.0

Move register to address register

R2C

1.0

Move data register to condition code

R2G

1.0

Store to shared memory. When used with the .UNL suffix,releases a previously held lock on that shared memory bank.

MISCELLANEOUS

NOP

1.0

No operation

TEX/ TEX32

1.0

Texture fetch

VOTE

1.2

Warp-vote primitive.

S2R

1.0

Move special register (e.g., thread ID) to register

Table 8.17 SM 2.x and SM 3.x Instruction Sets

OPCODE

SM

DESCRIPTION

FLOATING POINT

DADD

2.0

Double-precision add

DMUL

2.0

Double-precision multiply

DMNMX

2.0

Double-precision minimum/maximum

DSET

2.0

Double-precision set

DSETP

2.0

Double-precision predicate

DFMA

2.0

Double-precision fused multiply-add

FFMA

2.0

Single-precision fused multiply-add

FADD

2.0

Single-precision floating-point add

FCMP

2.0

Single-precision floating-point compare

FMUL

2.0

Single-precision floating-point multiply

FMNMX

2.0

Single-precision floating-point minimum/maximum

FSWZ

2.0

Single-precision floating-point swizzle

FSET

2.0

Single-precision floating-point set

FSETP

2.0

Single-precision floating-point set predicate

MUFU

2.0

MultiFunk (SFU) operator

RRO

2.0

Range reduction operator (used before MUFU sin/cos)

INTEGER

BFE

2.0

Bit field extract

BFI

2.0

Bit field insert

FLO

2.0

Find leading one

IADD

2.0

Integer add

ICMP

2.0

Integer compare and select

IMAD

2.0

Integer multiply-add

IMNMX

2.0

Integer minimum/maximum

IMUL

2.0

Integer multiply

ISAD

2.0

Integer sum of absolute differences

ISCADD

2.0

Integer add with scale

ISET

2.0

Integer set

ISETP

2.0

Integer set predicate

LOP

2.0

Logical operation (AND/OR/XOR)

SHF

3.5

Funnel shift

SHL

2.0

Shift left

SHR

2.0

Shift right

POPC

2.0

Population count

DATA CONVERSION

F2F

2.0

Floating point to floating point

F2I

2.0

Floating point to integer

I2F

2.0

Integer to floating point

I2I

2.0

Integer to integer

SCALARVIDEO

VABSDIFF

2.0

Scalar video absolute difference

VADD

2.0

Scalar video add

VMAD

2.0

Scalar video multiply-add

VMAX

2.0

Scalar video maximum

VMIN

2.0

Scalar video minimum

VSET

2.0

Scalar video set

VSHL

2.0

Scalar video shift left

VSHR

2.0

Scalar video shift right

VSUB

2.0

Scalar video subtract

VECTOR(SIMD) VIDEO

VABSDIFF2(4)

3.0

Vector video 2x16-bit (4x8-bit) absolute difference

VADD2(4)

3.0

Vector video 2x16-bit (4x8-bit) addition

VAVRG2(4)

3.0

Vector video 2x16-bit (4x8-bit) average

VMAX2(4)

3.0

Vector video 2x16-bit (4x8-bit) maximum

VMIN2(4)

3.0

Vector video 2x16-bit (4x8-bit) minimum

VSET2(4)

3.0

Vector video 2x16-bit (4x8-bit) set

VSUB2(4)

3.0

Vector video 2x16-bit (4x8-bit) subtraction

DATA MOVEMENT

MOV

2.0

Move

PRMT

2.0

Permute

SEL

2.0

Select (conditional move)

SHFL

3.0

Warp shuffle

PREDICATE/CONDITION CODES

CSET

2.0

Condition code set

CSETP

2.0

Condition code set predicate

P2R

2.0

Predicate to register

R2P

2.0

Register to predicate

PSET

2.0

Predicate set

PSETP

2.0

Predicate set predicate

TEXTURE

TEX

2.0

Texture fetch

TLD

2.0

Texture load

TLD4

2.0

Texture load 4 texels

TXQ

2.0

Texture query

MEMORY OPERATIONS

ATOM

2.0

Atomic memory operation

CCTL

2.0

Cache control

CCTLL

2.0

Cache control (local)

LD

2.0

Load from memory

LDC

2.0

Load constant

LDG

3.5

Noncoherence global load (reads via texture cache)

LDL

2.0

Load from local memory

LDLK

2.0

Load and lock

LDS

2.0

Load from shared memory

LDSLK

2.0

Load from shared memory and lock

LDU

2.0

Load uniform

LD_LDU

2.0

Combines generic load LD with a load uniform LDU

LDS_LDU

2.0

Combines shared memory load LDS with a load uniform LDU

MEMBAR

2.0

Memory barrier

RED

2.0

Atomic memory reduction operation

ST

2.0

Store to memory

STL

2.0

Store to local memory

STUL

2.0

Store and unlock

STS

2.0

Store to shared memory

STSUL

2.0

Store to shared memory and unlock

SURFACE MEMORY (FERMI)

SULD

2.0

Surface load

SULEA

2.0

Surface load effective address

SUQ

2.0

Surface query

SURED

2.0

Surface reduction

SUST

2.0

Surface store

SURFACE MEMORY (KEPLER)

SUBFM

3.0

Surface bit field merge

SUCLAMP

3.0

Surface clamp

SUEAU

3.0

Surface effective address

SULDGA

3.0

Surface load generic address

SUSTGA

3.0

Surface store generic address

FLOW CONTROL

BRA

2.0

Branch to relative address

BPT

2.0

Breakpoint/trap

BRK

2.0

Break from loop

BRX

2.0

Branch to relative indexed address

CAL

2.0

Call to relative address

CONT

2.0

Continue in loop

EXIT

2.0

Exit program

JCAL

2.0

Call to absolute address

JMP

2.0

Jump to absolute address

JMX

2.0

Jump to absolute indexed address

LONGJMP

2.0

Long jump

PBK

2.0

Pre?break relative address

PCNT

2.0

Pre?continue relative address

PLONGJMP

2.0

Pre?long jump relative address

PRET

2.0

Pre?return relative address

RET

2.0

Return from call

SSY

2.0

Set synchronization point; used before potentially divergent instructions

MISCELLANEOUS

B2R

2.0

Barrier to register

BAR

2.0

Barrier synchronization

LEPC

2.0

Load effective program counter

NOP

2.0

No operation

S2R

2.0

Special register to register (used to read, for example, the thread or block ID)

VOTE

2.0

Query condition across warp

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020