XeTLA v0.3.6
IntelĀ® Xe Templates for Linear Algebra - API Definition Document
 
Loading...
Searching...
No Matches
common.hpp File Reference

C++ API. More...

#include <CL/sycl.hpp>
#include <ext/intel/esimd.hpp>
Include dependency graph for common.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gpu::xetla::xetla_saturation_on_tag
 
class  gpu::xetla::xetla_saturation_off_tag
 

Namespaces

namespace  gpu
 
namespace  gpu::xetla
 

Macros

#define KERNEL_MAIN   SYCL_ESIMD_KERNEL
 KERNEL_MAIN macro.
 
#define KERNEL_FUNC   SYCL_ESIMD_FUNCTION
 KERNEL_FUNC macro.
 
#define __XETLA_API   inline
 
#define __ESIMD_ENS   sycl::ext::intel::experimental::esimd
 
#define __ESIMD_NS   sycl::ext::intel::esimd
 
#define XETLA_MARKER(message)   [[deprecated(message)]]
 
#define XETLA_WARNING(msg)   __SYCL_WARNING(msg)
 
#define SW_BARRIER()   __ESIMD_NS::fence<__ESIMD_NS::fence_mask::sw_barrier>()
 SW_BARRIER, insert software scheduling barrier, for better code control.
 

Typedefs

template<class T >
using remove_const_t = typename std::remove_const< T >::type
 
template<typename T >
using gpu::xetla::is_xetla_scalar = typename __ESIMD_DNS::is_esimd_scalar< T >
 

Enumerations

enum class  gpu::xetla::gpu_arch : uint8_t { gpu::xetla::Xe = 0 }
 
enum class  gpu::xetla::grf_mode : uint8_t { gpu::xetla::normal = 0 , gpu::xetla::double_grf = 1 }
 
enum class  gpu::xetla::mem_layout : uint8_t { gpu::xetla::row_major = 0 , gpu::xetla::col_major = 1 }
 
enum class  gpu::xetla::mem_space : uint8_t { gpu::xetla::global = 0 , gpu::xetla::local = 1 }
 
enum class  gpu::xetla::msg_type : uint8_t {
  gpu::xetla::block_2d = 0 , gpu::xetla::block_1d = 1 , gpu::xetla::scatter = 2 , gpu::xetla::atomic_add = 3 ,
  gpu::xetla::unaligned_2d = 4
}
 
enum class  gpu::xetla::cache_hint : uint8_t {
  gpu::xetla::none = 0 , gpu::xetla::uncached = 1 , gpu::xetla::cached = 2 , gpu::xetla::write_back = 3 ,
  gpu::xetla::write_through = 4 , gpu::xetla::streaming = 5 , gpu::xetla::read_invalidate = 6
}
 L1 or L2 cache hint kinds. More...
 
enum class  gpu::xetla::data_size : uint8_t {
  gpu::xetla::default_size = 0 , gpu::xetla::u8 = 1 , gpu::xetla::u16 = 2 , gpu::xetla::u32 = 3 ,
  gpu::xetla::u64 = 4 , gpu::xetla::u8u32 = 5 , gpu::xetla::u16u32 = 6 , gpu::xetla::u16u32h = 7
}
 Data size or format to read or store. More...
 
enum class  gpu::xetla::memory_kind : uint8_t { gpu::xetla::untyped_global = 0 , gpu::xetla::untyped_global_low_pri = 1 , gpu::xetla::typed_global = 2 , gpu::xetla::shared_local = 3 }
 The specific LSC shared function to fence with xetla_fence. More...
 
enum class  gpu::xetla::fence_op : uint8_t {
  gpu::xetla::none = 0 , gpu::xetla::evict = 1 , gpu::xetla::invalidate = 2 , gpu::xetla::discard = 3 ,
  gpu::xetla::clean = 4 , gpu::xetla::flushl2 = 5
}
 The xetla_fence operation to apply to caches. More...
 
enum class  gpu::xetla::fence_scope : uint8_t {
  gpu::xetla::group = 0 , gpu::xetla::local = 1 , gpu::xetla::tile = 2 , gpu::xetla::gpu = 3 ,
  gpu::xetla::gpus = 4 , gpu::xetla::system = 5 , gpu::xetla::sysacq = 6
}
 The scope that xetla_fence operation should apply to. More...
 
enum class  gpu::xetla::atomic_op : uint8_t {
  gpu::xetla::iinc = 0x0 , gpu::xetla::idec = 0x1 , gpu::xetla::iadd = 0x2 , gpu::xetla::isub = 0x3 ,
  gpu::xetla::smin = 0x4 , gpu::xetla::smax = 0x5 , gpu::xetla::cmpxchg = 0x6 , gpu::xetla::fadd = 0x7 ,
  gpu::xetla::fsub = 0x8 , gpu::xetla::fmin = 0x9 , gpu::xetla::fmax = 0xa , gpu::xetla::fcmpxchg = 0xb ,
  gpu::xetla::umin = 0xc , gpu::xetla::umax = 0xd , gpu::xetla::bit_and = 0xe , gpu::xetla::bit_or = 0xf ,
  gpu::xetla::bit_xor = 0x10 , gpu::xetla::load = 0x11 , gpu::xetla::store = 0x12
}
 Represents an atomic operation. More...
 
enum class  gpu::xetla::argument_type : uint8_t {
  gpu::xetla::U1 = 0 , gpu::xetla::S1 = 1 , gpu::xetla::U2 = 2 , gpu::xetla::S2 = 3 ,
  gpu::xetla::U4 = 4 , gpu::xetla::S4 = 5 , gpu::xetla::U8 = 6 , gpu::xetla::S8 = 7 ,
  gpu::xetla::BF16 = 8 , gpu::xetla::FP16 = 9 , gpu::xetla::TF32 = 12 , gpu::xetla::DF = 13 ,
  gpu::xetla::NUM_ARG_TYPES = 14
}
 xetla dpas argument typ More...
 
enum class  gpu::xetla::reduce_op : uint8_t { gpu::xetla::sum = 0 , gpu::xetla::prod = 1 , gpu::xetla::min = 2 , gpu::xetla::max = 3 }
 xetla reduce op More...
 

Functions

template<auto val>
constexpr void XETLA_PRINT ()
 
int32_t xetla_get_hw_thread_id ()
 
int32_t xetla_get_subdevice_id ()
 
void gpu::xetla::xetla_wait (uint16_t val)
 

Detailed Description

C++ API.

Macro Definition Documentation

◆ __ESIMD_ENS

#define __ESIMD_ENS   sycl::ext::intel::experimental::esimd

◆ __ESIMD_NS

#define __ESIMD_NS   sycl::ext::intel::esimd

◆ __XETLA_API

#define __XETLA_API   inline

◆ SW_BARRIER

#define SW_BARRIER ( )    __ESIMD_NS::fence<__ESIMD_NS::fence_mask::sw_barrier>()

SW_BARRIER, insert software scheduling barrier, for better code control.

◆ XETLA_MARKER

#define XETLA_MARKER (   message)    [[deprecated(message)]]

◆ XETLA_WARNING

#define XETLA_WARNING (   msg)    __SYCL_WARNING(msg)

Typedef Documentation

◆ remove_const_t

template<class T >
using remove_const_t = typename std::remove_const<T>::type

Function Documentation

◆ xetla_get_hw_thread_id()

int32_t xetla_get_hw_thread_id ( )
inline

◆ xetla_get_subdevice_id()

int32_t xetla_get_subdevice_id ( )
inline

◆ XETLA_PRINT()

template<auto val>
constexpr void XETLA_PRINT ( )
inlineconstexpr