Skip to content

Instantly share code, notes, and snippets.


Hadi Sandid hsandid

View GitHub Profile
hsandid / main.c
Last active January 20, 2021 11:18
View main.c
#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]= {

Progress on the software side :

  • 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


Cross-Compilation Tutorial : C to RISC-V (+ Vector Extension)

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.

Installation Instructions

View main.s
.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

Arrow FYP - Update on Software Component

General Update

  • 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.

Porting ML Inference Algorithms from Python to C++.

Research :

View OrganizeByExtension.bat
@echo off
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 (
View BatchRename.bat
@echo off
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 ----------------------------------------------------------------------------------------

List of LAN Games

Cool (Accessible & Fun)

  • Flatout 2, Downloaded - Cracked
  • Altitude, Downloaded - Steam
  • Worms Armageddon, Downloaded - Cracked
  • Risk II, Downloaded - Cracked
  • Minecraft, Downloaded - Cracked
  • Terraria, Downloaded - Cracked

Internship Meeting, Week #2 (June 23)

  • Work Completed this week :

    • Added map interface to the S.I.C. web interface. Found here.
    • Added registration process to the S.I.C. web interface. Found here.
    • Set-up a web server on the Raspberry-Pi board, using Apache.

Smart Irrigation Controller - Web Interface