Abhas Kumar Sinha

 Open Source Electronics

Developing an open-source GPU model tailored for ML training e...
May 24, 2024 15:27
unfreeze spell
May 17, 2024 16:37
Okay okay, got the idea!
May 16, 2024 13:25
Are you referring to Arduino Uno? Where codes are written in C/C++ for different stuff? (This I'm aware, but not the ones that have Vhdl/Verilog ones).
May 16, 2024 13:23
@Kartman Are these dev boards open to the public? I'd definitely would like to try them.
May 16, 2024 04:40
Lately, I discovered RISC-V has RVT (Tensor version) of RVV extension too. But I'm not aware of any implementation that has implemented that. I'd code those myself over RISC-V base.
May 16, 2024 04:38
If I do all the free stuff in advance (doesn't needs to outperform NVIDIA, even if it's in like 30-40% range, that'd work).
May 16, 2024 04:37
I don't intend to make NVIDIA Chips, most probably I'd work on hardware VHDL code, building that hardware simulator, getting optimized ML-specific drivers, and porting OpenCL, OpenXLA, TensorFlow, PyTorch, and Keras into it (most probably cuDNN library too). The goal is to serve as a good starting point for future projects rather than to replace NVIDIA via paying them out billions of US dollars. I'm well aware NVIDIA chip prototypes are built with like 50-100 billion dollars.
May 16, 2024 04:34
@Kartman Ah, thanks for pointing out the flaw. I got some idea lately how memory hierarchy works (I think their optimizations would be another pain).
May 15, 2024 07:56
> The cache has now consumed way more transistors than the cpu it serves.
For your gpu/AI accelerator, you’ll need lots of high speed sram for intermediate storage and cache. I’d suggest you search for some micro photographs of modern cpus and you should see vast tracks of regular patterns which tend to be memory.

Yes. I understand that, I've no problems with cache consuming more transistors than computation till it is in the ratio of 10:1. What are some of the strategies to avoid or optimize that?
May 15, 2024 07:50
@Kartman Please correct me if I'm wrong anywhere here, I know I'd have definitely made a lot of mistakes, so all inputs and feedback are appreciated.
May 15, 2024 07:49
*Hypothetical Device Specs*

1. Based on RISC-V specs.
2. RISC-V has Vector Extension (RVV) that we can implement for SIMD units.
3. RISC-V has HCM Extension that can be used to implement multiple *Harts* or SIMT Units. (I don't know how Harts compare to threads tho).
4. Get high L2 memory into it.
5. As far I understand RAMs are faster because they are able to update a lot of memory at once, rather than serial data transfer like USBs. So, Create a special soft of SRAM that works on two way - One side goes into CPU Motherboard and other side goes into our hypothetical machine and it enables
May 15, 2024 07:42
So, here's my hypothetical device I'm planning to design.
May 15, 2024 07:41
So from what I understand, to be able to outperform a GPU of that size and scale, I'd need to work on a device that has comparable SIMD/SIMT units, L2 cache, high S-RAM and a good DL library working over it
May 15, 2024 07:40
One **A100** NVIDIA GPU specs:

1. It has 9k SIMT units (or cores or CUDA units) where 9,000 threads get processed simultaneously.
2. It has 512-bit registers supporting SIMD units, where at a time a single operation can be performed to 512 float numbers simultaneously.
3. It has 40 mb of L2 Cache and 80 G of Static RAM memory which is very high.
4. It at the same time has optimized CUDA software libraries like cuDNN, etc. which has a lot of software-based optimization done from the perspective of Deep Learning and ML.
May 15, 2024 07:35
So, what I was able to gather was like this:
May 15, 2024 07:35
My goal is to build a GPU like device (hypothetically) that is specialized for ML operations.
May 15, 2024 07:34
Thank you so much Kartman for your inputs. They are very helpful as you know I'm totally an inexperienced person in this area trying to gain some knowledge.
May 13, 2024 14:38
If I understand things correctly, I can try to get an AI to code such hardware from Kernel stacks (i.e. the ML program would run once, it'll gather all the operations it needs to perform and then design and output a Verilog code for that specific model, then I might look to generalize such designs if possible.)
May 13, 2024 14:35
Getting tensor operations, matrix multiplications, resizing, memory, etc design and that too in parallel shouldn't be this hard to code into Verilog? (or is it? If I'm very highly mistaken!)
May 13, 2024 14:34
But I know I'm missing something and making a very big blunder somewhere, as there are billions of transistors in a CPU these days and this shouldn't be this easy!
May 13, 2024 14:33
I wanted to know why a general hardware for such is so difficult. All one has to do is to just get series of adders or derivative function into logic gates and stack them parallel into hundreds of such and get a good memory to store few thousands of such data into the chip and return output. Such device can also work during training and when used in multiple numbers (device distribution, like multiple GPUs), can easily help to eliminate the need of multiple GPUs from NVIDIA.
May 13, 2024 14:29
I've worked with transformers and have talked to a few PhD students before who were working on specialized hardware devices for attention layers (a certain algorithm like CNNs). To me, coding such attention layers aren't very hard thing, I can easily create Verilog codes to execute attention layer computes and get the required outputs. But those were for inferences.
May 13, 2024 14:27
As an ML enthusiast, what intrigues me is that - NVIDIA with their CUDA GPUs (like T4, A100, etc.) single-handedly dominating ML Markets with their excellent design and highly optimized frameworks.
May 13, 2024 14:25
I've some very little knowledge on this significantly very large and big field of electronics. I know basic steps on how to code on Verilog, how to make adders, multipliers, flip-flops and their types, processors, etc and then synthesize them and then get basic silicon design that gets implemented into VLSI or silicon chips by fabrication and testing engineers. [I really hope I'm right till now.]
 
Mar 18, 2024 17:47
@Bingming I reject. So what?
Mar 18, 2024 17:47
@Haridasa Don't tag me with nonsense. In case there is any evidence of the yuga system in Puranas correlates with evidence, then show me. My stance is clear, neither Vedas nor Vedanta or even historical evidence endorses such timelines.
Mar 18, 2024 17:47
@Bingming I already said, that tradition and traditionalists don't matter to me than the people who interpret things that actually make sense. Traditionalists if they contradict reality are as useless as people admitting lilliputian as real.
Mar 18, 2024 17:47
@river I doubt. Dr Frawley had written some stuff using his timescales that offers better perspective on the age of Krishna and Rama using Mahabharata only. en.wikipedia.org/wiki/… I'm out of the convo as this is out of my area of knowledge including planetery calculations.
Mar 18, 2024 17:47
@river Yukteshvar Giri had an explanation for the Yuga system and that matches the scientific evidence we have. But according to that timescale, Kaliyuga hasn't started yet.
Mar 18, 2024 17:47
@Bingming Why do I need any shastra or any commentator, if a single physical concept contradicts, it is futile, no matter the thousands of commentaries it has. The actual values of yuga system given in puranas are far off.
Mar 18, 2024 17:47
All shastras must comply with the physical evidence we have or must be re-interpreted, otherwise any second shastra could be used as an authority to contradict others.
 
Feb 29, 2024 01:52
In case of any contradiction in smiritis, shrutis are accepted as an authority.
Feb 29, 2024 01:52
It is possible to have siddhis in successive births too with high level of discipline in previous births. But the level of practice that it demands is very high for such.
Feb 29, 2024 01:52
Please note Dr. Stevenson's book is NOT ABOUT RE-INCARNATION, but it is more about a proposition that there's something that resembles reincarnation through birthmarks.
 
Feb 18, 2024 04:15
Shankaracharya has no authority over Advaita Vedanta or Upanishads.
Feb 18, 2024 04:13
Shankaracharya is NOT the creator of Advaita Vedanta. Advaita Vedanta is the OLDEST philosophy and started from the time of Ramayana.
Feb 18, 2024 04:12
> Shankaracharya believes in Verna by Birth.

Source?
Feb 18, 2024 04:12
@Hope Shudra is by definition someone who is NOT interested in reading and learning of scriptures, hence is NOT initiated (or given diksha), in any case a shudra SHOULD NOT read Vedas. Rest are interpolations by Adi Shankara that is correct.
Feb 18, 2024 04:10
@Hope Vyasa had himself written Uttara Gita, which is a chief text on Advaita Vedanta. If you remember in Bhagavad Gita, Janak is being talked about. Janak's gurus - Ashtavakra and Yajnavalkya were the pioneers of Advaita Vedanta philosophy. There's no other philosophy that convers entire Upanishads, BS, BG and Tantras equally.
Feb 17, 2024 05:58
Uh!
Feb 17, 2024 05:58
Feb 17, 2024 05:55
@Hope No. It didn't.
Feb 17, 2024 05:39
Adi Shankara says the same thing. All darshanas in best of my opinion (except for a few) validate that.
Feb 17, 2024 05:39
> Ramanujacharya, in his commentary on the Brahma Sutras here, goes further and argues that animal sacrifice is not even contrary to the principle of Ahimsa, because the animal experiences rewards in the afterlife which far outweigh the momentary suffering it experiences
Feb 17, 2024 05:37
Feb 17, 2024 05:36
Philosophers like Adi Shankara, Sri Ramanujachara openly accepted it.
Feb 17, 2024 05:36
@Hope I've already said. It's historical references from the people even older than Swami Dayananda Sarasvati (Founder of Arya Samaj).
Feb 17, 2024 05:35
@Hope Some scholars believe words - sacrifice and kill are different and hence not contradictory in Vedas.
Feb 17, 2024 05:35
@Hope My answer was from a more historical perspective. It is known that kings during the old era used to sacrifice horses in the Ashvamedha ritual. Additionally, the Upanishad clearly mentions sacrificing horses for Indra, and if someone interprets it as non-violent sacrifice (I don't know if there any any basis for that or not), it turns out to change the entire ritual of the thing.
Feb 17, 2024 05:35
@Hope That's also the right interpretation of it. Arya Samaj has come up with another way to interpret that. But there are far-reaching consequences of their policy of interpreting that - it doesn't take account into Shiva/Vishnu like god, also nullifies avatarvaad, rejects puranas (which were the main source to validate such sacrifices).