mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-07-16 17:26:58 -04:00
SFPI C++ is Tenstorrent’s C++ environment for writing custom SFPU/Tensix kernel code with the `riscv-tt-elf-g++` toolchain. infra PRs: - [compiler-explorer/infra#2164](https://github.com/compiler-explorer/infra/pull/2164) - [compiler-explorer/infra#2183](https://github.com/compiler-explorer/infra/pull/2183) Things this PR adds: - General support for SFPI C++ - A dedicated SFPI compiler implementation - SFPI config for local and Amazon-style `/opt/compiler-explorer` installs - An SFPI example - Ability to compile for specific machines with mcpu flag Things not implemented: - Program execution - Binary output support Links: - Source code: https://github.com/tenstorrent/sfpi - Tenstorrent: https://tenstorrent.com/
14 lines
301 B
C++
14 lines
301 B
C++
// Required for standalone CE SFPI examples; it provides the firmware-side compat definitions.
|
|
#include "ce_sfpi_compat.h"
|
|
|
|
#include "sfpi.h"
|
|
|
|
using namespace sfpi;
|
|
|
|
extern "C" void sfpi_demo() {
|
|
vFloat a = dst_reg[0];
|
|
vFloat b = dst_reg[1];
|
|
dst_reg[2] = a * b + 1.0f;
|
|
dst_reg += 1;
|
|
}
|