Giter Site home page Giter Site logo

Limit on input Tensor size using cunn about cunn HOT 5 OPEN

torch avatar torch commented on June 10, 2024
Limit on input Tensor size using cunn

from cunn.

Comments (5)

etrulls avatar etrulls commented on June 10, 2024

I'm also running into this.
(I'm trying to hunt down the magic number but I'm new to CUDA and it's not very friendly.)

from cunn.

dominikgrewe avatar dominikgrewe commented on June 10, 2024

The grid used to launch the kernel uses the batch size as the first dimension: https://github.com/torch/cunn/blob/master/LogSoftMax.cu#L238

There's a limit on the size of these grids, which depends on the version of CUDA you're using. It's 65536 for compute capability <= 2.x and 2^31-1 for newer versions (see https://en.wikipedia.org/wiki/CUDA#Version_features_and_specifications)

from cunn.

etrulls avatar etrulls commented on June 10, 2024

Aha, I got that far, and I couldn't see why it wasn't working out of the box on a K40.
Turns out cunn is compiling for a compute capability of 2.0, so changing that seems to solve the problem. Thanks!

from cunn.

hogwild avatar hogwild commented on June 10, 2024

I use a Geforce 750Ti. The problem is solved by changing the CUDA_NVCC_FLAGS from "-arch=sm_20" to "-arch=sm_50" in the CmakeLists.txt.

from cunn.

mrharicot avatar mrharicot commented on June 10, 2024

I have the same issue with SpatialSoftmax on the GPU, I am using a Titan X and cunn was compiled with CUDA 7.5 and compute capability 5.2
Any idea if this is fixable?

EDIT: I think I have fixed this by explicitly using cudnn.SpatialSoftMax

from cunn.

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.