This file contains hidden or 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 <assert.h> | |
| #include <thrust/host_vector.h> | |
| #include <thrust/device_vector.h> | |
| #include <algorithm> | |
| #include <iostream> | |
| #include <limits> | |
| #include <cmath> | |
| #include <utility> |
This file contains hidden or 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 <assert.h> | |
| #include <thrust/host_vector.h> | |
| #include <thrust/device_vector.h> | |
| #include <algorithm> | |
| #include <iostream> | |
| #include <limits> | |
| #include <cmath> | |
| #include <utility> |
This file contains hidden or 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 scipy | |
| from scipy import fftpack | |
| from scipy import signal | |
| from scipy.io import wavfile | |
| import matplotlib.pyplot as plt | |
| def add_eps(x): | |
| x[scipy.where(x == 0)] = scipy.finfo(dtype=x.dtype).eps | |
| return x |
This file contains hidden or 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
| """ | |
| PTB RNNLM model | |
| according to tf: https://www.tensorflow.org/tutorials/recurrent#run_the_code | |
| perplexity 120 is nice. 80 is great. | |
| """ | |
| from functools import partial | |
| import torch | |
| import torch.nn as nn |
This file contains hidden or 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
| from collections import namedtuple | |
| def value(*fields): | |
| def wrapper(class_): | |
| name = class_.__name__ | |
| t = namedtuple(name, fields) | |
| return type(name, (class_, t), {}) | |
| return wrapper |
This file contains hidden or 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
| ;; -*- mode: emacs-lisp -*- | |
| ;; This file is loaded by Spacemacs at startup. | |
| ;; It must be stored in your home directory. | |
| (defun dotspacemacs/layers () | |
| "Configuration Layers declaration. | |
| You should not put any user code in this function besides modifying the variable | |
| values." | |
| (setq-default | |
| ;; Base distribution to use. This is a layer contained in the directory |
This file contains hidden or 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 "share/atspre_define.hats" | |
| #include "share/atspre_staload.hats" | |
| (* README | |
| original : | |
| https://github.com/smistad/OpenCL-Getting-Started | |
| compile with CUDA devices: | |
| patscc -o test ./opencl_test.dats -L/usr/local/cuda/lib64 -lOpenCL |
This file contains hidden or 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
| $ nvcc ./stream_test.cu -o ./stream_legacy | |
| $ nvvp ./stream_legacy |
This file contains hidden or 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 <future> | |
| #include <thread> | |
| #include <map> | |
| #include <vector> | |
| #include <stdio.h> | |
| const int N = 1 << 20; | |
| __global__ void kernel(float *x, int n) | |
| { |
This file contains hidden or 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
| #------------------------------------------------------------------------------- | |
| # Template configuration for compiling mxnet | |
| # | |
| # If you want to change the configuration, please use the following | |
| # steps. Assume you are on the root directory of mxnet. First copy the this | |
| # file so that any local changes will be ignored by git | |
| # | |
| # $ cp make/config.mk . | |
| # | |
| # Next modify the according entries, and then compile by |