Pranjal

346 posts

Pranjal

Pranjal

@pranjalssh

prev gpus @xai

Office Katılım Ocak 2021
761 Takip Edilen3.6K Takipçiler
Sabitlenmiş Tweet
Pranjal
Pranjal@pranjalssh·
I implemented H100 cuda matmul kernel from scratch, taking inspiration from @Si_Boehm's blog. Our final kernel outperforms cuBLAS by 7% for N=4096. It fits in a single C++ file without any dependencies. Full-blown blog post with all details: cudaforfun.substack.com/p/outperformin…
English
31
30
293
51.6K
Pranjal
Pranjal@pranjalssh·
@PatrickToulme Does it ever read flashattention4 implementation or write from scratch
English
0
0
1
157
Patrick C Toulme
Patrick C Toulme@PatrickToulme·
PyPTX is now the fastest FlashAttention kernel I’ve benchmarked. Using an improved PyPTX harness, GPT 5.6 Sol Max fully generated the kernel over a multi day loop that beats both FlashAttention-4 and cuDNN. Excited to share more results in the coming weeks. The future of kernel authoring is 100% agentic: models writing directly in the ISA.
Patrick C Toulme tweet media
English
23
26
319
38.8K
Taelin
Taelin@VictorTaelin·
it is ok, I'll do better
English
16
5
247
14K
Taelin
Taelin@VictorTaelin·
... honestly, I'm too naive to be a founder. People are raising serious money (money I never raised) to create startups based on algorithms *I invented*, and open-sourced. That's going to be an expensive lesson. Taking a morning to appreciate people are just evil and it is all a game of interests, after all
English
171
33
2.5K
138.1K
Pranjal
Pranjal@pranjalssh·
@_arohan_ Agreed, but gaps will always remain. Let people tokenmaxx and you can build a training data pipeline from this and in the limit tokenmaxxing -> 0
English
0
0
1
295
rohan anil
rohan anil@_arohan_·
Tokenmaxxing is what you should be doing during training. Inference should just one shot solutions
English
4
0
74
7K
tender
tender@tenderizzation·
one can dream
English
7
18
323
29.2K
Deep-ML
Deep-ML@real_deep_ml·
We just launched a new project that teaches you how to build Flash Attention with CUDA, step by step. By the end, you’ll have a working Flash Attention kernel built from the ground up. The project covers: -CUDA primitives warm-up -Matrix operations -Naive attention baseline -Online softmax math -Tiled attention building blocks -Fused Flash Attention kernel -Causal Flash Attention It will be open to everyone for the first 2 weeks, then it will become part of our premium projects.
Deep-ML tweet media
English
18
106
1.2K
47.5K
Pranjal
Pranjal@pranjalssh·
@ellev3n11 Use subagents aggressively and do long running tasks
English
1
1
41
1.8K
Federico Cassano
Federico Cassano@ellev3n11·
what do people want to see in composer-next? any new particular capabilities?
English
102
5
223
31.2K
Pranjal
Pranjal@pranjalssh·
@maharshii Once you go ptx, there's no way back.
English
1
0
3
115
maharshi
maharshi@maharshii·
1. The only place where CuTe layouts help is for TMA copying row-major quantized A and B from GMEM to SMEM with 128B swizzling 2. For scale factors, mbarriers and tensor memory, you can just allocate them as per-stage buffers using the Smem/Tmem allocator util that CuTeDSL provides. 3. There is warp specialization such that 1 warp handles TMA from gmem to smem, 1 warp just issues MMAs, and 4 warps do the epilogue. 4. For loading tensor memory to registers, tcgen05.ld requires 4 warps (a warpgroup) and thus epilogue needs to have 4 warps atleast. 5. CuTeDSL's nvvm mlir dialect provides the functions for tcgen05 ops that can be easily integrated as dsl user op. 6. For ops not in nvvm dialect like cp async bulk 1D gmem to smem (used for scale factors), you can just write the llvm inline asm (PTX) and expose it as a dsl user op. 7. Tcgen05 ops take descriptors i.e. shared memory or instruction descriptors which are just int64 with the information about MMA/Cp packed into them. 8. We move both scale factors to tensor memory first before staring with MMA, that's what cutlass does too. 9. Tcgen05 MMAs have an implicit unit of 8x2 (32B) tiles so in the K dimension, 1 MMA can take 64 FP4s, 16 BF16s, and so on... which happens to be the MMA_K for these dtypes! 10. GlobalScale is only loaded by the epilogue warps and multiplied with the accum tensor before casting it back to output dtype. Here's the code: github.com/Maharshi-Pandy…
maharshi tweet mediamaharshi tweet mediamaharshi tweet mediamaharshi tweet media
English
5
0
45
6.9K
maharshi
maharshi@maharshii·
I wrote a custom NVFP4 GEMM kernel in CuTeDSL stripping away almost all the fancy CuTe layouts "headache" in the official examples and doing the PTX, TMA, and Tcgen05 manually. It's crazy how low-level you can go with this and still be performant! My notes and code are below:
maharshi tweet media
English
7
4
248
23.7K
heiner
heiner@HeinrichKuttler·
@pmddomingos this appears to be a misunderstanding of the relevant physics
English
1
0
30
1.8K
Pedro Domingos
Pedro Domingos@pmddomingos·
All our measurements of space and time are quantized, and yet we still believe they're continuous.
English
67
8
152
313.4K
heiner
heiner@HeinrichKuttler·
Finally doing my CA driver license. Guess: When is it permitted to drive across double solid yellow lines? A When making a U-turn or left turn. B When the road is clear to pass the vehicle in front of you. C When instructed by construction or other signs due to a road closure.
English
7
1
32
11.8K