i am trying to make my code run on my GTX970m but instead it is running on my intel integrated graphics
i have tried
cp.cuda.Device(1).use()
since 0 is my intel graphics but i got
cupy.cuda.runtime.CUDARuntimeError: cudaErrorInvalidDevice: invalid device ordinal
my computer is runnig windows 10 64bit and on the intel graphics my code executes perfectly(and slowly)
here is what my code is doing: i have a 1000 by 1000 numpy matrix called phi then i do this:
def matrix_step_alt_gpu(phi):
phiNPlus1 = phi.copy()
phiNPlus1_c = (1 / (DX ** 2 + DY ** 2)) * ((DY ** 2 * cp.dot(LEFT, phi)) + (DX ** 2 * cp.dot(phi, LEFT)))
phiNPlus1[1:-1, 1:-1] = phiNPlus1_c[1:-1, 1:-1]
return phiNPlus1
and i repeat until this number(np.float64...) is maller the 10^-6:
np.float64(np.max(np.abs(phiNPlus1 - phi)) / PHI_0[0, 1])
just to remove any doubts i have also checked using my task manager's performance tab
nothing running:
some code using cupy running: