-
GPU Boost https://devblogs.nvidia.com/parallelforall/increase-performance-gpu-boost-k80-autoboost/
-
Avoid non-coalesced memory access (stage data in shared memory)
-
Reduce register pressure using nvcc : –maxrregcount=N
-
Non-caching load using nvcc: –Xptxas –dlcm=cg
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
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
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
#!/bin/bash | |
if [ -f /tmp/user_log ]; then | |
rm -rf /tmp/user_log | |
fi | |
touch /tmp/user_log | |
for user in `ls /home`; do | |
link=/home/$user |
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
# http://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsClassifier.html | |
from sklearn.neighbors import KNeighborsClassifier | |
# We could use knn to select the best kernel configuration from the kernel pool (training kernels) | |
# the input X are metrics from the training kernels | |
X= [[0.841509434,0.699166,0.845695,0,0.1,0.156,0.967049], | |
[0.749356223,1.611461,0.736916,0,0.2,0.3741,2.693249], | |
[0.263510732,0.433383,0.130578,0,0.05,0.0897,0.451053], |
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
#!/bin/bash | |
cd apps | |
for currDir in * | |
do | |
#echo $currDir | |
if [ -d $currDir ]; then | |
# check whether it is the targeted folder | |
if [ "$currDir" != "bfs" ] && \ | |
[ "$currDir" != "pta" ] && \ |
make sure you are at your master branch
git remote add upstream https://github.com/fangq/mcxcl.git
git fetch upstream && git pull upstream master
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
// float->half variants. | |
// by Fabian "ryg" Giesen. | |
// | |
// I hereby place this code in the public domain, as per the terms of the | |
// CC0 license: | |
// | |
// https://creativecommons.org/publicdomain/zero/1.0/ | |
// | |
// float_to_half_full: This is basically the ISPC stdlib code, except | |
// I preserve the sign of NaNs (any good reason not to?) |
ps aux | grep rCUDA | tee -a rcuda_ps
pids=`awk -F " " '{print $2}' rcuda_ps`
for i in "${pids[@]}"; do kill -9 $i; done
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
import socket | |
if __name__ == "__main__": | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
sock.connect(("localhost", 9000)) | |
data = "some data" | |
sock.sendall(data) | |
result = sock.recv(1024) | |
print result | |
sock.close() |
OlderNewer