Skip to content

Instantly share code, notes, and snippets.

View alokprasad's full-sized avatar
🏠
Working from home

Alok Prasad alokprasad

🏠
Working from home
View GitHub Profile
@alokprasad
alokprasad / RDMA Cheat Sheet
Created February 13, 2020 08:45 — forked from githubfoam/RDMA Cheat Sheet
RDMA Cheat Sheet
RDMA verification
This work assumes there are two nodes to run iscsi target/initiator environment.
--------------------------------------------------------------------------------------------------------
Load the RDMA drivers using the following command line
/etc/init.d/openibd start
If one is using the InfiniBand transport and he doesn't have a managed switch in the subnet, he has to start the Subnet Manager (SM). Doing this in one of the machines in the subnet is enough, this can be done with the following command line
/etc/init.d/opensmd start
--------------------------------------------------------------------------------------------------------
Verify that traffic is working
/* Copyright (c) 2017 Mozilla */
/* Copyright (c) 2017 Jan Weiß */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
@alokprasad
alokprasad / tensorflow-misc
Created July 19, 2019 08:18
tensorflow-misc related notes
Optimization For Android Platform
=================================
best way is to add only the code that you use in the actual model.
1.python tensorflow/python/tools/print_selective_registration_header.py --graphs="xxx.pb" > ops_to_register.h"
ops_to_register.h -> Recompile the code by inserting the generated header.
cp ops_to_register.h tensorflow/core/framework/
When you build a bazel --copts=-DSELECTIVE_REGISTRATION added
@alokprasad
alokprasad / build-tensorflow-from-source.md
Created June 4, 2019 12:21 — forked from Brainiarc7/build-tensorflow-from-source.md
Build Tensorflow from source, for better performance on Ubuntu.

Building Tensorflow from source on Ubuntu 16.04LTS for maximum performance:

TensorFlow is now distributed under an Apache v2 open source license on GitHub.

On Ubuntu 16.04LTS+:

Step 1. Install NVIDIA CUDA:

To use TensorFlow with NVIDIA GPUs, the first step is to install the CUDA Toolkit as shown:

@alokprasad
alokprasad / git_cheat-sheet.md
Created April 16, 2019 00:35 — forked from davfre/git_cheat-sheet.md
git commandline cheat-sheet
@alokprasad
alokprasad / resampler.c
Created April 11, 2019 17:15 — forked from ExternPointer/resampler.c
Simply audio resampler, which allow to work in realtime (resample stream)
/*
* File format: raw, PCM s16le
* Resample 44100 Hz ./audio.raw to 16000 Hz ./audio_resampled.raw:
* gcc -g resampler.c -o resampler
* ./resampler
*/
#include <stdlib.h>
#include <stdio.h>
#include <memory.h>
1. Execute make first. This will result in a netlinkKernel.ko output among many others.
2. Execute $ gcc netlinkUser.c -o netlinkUser
3. Insert kernel module by :$ sudo insmod netlinkKernel.ko
4. Run ./netlinkUser to see message and run dmesg to see debug messages
5. Remove module by : $ sudo rmmod netlinkKernel
6. Finally make clean to remove output files.