Category : cuda

I installed Anaconda, CUDA, and PyTorch today, and I can’t access my GPU (RTX 2070) in torch. I followed all of installation steps and PyTorch works fine otherwise, but when I try to access the GPU either in shell or in script I get >>> import torch >>> torch.cuda.is_available() False >>> torch.cuda.device_count() 0 >>> print(torch.version.cuda) ..

Read more

This is my setup, what I have done: Windows 10 x64 Pro Nvdia 1050Ti Installed Cuda 11.5 Python 3.8.12 conda install cudatoolkit pip install tensorflow-gpu Now in Jupyter: import tensorflow as tf print(tf.__version__) reports: 2.6.0 import tensorflow as tf print("GPUs: ", tf.config.list_physical_devices(‘GPU’)) reports: GPUs: [] What am I missing? Source: Python-3x..

Read more

@guvectorize([‘void(float64[:, :], int64[:, :, :], float64[:, :])’], ‘(m, n), (g, h, m) ->(g, h)’, target=’cuda’, nopython=True) def das(data1, k_value, image1): for i in range(image1.shape[0]) : for j in range(image1.shape[1]) : sum = 0. for k in range(data1.shape[0]): k_num = k_value[i, j, k] if k_num < data1.shape[1] : sum += data1[k, k_num] image1[i, j] = sum ..

Read more

I’m trying to start using Cupy for some Cuda Programming. I need to write my own kernels. However, I’m struggling with 2D kernels. It seems that Cupy does not work the way I expected. Here is a very simple example of a 2D kernel in Numba Cuda: import cupy as cp from numba import cuda ..

Read more

@guvectorize([‘void(float64[:, :], int64[:, :, :], float64[:, :])’], ‘(m, n), (g, h, m) ->(g, h)’, target=’cuda’) def addition(data1, k_value, image1): for i in range(image1.shape[0]) : for j in range(image1.shape[1]) : sum = 0. for k in range(data1.shape[0]): time1 = k_value[i, j, k] if time1 < data1.shape[1] : sum += data1[k, time1] image1[i, j] = sum when ..

Read more