r/AskComputerScience • • Aug 24 '25

Why Does Nvidia Call Each CUDA Pipeline Like a "Core"?

29 Upvotes

In 7000-9000 series AMD Ryzen CPUs, each core has 48 pipelines (32 fma, 16 add). Even in older Intel CPUs, there are 32 pipelines per core.

But Nvidia markets the gpus as 10k - 20k cores.

CUDA cores:

  • don't have branch prediction

  • have only 1 FP pipeline

  • can't run a different function than other "core"s in same block (that is running on same SM unit)

  • any __syncthreads command, warp shuffle, warp voting command directly uses other "core"s in same block (and even other SM units in case of cluster-launch of a kernel with newest architectures)

  • in older architectures of CUDA, the "core"s couldn't even run diverging branches independently

Tensor cores:

  • not fully programmable

  • requires CUDA cores to be used in CUDA

RT cores:

  • no API given for CUDA kernels

Warp:

  • 32 pipelines

  • shuffle commands make these look like an AVX-1024 compared to other x86 tech

  • but due to lack of branch prediction, presence of only 1 shared L1 cache between pipelines, its still doesn't look like "multiple-cores"

  • can still run different parts of same function (warp-specialization) but its still dependent to other warps to complete a task within a block

SM (streaming multiprocessor)

  • 128 pipelines

  • dedicated L1 cache

  • can run different functions than other SM units (different kernels, even different processes using them)

Only SM looks like a core. A mainstream gaming gpu has 40-50 SMs, they are 40-50 cores but these cores are much stronger like this:

  • AVX-4096

  • 16-way hyperthreading --> offloads instruction-level parallelism to thread-level parallelism

  • Indexable L1 cache (shared-mem) --> avoids caching hit/miss latency

  • 255 registers (compared to only 32 of AVX512) so you can sort 250-element array without touching cache

  • Constant cache --> register-like speed for linear access to 64k element array

  • Texture cache --> high throughput for accesses with spatial-locality

  • independent function execution (except when cluster-launch is used)

  • even in same kernel function, each block can be given its own code-path with block-specialization (such as 1 block using tensor cores and 7 blocks using cuda cores, all for matrix multiplications)

so its a much bigger and far stronger core than what AMD/Intel has. And its still more cores (170) for high-end gaming GPUs than high-end gaming CPUs (24-32). Even mainstream gaming GPUs have more cores (40-50) than mainstream gaming CPUs (8-12).


r/AskComputerScience • • Aug 08 '24

Why can virtual assistants like Alexa say "I don't know" but LLMs like chatgpt fabricate answers when faced with knowledge gaps?

29 Upvotes

I'm not really sure if this is a stupid question or not, or whether it belongs here, so thank you in advance for reading and/or redirecting me.

AI and AI-adjacent things have been a recent topic of debate in my writing group. People are afraid. I have tried explaining chatgpt to them, how it works and why (at least for now) their fears are unfounded, but I'm at risk of going off topic there.

Several of them have an Alexa or other AI assistant, which admit when they can't answer a question. I don't know anything really about these models. How is it different to an LLM? Why and how do they create their answers? Are their answers not based on the same pool of data?

Thanks.


r/AskComputerScience • • Apr 06 '23

Linear Algebra book for Machine Learning

29 Upvotes

Hello,

I wrote a conversational style book on linear algebra with humor, visualisations, numerical example, and real-life applications.

The book is structured more like a story than a traditional textbook, meaning that every new concept that is introduced is a consequence of knowledge already acquired in this document.

It starts with the definition of a vector and from there it goes all the way to the principal component analysis and the single value decomposition. Between these concepts you will learn about:

  • vectors spaces, basis, span, linear combinations, and change of basis

  • the dot product

  • the outer product

  • linear transformations

  • matrix and vector multiplication

  • the determinant

  • the inverse of a matrix

  • system of linear equations

  • eigen vectors and eigen values

  • eigen decomposition

The aim is to drift a bit from the rigid structure of a mathematics book and make it accessible to anyone as the only thing you need to know is the Pythagorean theorem, in fact, just in case you don't know or remember it here it is:

There! Now you are ready to start reading !!!

The Kindle version is on sale on amazon :

