Meaning of the outlined code written in C?
I am currently building an understanding around PyTorch and I have come across few codes written in C language. Since I am not that familiar with C conventions, could anyone elaborate what does this code mean?
typedef float float4 __attribute__((ext_vector_type(4)));
typedef float float8 __attribute__((ext_vector_type(8)));
#define LoadFloat8(PTR) *((const float8 *)(PTR))

The code is taken from here

GNU GCC Vector extensions
the instruction set contains SIMD vector instructions which operate on multiple values contained in one large register at the same time.
for using these extensions we need to provide the necessary data types (like your example). This should be done using an appropriate typedef, for example:
typedef int v4si __attribute__ ((vector_size (16)));

The int type specifies the base type, while the attribute specifies the vector size for the variable, measured in bytes. the declaration above causes the compiler to set the mode for the v4si type to be 16 bytes wide and divided into int sized units. For a 32-bit int this means a vector of 4 units of 4 bytes, and the corresponding mode of foo is V4SI.
int the first typedef in your example it is a way to let the compiler know you only care about the value of the first 4 elements of a 4 element SIMD register. So compiler can  do optimizations that leave different garbage in the high elements/Bytes when manipulating this data type.
keep reading in the link below:
 Using Vector Instructions through Built-in Functions
