Skip to main content
Filter by
Sorted by
Tagged with
-3 votes
1 answer
67 views

I use cupy to call cuda kernels, but I don't know how to debug cuda code, here is my wrapper file: wrapper.py import math from pathlib import Path import cupy as cp import numpy as np with open(Path(...
S200331082's user avatar
0 votes
0 answers
86 views

I have a ML problem where I want to leverage the power of Support Vector Classifiers (SVC) or any other 2-class classifier and compare them to my NN models. The probelm is, that binary classifiers are ...
user30013477's user avatar
1 vote
1 answer
67 views

I am trying to understand how CuPy handles memory. Specifically the difference between used_bytes and total_bytes as shown here I have a simple code that either directly allocates an array on device ...
Aditya's user avatar
  • 33
0 votes
0 answers
149 views

I have a computational code largely written based on cupy. The computation I'm running now requires high-frequency data transfer (from GPU to CPU) and writing to a h5 file. Here is a sketch of what I'...
TurbPhys's user avatar
-2 votes
1 answer
499 views

I have been working on a small Python package to solve a class of PDEs using scipy.integrate.solve_ivp. As discretizations are made finer, runtime becomes a bottleneck—especially when I need to solve ...
user572780's user avatar
2 votes
1 answer
148 views

I am trying to write code that convolves a 3D image with a 3D wavelet kernel that can be described using three independent parameters. I want to analyze the results of the convolution for all ...
Cameron Hastie's user avatar
0 votes
0 answers
68 views

I am trying to make a numpy/cupy interchange script, similar to this backend implementation. Such that by using something like from Util.Backend import backend as bd, I can create bd.array() that can ...
Amarth Gûl's user avatar
  • 1,090
0 votes
1 answer
34 views

I have a 2D array allocated on GPU and I need to use the cuPy's nanargmax() function to find the maximum value's index in each row. Some of the values could be NaN. Since the 2D array is quite large (...
skm's user avatar
  • 5,777
0 votes
1 answer
162 views

I have a .cu file with these heads: #include </usr/include/features.h> #include </usr/include/assert.h> #include </usr/include/stdio.h> When I use nvcc command to compile this file, ...
forestbat's user avatar
  • 1,115
1 vote
1 answer
261 views

I'm attempting to optimize the performance of the permutation test implemented in scipy.stats. My dataset consists of 500,000 observations, each associated with 2,000 binary covariates. I've applied ...
Dan Bolfter's user avatar
3 votes
1 answer
167 views

I'm new to CuPy and CUDA/GPU computing. Can someone explain why (x / y)[i] faster than x[i] / y[i]? When taking advantage of GPU accelerated computations, are there any guidelines that would allow me ...
huang's user avatar
  • 1,165
1 vote
0 answers
45 views

In the cupy docs on user defined kernels (https://docs.cupy.dev/en/stable/user_guide/kernel.html), there is a section defining certain variables that are predefined, like _ind.size() and i for things ...
rak's user avatar
  • 21
0 votes
1 answer
343 views

I have a hard time getting CuPy to detect and use, where applicable, the cuSPARSELt library in Windows. I tried installing versions 0.2.0 (as mentioned by CuPy's installation guide) and 0.6.2 (the ...
srcLegend's user avatar
2 votes
0 answers
59 views

It seems like cupy.linalg.solve doesn't have an option for me to solve linear system Ax=b assumingA is positive definite? I am looking for something like scipy.linalg.solve where one can actually tell ...
zvi's user avatar
  • 121
0 votes
0 answers
81 views

The app is built in Python on Windows 10 and make heavy use of cupy and cupyx.scipy.ndimage, and a few other cupyx libraries: It is distributable and it works. It now needs to go to a more secure ...
delicasso's user avatar
  • 187
0 votes
1 answer
370 views

I would like to copy a numpy array on an existing, pre-allocated, gpu array. I've seen that cupy offers the functions copy and copyto, however the former does not allow to specify the destination ...
stavoltafunzia's user avatar
0 votes
1 answer
542 views

import cv2 import numpy as np import cupy as cp import time def op_image(image): start_time = time.time() image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) image = cv2.resize(image, (640, 480)...
RajeshKumar S's user avatar
1 vote
0 answers
95 views

I import numpy or cupy as follows: import numpy as np # import cupy as np Then I generate X as follows: np.random.seed(0) X = np.random.rand(4, 3) I get two very different matrices depending on ...
Atharva's user avatar
  • 191
0 votes
0 answers
58 views

I've had no problems using the given documentation to install CuPy and develop with it on my own machine. But I'm seeing a roadblock in deploying applications using CuPy in a commercial setting to ...
Clyde's user avatar
  • 8,185
1 vote
1 answer
78 views

My code is like below. import numpy as np import torch import torch.nn as nn import cupy as cp from torchviz import make_dot from torchinfo import summary from torchsummary import summary as summary_ ...
YJ C's user avatar
  • 13
1 vote
1 answer
1k views

How can I get all available devices for CuPy? I'm looking to write a version of this for CuPy: if is_torch(xp): devices = ['cpu'] import torch # type: ignore[import] num_cuda = torch.cuda....
Lucas Colley's user avatar
2 votes
2 answers
120 views

I am doing 2D or 3D binary masks around given coordinates and then identifying them as labels with scipy.ndimage.label. Now, I have a cupy solution, a numpy solution. Cupy is fast, numpy is very slow, ...
João Mamede's user avatar
1 vote
1 answer
295 views

Anyone here trying to use cupy on a Maxwell GPU? I am trying to do a simple array.mean() operation and getting the message below. Is there a way I can get around this? Do I need to install a different ...
Stanley Powerlock's user avatar
-2 votes
2 answers
148 views

Consider the following operation, where I take 20 x 20 slices of a larger matrix and dot product them with another 20 x 20 matrix: import numpy as np a = np.random.rand(10, 20) b = np.random.rand(20, ...
anonymous1a's user avatar
  • 1,350
0 votes
3 answers
161 views

I have a nested array of shape: [200, 500, 1000]. Each index represents a coordinate of an image, eg array[1, 2, 3] would give me the value of the array at x=1, y=2, and z=3 in coordinate space. I ...
postnubilaphoebus's user avatar

1
2 3 4 5
8