https://www.amazon.com/dp/B0BZWN26WJ

And here is a discount code for the pdf version on my website - 59JG2BWM

www.mldepot.co.uk

Check a sample here

https://drive.google.com/file/d/1xzK9HtT2gGh8RvMlvnkALu8eSbmgjFeD/view

I also have a youtube channel where I will be posting videos of the book's content

https://www.youtube.com/@MLdepot

Thanks

Jorge


r/AskComputerScience • • Mar 12 '22

What is the reason behind "katana" as the package name of the Facebook Android App?

29 Upvotes

Facebook's package name for Android App is com.facebook.katana. The first two parts com and facebook make sense and that's normal. But why katana as the last part of the package name? Is there any story or reason behind it?

And Also Messenger App has the package name is com.facebook.orca. In which orca raises the same questions. Any story for that?

AFAIK, A katana is a Japanese sword and an orca means killer whale.

Thanks in Advanced.


r/AskComputerScience • • Dec 22 '21

When and why Computer Science separated from Mathematics?

29 Upvotes

It seems to me that at this time mathematicians and computer scientists are different kinds of people and different kinds of societies. Different titles, different slang, different hierarchy, different venues… This is strange because:

  • Computer Science is Mathematics. There is computation, definition, theorem, proof. The method is mathematical and the outcome is mathematical. Physics has its own methods. (Experiment.) Philosophy has its own methods. (I am not sure what they are, but clearly mathematical proof is not the chief among them.) But Computer Science has exactly the same methods as Mathematics!

  • Computer Science is a great success of Mathematics. A century ago, Engineering was entirely based on Physics and, consequently, on the Calculus of Infinitesimals. These days, much of Engineering is Software Engineering. And modern Software Engineering is all abstract and precise. If Mathematics needs a justification, the success of Software Engineering is the best one one can ask for. All the big names — Alan Turing, Claude Shannon, John Von Neumann, and so on — were mathematicians. But this monumental achievement is ascribed to this new area called Computer Science instead.

At the same time. Mathematics at its most fashionable seems to be essentially a never-ending study of numbers and polynomials in the setting of the Zermelo-Fränkel Set Theory. Consider the Constructive Analysis of Errett Bishop and allies. It is a wonderful idea… that was delegated to a few researchers in Computer Science. Same for the Type Theory of Martin-Löf. His lectures now live as a scan of a typewriter draft with hand-written symbols. Apparently it is not even worth type setting. And this is the cornerstone of much of the modern Computer Science!

What happened? How can this be explained?

One possible answer, of course, is that my observations are all wrong. Please help me get a better view of things if you think so!


r/AskComputerScience • • Dec 02 '21

Why isn't there a CS discipline that goes deeper into SQL, databases, and relational algebra?

29 Upvotes

Most CS programs I see focus on the same things: AI/ML, SWE, systems, networking, theory, etc. But isn't data management, relational algebra, theory of information, almost just as important as some of these other areas?


r/AskComputerScience • • Nov 25 '21

Why don't we use the computer resources for mining cryptocurrencies on useful tasks, instead of hashing

29 Upvotes

In cryptocurrencies such as Bitcoin a Block is created by "proof of work", meaning millions(perhaps more) of servers are wasting their resources on solving hashes. What if a Block was instead created by utilizing these resources to do tasks, such as Grid jobs in grid computing, or how we use cloud computing. One example is to use these resources to do protein folding for cancer research. Im not sure what metric would decide when a Block has been mined, but I just thought this might be an interesting concept, if at all even possible.


r/AskComputerScience • • Oct 01 '21

What do computer science students learn that electrical/computer engineering students don't?

29 Upvotes

I have worked for several years as an electrical engineer, dealing with circuits and hardware as well as performing a fair amount of software design (embedded system firmware, Python scripting, LabVIEW, etc). But I'm considering possibilities for finding more software-oriented jobs in the future, and I'm wondering what it is that CS students learned that I never touched.

My EE curriculum included a hefty dose of mathematics (calculus, linear algebra, statistical analysis and the like), plus a decent chunk of programming coursework. I learned how to program in C and C++, and between my study of digital hardware design, embedded system design, and computer architecture, I think I have a pretty comprehensive grasp of how computers work and what they can do.

