Live data from Hacker News

An Even Easier Introduction to CUDA

devblogs.nvidia.com

1–10 of 60 posts

Re: An Even Easier Introduction to CUDA

#2
I think there's a small error in the first code sample -- where the comment says:

    Run kernel on 1M elements on the GPU
... The call to `add` isn't a call to a function that'd be thrown onto the GPU. The `add` function is very much CPU-only based on the definition in that code sample (at least, not at that point!)

Re: An Even Easier Introduction to CUDA

#3

I think there's a small error in the first code sample -- where the comment says: Run kernel on 1M elements on the GPU ... The call to `add` isn't a call to a function that'd be thrown onto the GPU. The `add` function is very much CPU-only based on the definition in that code sample (at least, not at that point!)

The first sample is meant to use the CPU.

Re: An Even Easier Introduction to CUDA

#4

I think there's a small error in the first code sample -- where the comment says: Run kernel on 1M elements on the GPU ... The call to `add` isn't a call to a function that'd be thrown onto the GPU. The `add` function is very much CPU-only based on the definition in that code sample (at least, not at that point!)

The first sample is meant to use the CPU.

Yes. My point is that the comment treats `add` like it's GPU code.

Re: An Even Easier Introduction to CUDA

#6
This is great. But it seems like many almost every great tutorial has a step zero that is left out. In this case, for me at least, what is missing is: What's a good guide to choosing or building a CUDA system? Preferably a Linux non-laptop. Mostly for playing around with something that offers a bit more power than my day to day (very non-CUDA capable) laptop. Anyone have suggestions?

I think there might be an EC2 solution, but I'm more interested in buying or building my own hardware, as crazy as that might be, just to have a relatively fixed cost (other than electricity) and to skip the overhead of any EC2 learning curve there might be.

Re: An Even Easier Introduction to CUDA

#7
post #6

This is great. But it seems like many almost every great tutorial has a step zero that is left out. In this case, for me at least, what is missing is: What's a good guide to choosing or building a CUDA system? Preferably a Linux non-laptop. Mostly for playing around with something that offers a bit more power than my day to day (very non-CUDA capable) laptop. Anyone have suggestions? I think there might be an EC2 sol…

To learn CUDA programming? Just buy any NVIDIA gpu. Period.

Re: An Even Easier Introduction to CUDA

#9

Anyone know why the CUDA toolkit is 1.2GB? It seems extremely large to get started with. In comparison Vulkan which is only 130mb.

Vulkan leverages the compiler in the graphics drivers, like OpenCL. CUDA comes with a separate compiler that plugs into the system C/C++ compiler (this is often a pain). CUDA also ships with dozens of premade libraries for common compute tasks.

Re: An Even Easier Introduction to CUDA

#10
post #6

This is great. But it seems like many almost every great tutorial has a step zero that is left out. In this case, for me at least, what is missing is: What's a good guide to choosing or building a CUDA system? Preferably a Linux non-laptop. Mostly for playing around with something that offers a bit more power than my day to day (very non-CUDA capable) laptop. Anyone have suggestions? I think there might be an EC2 sol…

As the other poster said, any NVIDIA GPU would do. You probably want the latest architecture (Pascal), and check what PSU you have and what PCIe power options it has. Depending on that (no PCIe power, single 6 pin, dual 8 pin, ...) you can see how far up the range you can go and still have the card fit.
Post reply on HN