-
At first, we tried to use an experimental version of LLVM/Clang (the epi one) which offers vector intrinsics.
-
Issue is that it is going to change heavily, and probably try to adhere to an official standard for risc-v vector intrinsic link - Example of C API for Vector integer arithmetic operations link.
-
Interestingly, the RISC-V GNU/GCC toolchain has a branch focusing on developing riscv intrinsic. This branch respects the api agreed on above, and is going to be merged upstream soon when the risc-v vector extension spec v1.0 is released. link. I have pulled that branch and tried to write some programs -> it works well !
-
Very important question : we have previously decided to use LLVM/Clang over GNU/GCC, it might be interesting to tak
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
extern void sgemm_nn(size_t n, size_t m, size_t k, const int*a, size_t lda, const int*b, size_t ldb, int*c, size_t ldc); | |
int main() | |
{ | |
int sum=0; | |
int matrix1[4][4]= { | |
{3,2,4,4}, |
To cross-compile C code to a RISC-V target, we need to following compiler toolchains :
-
EPI Fork of the LLVM/Clang Toolchain, which is modified to offer experimental support for RISC-V Vector instructions, as well as vector intrinsics which can be directly called in C code.
-
RISC-V GNU Toolchain, which is needed to supplement the missing library/include dependencies in the LLVM/Clang toolchain when cross-compiling.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.text | |
.attribute 4, 16 | |
.attribute 5, "rv64i2p0_m2p0_a2p0_f2p0_d2p0_c2p0" | |
.file "main.c" | |
.globl main # -- Begin function main | |
.p2align 1 | |
.type main,@function | |
main: # @main | |
# %bb.0: | |
addi sp, sp, -160 |
- Progress has been made on porting tests from the MLPerf Inference Benchmark suite to C++.
- I did not start working on the gem5 model yet. I plan to do so over the remainder of the winter break.
Research :
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SETLOCAL | |
title OrganizeByExtension.bat | |
echo --------------------------------------------------------------------------- | |
echo Script : OrganizeByExtension.bat | |
echo Description : Organize files into different folders based on their extension | |
echo Note : Does not affect files in subdirectories | |
echo --------------------------------------------------------------------------- | |
for /f "tokens=* delims=" %%f in ('dir /b /a-d') do ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SETLOCAL | |
title BatchRename.bat | |
echo ---------------------------------------------------------------------------------------- | |
echo Script : BatchRename.bat | |
echo Description : Rename all files in directory using user-defined prefix. | |
echo Note : Entering certain characters in the prefix will cause errors (/,\,:,^?,^",^<,^>,^|) | |
echo ---------------------------------------------------------------------------------------- | |
Official Raspberry-Pi Enclosure :
Reference : https://www.raspberrypi.org/products/raspberry-pi-3-case/
NewerOlder