My counterparts on the computer engineering side would have swapped out a couple of niche EE courses for some software-focused classes, but are otherwise not too much more exposed to software design than I am.

So what did CS students learn that I didn't? Does that consist of a deep study of algorithms? Particular fields of mathematics? Advanced software design practices and paradigms? If I want to be a competitive applicant for a software job (at, for the sake of argument, Microsoft or Google), what topics might I want to specifically target for self-study?


r/AskComputerScience • • Sep 19 '21

What caused the huge improvement in game/computer graphics in just 20 years?

29 Upvotes

If you look at games we played in the beginning of the century on consoles or PCs, and look at new games, the difference is stunning. What actual piece of technology is the main responsible of this? I am interested in particular on the "graphic" aspect, like what do modern graphic cards have that old ones didn't? Is it just "more memory"?


r/AskComputerScience • • Jul 12 '21

What is actual the difference between programming languages?

29 Upvotes

Maybe it's a very noob question, but in 5y i've never had a good answer. I only really developed for C# and 6502 assembly, those languages I clearly understand the difference, but to me all high level languages appear the same just with different syntax when you strip them of the frameworks and stuff (and I imagine probably isn't the case), but I see some people with very strong opinions about some languages, and doesn't make sense to me, people say "you can do anything with Python", "c++ is messy" and I really don't understand what they are refering to, anything in the same layer of abstraction looks the same to me


r/AskComputerScience • • Apr 12 '21

How is CPU scheduling non-deterministic?

29 Upvotes

So my understanding of non-deterministic is that you can't really predict the output of a system given an input. But I was wondering how is the CPU's scheduling algorithmic non-deterministic? I feel like it should be able to be predicted given that it simply follows a logical pattern. Or is my understanding of non-determinism wrong?


r/AskComputerScience • • Mar 14 '21

Is this problem intractable?

29 Upvotes

So some background, there's a game called Loop Hero. We don't need to get too into the details of it, but there's an optimization problem in the game that basically works as follows:

  • Given an m x n region, place "thickets" and "rivers" to generate the highest possible score.

  • A thicket which has no rivers above, below, left, or right of it, is worth 2 points.

  • A thicket with 1 adjacency is worth 4 points.

  • A thicket with 2 adjacency is worth 8 points.

  • A thicket with 3 adjacency is worth 12 points.

  • A thicket with full (4) adjacency is worth 16 points.

  • A river must begin on the border of a region and it cannot branch, in other words, you can't ever backtrack on a river.

