Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] CUDA-10 library doesn't support the Turing-based RTX 2060? #482

Closed
sedwards-lab opened this issue Dec 10, 2020 · 8 comments
Closed

Comments

@sedwards-lab
Copy link

Looks like the Turing-based RTX 2060 is too new for the cuda-10 library. It's apparently "sm_75" but the cuda-10 library only supports up to sm_72.

Trying to run the fwaccel-gpu example from Simon Marlow's book, which I patched to start with

{-# LANGUAGE CPP, BangPatterns #-}
{-# OPTIONS_GHC -Wall -fno-warn-name-shadowing #-}

module Main ( main, test {-, maxDistances -} ) where

import Prelude
import System.Environment
import Data.Array.Accelerate as A
import Data.Array.Accelerate.LLVM.PTX

(I removed the import of AccelerateCompat)

Runtime error:

$ stack run fwaccel-gpu -- 200
fwaccel-gpu:
*** Internal error in package accelerate ***
*** Please submit a bug report at https://github.com/AccelerateHS/accelerate/issues

ptxas - -o /home/sedwards/.cache/accelerate/accelerate-llvm-1.3.0.0/accelerate-llvm-ptx-1.3.0.0/llvm-hs-9.0.1/nvptx64-nvidia-cuda/sm75/rel/morp9202ae4c7dc569aa0ea6fb2c02b0efca3bfd980b6e440b3de34a094604d51ee0.sass -arch=sm_75 (exit 255)
ptxas fatal : Value 'sm_75' is not defined for option 'gpu-name'

CallStack (from HasCallStack):
internalError: Data.Array.Accelerate.LLVM.PTX.Compile:185:24
compileCUBIN: Data.Array.Accelerate.LLVM.PTX.Compile:123:20
compile: Data.Array.Accelerate.LLVM.PTX.Compile:88:22

If the bug is with the accelerate-llvm-ptx GPU backend, include the output of nvidia-device-query

resolver: lts-16.25

extra-deps:

  • accelerate-1.3.0.0
  • accelerate-llvm-ptx-1.3.0.0
  • accelerate-llvm-1.3.0.0
  • cuda-0.10.2.0
  • nvvm-0.10.0.0

resolver: lts-16.25

Ubuntu 18.04.5 LTS

GeForce RTX 2060

cuda-10

@sedwards-lab sedwards-lab changed the title [BUG] [BUG] CUDA-10 library doesn't support the Turing-based RTX 2060? Dec 10, 2020
@tmcdonell
Copy link
Member

I have a 2080ti so this definitely should work! What version of llvm are you using? I have llvm-9.

@tmcdonell
Copy link
Member

Oh, I think you need cuda-10.1 installed (that's what I have) (or later, but I haven't updated the bindings for cuda-11* yet, sorry...). It seems the error is coming from ptxas, which is part of the CUDA toolchain.

@sedwards-lab
Copy link
Author

I think I have cuda-10 installed, although I first started by installing cuda-11, which gave link errors with the Haskell libraries. And I'm also using LLVM 9 (standard under Ubuntu 18.04)

How does the system choose to send sm_75 to ptxas? I couldn't quickly find it in the code.

@tmcdonell
Copy link
Member

In the file Target.hs. Your system is very similar to mine so it should work.

CUDA-10 indeed added support for sm_75: https://docs.nvidia.com/cuda/archive/10.0/cuda-toolkit-release-notes/index.html#cuda-general-new-features

Oh, if you upgraded your CUDA Toolkit after installing my CUDA bindings package, you might need to unregister (stack exec ghc-pkg -- unregister --force cuda) that package and reinstall it.

@sedwards-lab
Copy link
Author

sedwards-lab commented Dec 11, 2020 via email

@tmcdonell
Copy link
Member

tmcdonell commented Dec 26, 2020

(sorry for the late response). I'm running ubuntu 20.04 and CUDA 10.1.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:        20.04
Codename:       focal

@sedwards-lab
Copy link
Author

sedwards-lab commented Dec 27, 2020 via email

@tmcdonell
Copy link
Member

okay, closing for now then. let us know if you want any help and I'll do my best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants