TargetInfo#
- class rbc.targetinfo.TargetInfo(*args, **kwargs)#
Holds target device information.
The information within a TargetInfo instance can be accessed only when the instance has been activated as a context manager:
target_info = TargetInfo(<name>) # construct target_info ... with target_info: ''' TargetInfo instance target_info is made available globally and it can be acquired from any Python module function, for example: from rbc.targetinfo import TargetInfo def foo(): ti = TargetInfo() # here `ti` is the same object as `target_info` ''' ... # target_info is now disabled globally and when a Python module # function tries to access it as `TargetInfo()`, a RuntimeError # exception will be raised.
Attributes
Return architecture string of target device.
Return target device address bit-size as int value (32, 64, ...).
Return LLVM datalayout of target device.
Return a comma-separated string of CPU target features.
Return the name of target device.
Return device driver name and version numbers as int tuple. For instance::.
Return compute capabilities (major, minor) of CUDA device target.
Check if target supports Python C/API symbols
Check if target has libdevice (CUDA math library) available
Check if target supports numba symbols
Check if target supports numpy symbols
Return True if the target device is CPU.
Return True if the target device is GPU.
Return target system LLVM versions tuple.
Return the null values for scalar types serialized as integers.
Return remote software name and version number as int tuple.
Return target triple as a string.
Methods
TargetInfo.add_external
(*names)TargetInfo.check_enabled
(desired_devices)Check if target supports desired devices
Returns dummy target info instance.
TargetInfo.fromdict
(data)TargetInfo.fromjson
(data)Return target function name being compiled.
TargetInfo.host
([name, strict])Return target info for host CPU.
TargetInfo.set
(prop, value)Set a target device property to given value.
TargetInfo.set_compile_target
(target_name)Set target function name being compiled.
Return the sizeof(t) value for given target device.
TargetInfo.supports
(name)Return True if the target system defines symbol name.
TargetInfo.update
(data)Update target info using other target info data.