6. Compatibility#

To achieve the goal of stable and portable PISA, each PISA module starts with a header that defines the version of the PISA specification and target architecture that the module is intended for. This information is used by the PISA consumer to ensure that modules are compatible with each other and with the actual GPU target, and to enforce constraints on the usage of features and instructions.

6.1. Directives#

6.1.1. Version#

The .version directive specifies the version of the PISA specification used by the module and must be the first statement in a PISA module. The version is composed of major and minor values, with the following characteristics:

  • changes in major version indicate incompatible changes to the specification

  • changes in minor version indicate backward-compatible additions.

.version 0.1;

Warning

  • It is a compile-time error if an unknown .version value is specified.

  • It is a link-time error if multiple modules specify different major values.

6.1.2. Target#

The .target directive specifies the target architecture for which the module is intended and must be the second statement in a PISA module. The target architecture value is used to determine the set of supported features and instructions required to execute the module.

.target 100;

Warning

  • It is a compile-time error if an unknown .target value is specified.

  • It is a link-time error if multiple modules specify incompatible .target values.

  • It is an error to use features or instructions not supported by the specified .target value.

6.2. Layer Model#

Each PISA target architecture defines a set of supported features and instructions. Newer architectures may add features or instructions and may extend existing ones. A PISA program remains compatible with a newer architecture as long as it uses features and instructions still supported on the newer target.

Each PISA instruction in the instruction set is annotated with the minimum PISA version and target architecture required to use it. Each PISA feature is similarly annotated in its definition. The PISA producer may use this information when generating the .target directive in the module header.

The following naming convention is used for PISA target:

  • a number indicating generation (e.g. 100)

    • backward compatible with all previous generations

  • an optional letter indicating product line (e.g. ‘c’ for compute)

    • backward compatible with product line on current and previous generations

  • an optional letter ‘a’ indicating presence of target-specific features

    • not backward compatible with any other target

PISA Compatibility Matrix#

PISA .target

Can execute PISA instructions and features from

100

100

100c

100c, 100

100ca

100ca, 100c, 100