GithubHelp home page GithubHelp logo

Comments (4)

traveller59 avatar traveller59 commented on July 21, 2024

The RTX 2070 seems need CUDA 10, you can build pytorch with cuda 10 from source. Cound you run simple pytorch network training with cuda 9 + RTX?

from second.pytorch.

YangHe712 avatar YangHe712 commented on July 21, 2024

The RTX 2070 seems need CUDA 10, you can build pytorch with cuda 10 from source. Cound you run simple pytorch network training?

I also notice this problem. CUDA 10 supports turing architecture. But we need to use CUDA 9 because of the SparseConvNet package, don't we? According to the Nvidia's reply, they guess CUDA 9 should work with Turing (ref: https://devtalk.nvidia.com/default/topic/1044361/value-quot-sm_75-quot-not-defined-with-cuda-9-0-installed-on-rtx-2070/).

Also, I run the following simple pytorch example with GPU:

import torch

dtype = torch.float
#device = torch.device("cpu")
device = torch.device("cuda:0") # Uncomment this to run on GPU
#N is batch size; D_in is input dimension;
#H is hidden dimension; D_out is output dimension.
N, D_in, H, D_out = 64, 1000, 100, 10

#Create random Tensors to hold input and outputs.
#Setting requires_grad=False indicates that we do not need to compute gradients
#with respect to these Tensors during the backward pass.
x = torch.randn(N, D_in, device=device, dtype=dtype)
y = torch.randn(N, D_out, device=device, dtype=dtype)

#Create random Tensors for weights.
#Setting requires_grad=True indicates that we want to compute gradients with
#respect to these Tensors during the backward pass.
w1 = torch.randn(D_in, H, device=device, dtype=dtype, requires_grad=True)
w2 = torch.randn(H, D_out, device=device, dtype=dtype, requires_grad=True)

learning_rate = 1e-6
for t in range(500):
# Forward pass: compute predicted y using operations on Tensors; these
# are exactly the same operations we used to compute the forward pass using
# Tensors, but we do not need to keep references to intermediate values since
# we are not implementing the backward pass by hand.
y_pred = x.mm(w1).clamp(min=0).mm(w2)

# Compute and print loss using operations on Tensors.
# Now loss is a Tensor of shape (1,)
# loss.item() gets the a scalar value held in the loss.
loss = (y_pred - y).pow(2).sum()
print(t, loss.item())

# Use autograd to compute the backward pass. This call will compute the
# gradient of loss with respect to all Tensors with requires_grad=True.
# After this call w1.grad and w2.grad will be Tensors holding the gradient
# of the loss with respect to w1 and w2 respectively.
loss.backward()

# Manually update weights using gradient descent. Wrap in torch.no_grad()
# because weights have requires_grad=True, but we don't need to track this
# in autograd.
# An alternative way is to operate on weight.data and weight.grad.data.
# Recall that tensor.data gives a tensor that shares the storage with
# tensor, but doesn't track history.
# You can also use torch.optim.SGD to achieve this.
with torch.no_grad():
    w1 -= learning_rate * w1.grad
    w2 -= learning_rate * w2.grad

    # Manually zero the gradients after updating weights
    w1.grad.zero_()
    w2.grad.zero_()

it works normally.

thanks for your help in advance.

from second.pytorch.

YangHe712 avatar YangHe712 commented on July 21, 2024

I think the error " CUDNN_STATUS_EXECUTION_FAILED " is due to the fact that CUDA 9.0 has problem recognizing the graphic card of RTX 20xx. To solve the problem, I first try to install CUDA 10.0 from the source, just as you suggested. But after I spent much time modifying the configuration, it still shows "segmentation fault (core dumped)". Then I turn to CUDA 9.2 because I hear from someone that 9.2 supports RTX 2080. Luckily it does work. So now the only problem reminded is the package SparseConvNet's dependency on CUDA 9. We finally sovled it by creating a symbolic link that targets the CUDA 9.2.

Now, the problem is solved.

from second.pytorch.

NagarajDesai1 avatar NagarajDesai1 commented on July 21, 2024

"We finally sovled it by creating a symbolic link that targets the CUDA 9.2." could you please tell me the exact steps which you performed to solve this issue? I am facing the same issue with cuda 9.2 and titan RTX GPU.

from second.pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.