gpu

GPU computing for bootstrapping using “boot” package

倾然丶 夕夏残阳落幕 提交于 2021-02-18 17:10:17
问题 I would like to do a large analysis using bootstrapping. I saw that the speed of bootstrapping is increased using parallel computing as in the following code: Parallel computing # detect number of cpu library(parallel) detectCores() library(boot) # boot function --> mean bt.mean <- function(dat, d){ x <- dat[d] m <- mean(x) return(m) } # obtain confidence intervals # use parallel computing with 4 cpus x <- mtcars$mpg bt <- boot(x, bt.mean, R = 1000, parallel = "snow", ncpus = 4) quantile(bt$t

GPU computing for bootstrapping using “boot” package

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-18 17:09:24
问题 I would like to do a large analysis using bootstrapping. I saw that the speed of bootstrapping is increased using parallel computing as in the following code: Parallel computing # detect number of cpu library(parallel) detectCores() library(boot) # boot function --> mean bt.mean <- function(dat, d){ x <- dat[d] m <- mean(x) return(m) } # obtain confidence intervals # use parallel computing with 4 cpus x <- mtcars$mpg bt <- boot(x, bt.mean, R = 1000, parallel = "snow", ncpus = 4) quantile(bt$t

Is it possible to use CUDA in order to compute the frequency of elements inside a sorted array efficiently?

六眼飞鱼酱① 提交于 2021-02-16 20:54:26
问题 I'm very new to Cuda, I've read a few chapters from books and read a lot of tutorials online. I have made my own implementations on vector addition and multiplication. I would like to move a little further, so let's say we want to implement a function that takes as an input a sorted array of integers. Our goal is to find the frequencies of each integer that is in the array. Sequentially we could scan the array one time in order to produce the output. The time complexity would be O(n) . Since

Ubuntu - how to tell if AVX or SSE, is current being used by CPU app?

与世无争的帅哥 提交于 2021-02-16 15:42:45
问题 I current run BOINC across a number of servers which have GPUs. The servers run both GPU and CPU BOINC apps. As AVX and SSE slow down the CPU freq when being used within a CPU app, I have to be selective which CPU/GPU I run together, as some GPU apps get bottle necked (slower run time completion) where as others do not. At present some CPU apps are named so it is clear to see if they use AVX but most are not. Therefore is there any command I can run, and some way of viewing, to see if any of

error when copying dynamically allocated data in device to host?

点点圈 提交于 2021-02-16 15:09:49
问题 I recently meet a problem when copying dynamically allocated data in device to host memory. The data is allocated with malloc, and I copy those data from device to host in host function. Here is the code: #include <cuda.h> #include <stdio.h> #define N 100 __device__ int* d_array; __global__ void allocDeviceMemory() { d_array = new int[N]; for(int i=0; i < N; i++) d_array[i] = 123; } int main() { allocDeviceMemory<<<1, 1>>>(); cudaDeviceSynchronize(); int* d_a = NULL; cudaMemcpyFromSymbol(

Why is Tensorflow not recognizing my GPU after conda install?

邮差的信 提交于 2021-02-15 11:50:49
问题 I am new to deep learning and I have been trying to install tensorflow-gpu version in my pc in vain for the last 2 days. I avoided installing CUDA and cuDNN drivers since several forums online don't recommend it due to numerous compatibility issues. Since I was already using the conda distribution of python before, I went for the conda install -c anaconda tensorflow-gpu as written in their official website here: https://anaconda.org/anaconda/tensorflow-gpu . However even after installing the

Why is Tensorflow not recognizing my GPU after conda install?

夙愿已清 提交于 2021-02-15 11:48:47
问题 I am new to deep learning and I have been trying to install tensorflow-gpu version in my pc in vain for the last 2 days. I avoided installing CUDA and cuDNN drivers since several forums online don't recommend it due to numerous compatibility issues. Since I was already using the conda distribution of python before, I went for the conda install -c anaconda tensorflow-gpu as written in their official website here: https://anaconda.org/anaconda/tensorflow-gpu . However even after installing the

Why isn't my colab notebook using the GPU?

与世无争的帅哥 提交于 2021-02-11 16:28:09
问题 When I run code on my colab notebook after having selected the GPU, I get a message saying "You are connected to a GPU runtime, but not utilizing the GPU". Now I understand similar questions have been asked before, but I still don't understand why. I am running PCA on a dataset over hundreds of iterations, for multiple trials. Without a GPU it takes about as long as it does on my laptop, which can be >12 hours, resulting in a time out on colab. Is colab's GPU restricted to machine learning

How to write a scikit-learn estimator in PyTorch

若如初见. 提交于 2021-02-11 15:41:15
问题 I had developed an estimator in Scikit-learn but because of performance issues (both speed and memory usage) I am thinking of making the estimator to run using GPU. One way I can think of to do this is to write the estimator in PyTorch (so I can use GPU processing) and then use Google Colab to leverage on their cloud GPUs and memory capacity. What would be the best way to write an estimator which is already scikit-learn compatible in PyTorch? Any pointers or hints pointing to the right

How to write a scikit-learn estimator in PyTorch

我是研究僧i 提交于 2021-02-11 15:38:59
问题 I had developed an estimator in Scikit-learn but because of performance issues (both speed and memory usage) I am thinking of making the estimator to run using GPU. One way I can think of to do this is to write the estimator in PyTorch (so I can use GPU processing) and then use Google Colab to leverage on their cloud GPUs and memory capacity. What would be the best way to write an estimator which is already scikit-learn compatible in PyTorch? Any pointers or hints pointing to the right