TargetInfo
Module
Implements methods for querying the host target info.
alignof
alignof[type: AnyType]() -> Int
Returns the align of (in bytes) of the type.
Parameters:
- type (
AnyType
): The type in question.
Returns:
The alignment of the type in bytes.
bitwidthof
bitwidthof[type: AnyType]() -> Int
Returns the size of (in bits) of the type.
Parameters:
- type (
AnyType
): The type in question.
Returns:
The size of the type in bits.
dtype_alignof
dtype_alignof[type: DType]() -> Int
Returns the align of (in bytes) of the dtype.
Parameters:
- type (
DType
): The DType in question.
Returns:
The alignment of the dtype in bytes.
dtype_bitwidthof
dtype_bitwidthof[type: DType]() -> Int
Returns the size of (in bits) of the dtype.
Parameters:
- type (
DType
): The type in question.
Returns:
The size of the dtype in bits.
dtype_simd_width
dtype_simd_width[type: DType]() -> Int
Returns the vector size of the type on the host system.
Parameters:
- type (
DType
): The DType in question.
Returns:
The vector size of the dtype on the host system.
dtype_sizeof
dtype_sizeof[type: DType]() -> Int
Returns the size of (in bytes) of the dtype.
Parameters:
- type (
DType
): The DType in question.
Returns:
The size of the dtype in bytes.
has_avx
has_avx() -> Bool
Returns True if the host system has AVX, otherwise returns False.
Returns:
True if the host system has AVX, otherwise returns False.
has_avx2
has_avx2() -> Bool
Returns True if the host system has AVX2, otherwise returns False.
Returns:
True if the host system has AVX2, otherwise returns False.
has_avx512f
has_avx512f() -> Bool
Returns True if the host system has AVX512, otherwise returns False.
Returns:
True if the host system has AVX512, otherwise returns False.
has_intel_amx
has_intel_amx() -> Bool
Returns True if the host system has Intel AMX support, otherwise returns False.
Returns:
True if the host system has Intel AMX and False otherwise.
has_neon
has_neon() -> Bool
Returns True if the host system has Neon support, otherwise returns False.
Returns:
True if the host system support the Neon instruction set.
has_sse4
has_sse4() -> Bool
Returns True if the host system has sse4, otherwise returns False.
Returns:
True if the host system has sse4, otherwise returns False.
is_apple_m1
is_apple_m1() -> Bool
Returns True if the host system is an Apple M1 with AMX support, otherwise returns False.
Returns:
True if the host system is an Apple M1 with AMX support and False otherwise.
os_is_linux
os_is_linux() -> Bool
Returns True if the host operating system is Linux.
Returns:
True if the host operating system is Linux and False otherwise.
os_is_macos
os_is_macos() -> Bool
Returns True if the host operating system is macOS.
Returns:
True if the host operating system is macOS and False otherwise.
os_is_windows
os_is_windows() -> Bool
Returns True if the host operating system is Windows.
Returns:
True if the host operating system is Windows and False otherwise.
simd_bit_width
simd_bit_width() -> Int
Returns the vector size (in bits) of the host system.
Returns:
The vector size (in bits) of the host system.
simd_byte_width
simd_byte_width() -> Int
Returns the vector size (in bytes) of the host system.
Returns:
The vector size (in bytes) of the host system.
simd_width
simd_width[type: AnyType]() -> Int
Returns the vector size of the type on the host system.
Parameters:
- type (
AnyType
): The type in question.
Returns:
The vector size of the type on the host system.
sizeof
sizeof[type: AnyType]() -> Int
Returns the size of (in bytes) of the type.
Parameters:
- type (
AnyType
): The type in question.
Returns:
The size of the type in bytes.