Usually, located at /usr/local/cuda/bin
$ nvprof python train_mnist.py
I prefer to use --print-gpu-trace.
| #!/bin/bash | |
| # install CUDA Toolkit v9.0 | |
| # instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb) | |
| CUDA_REPO_PKG="cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb" | |
| wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/${CUDA_REPO_PKG} | |
| sudo dpkg -i ${CUDA_REPO_PKG} | |
| sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub | |
| sudo apt-get update | |
| sudo apt-get -y install cuda-9-0 |
| #---------------------------------------------- | |
| #--- Author : Ahmet Ozlu | |
| #--- Mail : [email protected] | |
| #--- Date : 21st September 2017 | |
| #---------------------------------------------- | |
| import face_recognition | |
| import cv2 | |
| import os | |
| import create_csv |
| cmake_minimum_required(VERSION 3.5) | |
| # Find python and Boost - both are required dependencies | |
| find_package(PythonLibs 2.7 REQUIRED) | |
| find_package(Boost COMPONENTS python REQUIRED) | |
| # Without this, any build libraries automatically have names "lib{x}.so" | |
| set(CMAKE_SHARED_MODULE_PREFIX "") | |
| # Add a shared module - modules are intended to be imported at runtime. |
| import numpy as np | |
| import gym | |
| import random | |
| from collections import deque | |
| from keras.layers import Input, Activation, Dense, Flatten, RepeatVector, Reshape | |
| from keras.layers.convolutional import Conv2D | |
| from keras.models import Model | |
| from keras import backend as K |
| """ | |
| 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) |
As configured in my dotfiles.
start new:
tmux
start new with session name: