Poplar and PopLibs
AvailableVTypes.h
1// Copyright (c) 2019 Graphcore Ltd. All rights reserved.
2
3#ifndef available_vector_types_h
4#define available_vector_types_h
5// This file may be included by c, c++ or asm files to check on the support
6// for vector and vectorlist types
7
8// SPAN and ONE_PTR are always available. Other types are available
9// on some ipu architectures.
10#if __IPU_ARCH_VERSION__ <= 1
11#define VECTOR_AVAIL_SHORT_SPAN
12#define VECTOR_AVAIL_SCALED_PTR32
13#define VECTOR_AVAIL_SCALED_PTR64
14#define VECTOR_AVAIL_SCALED_PTR128
15#elif (__IPU_ARCH_VERSION__ == 2) || (__IPU_ARCH_VERSION__ == 21)
16#define VECTOR_AVAIL_SHORT_SPAN
17#define VECTOR_AVAIL_SCALED_PTR128
18#endif
19
20// DELTAN_ELEMENTS is available on all architectures. The availability of other
21// types is architecture dependent.
22#if __IPU_ARCH_VERSION__ <= 1
23#ifdef _POPLAR_RT
24#define VECTORLIST_AVAIL_SCALED_PTR32
25#define VECTORLIST_AVAIL_SCALED_PTR64
26#endif
27#define VECTORLIST_AVAIL_DELTAN
28#elif (__IPU_ARCH_VERSION__ == 2) || (__IPU_ARCH_VERSION__ == 21)
29#ifdef _POPLAR_RT
30#define VECTORLIST_AVAIL_SCALED_PTR128
31#endif
32#endif
33
34#endif // available_vector_types_h