Skip to content

Instantly share code, notes, and snippets.

View Neelam96's full-sized avatar

Neelam Sharma Neelam96

View GitHub Profile
@Neelam96
Neelam96 / Makefile
Created October 3, 2021 12:19
Example makefile for compiling GAP benchmark
INCLUDE_DIRS = -I./src -I/opt/intel/oneapi/vtune/2021.1.1/include
CXX_FLAGS += -g -std=c++11 -O3 -Wall $(INCLUDE_DIRS)
PAR_FLAG = -fopenmp
LDFLAGS = -L/opt/intel/oneapi/vtune/2021.1.1/lib64 -littnotify -ldl
# Changes for Makefile to work
# 1. -ldl flag added: Makefile:26: recipe for target 'bfs' failed
# ERROR that occured: make: *** [bfs] Error 1
# make: *** Waiting for unfinished jobs....
# /usr/bin/ld: /opt/intel/oneapi/vtune/2021.1.1/lib64/libittnotify.a(ittnotify_static.o): undefined reference to symbol 'dlerror@@GLIBC_2.2.5'
@Neelam96
Neelam96 / Creating the Gorder dataset
Created September 16, 2021 13:58
Steps to generate dataset reordered using Gorder
Download links for datasets:
LiveJournal - http://snap.stanford.edu/data/soc-LiveJournal1.html
com-orkut - http://snap.stanford.edu/data/com-Orkut.html
twitter - http://an.kaist.ac.kr/~haewoon/release/twitter_social_graph/twitter_rv.tar.gz
pld_arc - http://data.dws.informatik.uni-mannheim.de/hyperlinkgraph/2012-08/pld-arc.gz
kron - Refer the issue on GAP benchmark for "Generation of kronecker graphs" (Also see the note below)
road - http://www.dis.uniroma1.it/challenge9/data/USA-road-d/USA-road-d.USA.gr.gz
urand - Refer bench.mk inside GAP benchmark original repo by Scott (Also see the note below)
soc-pokec - http://snap.stanford.edu/data/soc-pokec-relationshps.txt.gz
Download links for datasets:
LiveJournal - http://snap.stanford.edu/data/soc-LiveJournal1.html
com-orkut - http://snap.stanford.edu/data/com-Orkut.html
twitter - http://an.kaist.ac.kr/~haewoon/release/twitter_social_graph/twitter_rv.tar.gz
pld_arc - http://data.dws.informatik.uni-mannheim.de/hyperlinkgraph/2012-08/pld-arc.gz
kron - Refer the issue on GAP benchmark for "Generation of kronecker graphs" (Also see the note below)
road - http://www.dis.uniroma1.it/challenge9/data/USA-road-d/USA-road-d.USA.gr.gz
urand - Refer bench.mk inside GAP benchmark original repo by Scott (Also see the note below)
soc-pokec - http://snap.stanford.edu/data/soc-pokec-relationshps.txt.gz
@Neelam96
Neelam96 / cache_cntlr.cc
Created March 8, 2021 14:13
cache_cntlr.cc for DROPLET implementation
#include "cache_cntlr.h"
#include "log.h"
#include "memory_manager.h"
#include "core_manager.h"
#include "simulator.h"
#include "subsecond_time.h"
#include "config.hpp"
#include "fault_injection.h"
#include "hooks_manager.h"
#include "cache_atd.h"
@Neelam96
Neelam96 / toggleHT.sh
Created February 5, 2021 07:51 — forked from samueljon/toggleHT.sh
Disable / Enable HyperThreading cores on runtime - linux
#!/bin/bash
HYPERTHREADING=1
function toggleHyperThreading() {
for CPU in /sys/devices/system/cpu/cpu[0-9]*; do
CPUID=`basename $CPU | cut -b4-`
echo -en "CPU: $CPUID\t"
[ -e $CPU/online ] && echo "1" > $CPU/online
THREAD1=`cat $CPU/topology/thread_siblings_list | cut -f1 -d,`
@Neelam96
Neelam96 / example6.py
Created September 11, 2020 08:03 — forked from kumanna/example6.py
import sys
import os
import random
import matplotlib
# Make sure that we are using QT5
matplotlib.use('Qt5Agg')
from PyQt5 import QtCore, QtWidgets
import numpy as np
import matplotlib
@Neelam96
Neelam96 / grasp_lru.py
Created August 22, 2020 07:41
Basic GRASP policy implementation built on top of LRU
import numpy as np
cache_size=0
cache_empty=True
def refer(addr,hint,dq,dictionary):
print('Want to access addr: ',addr,' with hint: ',hint)
@Neelam96
Neelam96 / get_weights_mtcnn.py
Created August 13, 2020 04:06
Code that I used to extract the weights from .npy file
import numpy as np
#ht width channels filter_nos : provided
#filter_nos channels h w : output
# file_open = open('mtcnn_layer_wise_wts.txt', 'w')
file_rnet_wts = open('mtcnn_rnet_wts.txt','w')
# file_onet_wts = open('mtcnn_onet_wts.txt','w')
def print4d(mat, file_open):
file_open.write("["+str(mat.shape[0])+"]"+"["+str(mat.shape[1])+"]"+"["+str(mat.shape[2])+"]"+"["+str(mat.shape[3])+"]"+" = "+"{")
#include <stdio.h>
#include "platform.h"
#include "xil_printf.h"
#include "xil_io.h"
#include "xparameters.h"
int main()
{
#define H 3
float sum_arr(float* A)
{
//interfaces
#pragma HLS INTERFACE m_axi depth=9 port=A offset=slave
#pragma HLS INTERFACE s_axilite port=return
int i,j;
static float Ain[H*H];