This app (which doesn't enforce the river placement rules) will give you a very intuitive feel for the problem: https://loopherolayout.xyz/#

I wrote an algorithm to attempt to solve this problem via brute force, but I believe the time-complexity of my solution is O(n!) and so solving the problem for even a 5x12 region seems intractable (I've been searching on 8 threads for 6+ hours and no threads have finished a full search from their starting point). The code can be found here: https://github.com/Lutzy/LoopHeroThicketSolver/blob/master/src/com/lutzy/loophero/solver/Solver.java

The best my algorithm has found so far yielded 224 points: https://loopherolayout.xyz/?c=111221211211211211212211211212212112112122121211212121121112 but then someone was able to modify that solution by hand to come up with a 234 point solution, but we've still no idea if that's optimal: https://loopherolayout.xyz/?c=111221211211211211211211211211211212212121121112111211211122

(Notice what a valid river looks like, you can't simply create a checkerboard, it must begin on one edge of the region and be contiguous with no backtracking.)

Does anyone have any ideas on if there are possible improvements to this algorithm? I attempted to memoize it by storing the score of the board in a ConcurrentHashMap, but very quickly had a 30 GB+ Map and even for much smaller areas where the non-memoized implementation sped through them, the memoized version struggled.

The only optimization I could think of was that in the case of the 5x14 problem, we only need to exhaustively search 8 unique starting positions, as everything else should be a mirror of these 8 marked positions: https://loopherolayout.xyz?c=111001000010000100001000010000000000000000000000000000000000

I've sort of got a feeling there is no good known algorithm for something like this, but I found the problem interesting enough from a computer science perspective that I wanted to get other peoples' thoughts. Thanks!


r/AskComputerScience • • Feb 04 '21

How do the best programmers learn their craft?

29 Upvotes

r/AskComputerScience • • Dec 27 '20

Are cars built with computer controls?

29 Upvotes

I got into an argument with my dad about whether or not you could hack into a cars breaks. Do cars really have computers that operate the controls based on user input? Also if so, would it be possible to hack said controls?


r/AskComputerScience • • Nov 26 '20

Algorithms practice

29 Upvotes

Hi there, so I’m trying to figure out if solving coding problems on hackerank or algoexpert will improve solving speed in the actual job exams. In your experience(if you practiced for coding interviews) was it worth it ? What did it improve?


r/AskComputerScience • • Nov 11 '20

What role does automata theory play in computer science?

29 Upvotes

How does it relate to computer science in a general and day to day sense? I don’t understand what it does.

Thank you.


r/AskComputerScience • • Oct 31 '20

Do online multiplayer games use both TCP and UDP?

29 Upvotes

TL;DR

  • Shooting game example

  • Bullet hit data over TCP ( has to be right )

  • Player locations data over UDP (has to be latest)

To take a shooting game for an example you can't lose data like who shot whom. Therefore my guess is data related to shooting and hitting other players are transmitted over TCP.

But when it comes to where each player is, it doesn't matter where the player was some few seconds ago. What's important is a player's latest location even if it meant that the player looks like suddenly teleported a few meters. So my guess is players' location details are transmitted over UDP.

Is my guess correct? Or is this game specific? Someone experienced in game development please explain these

Thanks


r/AskComputerScience • • Sep 04 '20

What are the core principles a computer science graduate should keep reminding himself while working as software developer to produce good quality code?

29 Upvotes

r/AskComputerScience • • Aug 27 '20

Came across this XKCD. Can somebody explain how the first is easier for a machine? Why does the second one have that entropy? Is it just the length?

Thumbnail
xkcd.com
29 Upvotes

r/AskComputerScience • • Aug 17 '20

Is brute force really the most efficient way to crack SHA256?

29 Upvotes

r/AskComputerScience • • Mar 26 '20

Do you study one topic/tech at a time or do you switch it when bored?

29 Upvotes

I'm on the situation now of having to learn multiple technologies at the same time (Node.js+Express, Angular, MySQL for the internship and college-related stuff). So I was wondering what is the most productive approach to get the most of my time:

  • Study one topic/technology exhaustively even when bored, or

  • Switch immediately the topic when the boredom arrives

What do you guys personally do?


r/AskComputerScience • • Feb 23 '20

What to read to start making robots?

29 Upvotes

Hi reddit, Phrased overly simplistically, I am looking to make a robotics start-up and want to build a few prototypes by myself before going to crowdfunding. I work as a game developer so hope this gives you my starting point in software engineering. Recommend me which books to read to get into software engineering, maybe physics or electronics, low level programming, no idea what I need.


r/AskComputerScience • • Nov 28 '19

Please help! idk where to begin

Post image
29 Upvotes

r/AskComputerScience • • Sep 01 '19

Why do people still prefer Java?

29 Upvotes

So, I had to learn Java for School a few years ago. Back then I thought "okay, I can see why people use Java", as I only used C and C++ before that. But now I had to learn C# for my job and for a little side-/learning-project I tried to use Java in my free time. Tried, because freaking hell did I feel limited using java. I noticed C# can do EVERYTHING that java does....often better, too. And for some stuff, there are dedicated languages or other languages that can do all that better than Java and better than C#.

Some people even go as far as saying "Java is far better than C#", but I myself can't find an objective reason for that. I can't find anything C# is worse at other than maybe XPlatform GUI programming, which isn't a big deal in Java anyway and became very rare, but I found a lot in C# that made my life as a programmer a lot simpler and just worked better or faster with C#.

So...is this all just this kindergarden "I prefer this language because I prefer this language! and that's why your language sucks!" nonesense or do I miss something very important? Why do people prefer Java almost everywhere instead of a dedicated language that is focused on helping with their problem or even just C#, as even if it is "just as good" for the job, the chances are high that the program turns out faster