pyptx.types¶
This page is generated from source docstrings and public symbols.
PTX scalar type descriptors.
The public API of this module is the set of singleton :class:PtxType
instances such as u32, bf16, f32, and pred.
These type objects are used throughout the DSL:
from pyptx.types import bf16, f32, u32, pred
acc = reg.array(f32, 64)
sA = smem.alloc(bf16, (STAGES, BM, BK))
tid = reg.from_(ptx.special.tid.x(), u32)
p = reg.scalar(pred)
The type singletons are intentionally lightweight. They mostly serve as an explicit bridge between Python code and PTX type spelling.
Public API¶
PtxTypeb8b16b32b64b128u8u16u32u64s8s16s32s64f16f16x2bf16bf16x2tf32f32f64e4m3e5m2predfrom_name
PtxType¶
- Kind:
class
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
<member 'bits' of 'PtxType' objects>
No docstring yet.
name¶
-
Kind:
attribute -
Value:
<member 'name' of 'PtxType' objects>
No docstring yet.
b8¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
8
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'b8'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
b16¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
16
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'b16'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
b32¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
32
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'b32'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
b64¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
64
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'b64'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
b128¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
128
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'b128'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
u8¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
8
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'u8'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
u16¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
16
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'u16'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
u32¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
32
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'u32'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
u64¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
64
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'u64'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
s8¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
8
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
's8'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
s16¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
16
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
's16'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
s32¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
32
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
's32'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
s64¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
64
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
's64'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
f16¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
16
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'f16'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
f16x2¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
32
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'f16x2'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
bf16¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
16
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'bf16'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
bf16x2¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
32
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'bf16x2'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
tf32¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
32
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'tf32'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
f32¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
32
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'f32'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
f64¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
64
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'f64'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
e4m3¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
8
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'e4m3'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
e5m2¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
8
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'e5m2'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
pred¶
-
Kind:
namespace -
Type:
PtxType
A PTX scalar type.
Singleton instances (bf16, f32, etc.) are the public API.
Members¶
ptx¶
- Kind:
property
PTX text form with leading dot: '.f32'.
bits¶
-
Kind:
attribute -
Value:
1
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
name¶
-
Kind:
attribute -
Value:
'pred'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
from_name¶
- Kind:
function
Look up a PtxType by name (with or without leading dot).