Okay, here's a summary of the transcript in the requested format:
GPU Mode: int8 Tensor Core Matmuls for Turing
0:00:21 Introduction to the speaker Eric and talk topic: educational, int8 tensor core matmuls for Turing. Goal is to understand the basics rather than achieve state-of-the-art speed.
0:01:36 Key point: Int8 matrix multiplication is interesting across various hardware, not just GPUs.
0:02:04 Integer multiplication results in a larger data type (8-bit * 8-bit = 16-bit), creating register size mismatches compared to floating-point.
0:02:35 AVX-512's VNNI extension and CUDA's dp4a provide instructions for four-way dot products between signed/unsigned integers.
0:03:30 Integer math is deterministic, simplifying testing and eliminating the need for tolerance ranges.
0:04:39 Demonstrates the use of Tensor Cores directly in CUDA, without relying on large header libraries (e.g., Cutlass) or inline assembly (for functions shown in the video)
0:05:04 Question about when inline assembly is required; newer tensor instructions don't have equivalents in C++, war group MMA is a good example of it needing inline assembly. Code for Turing and Ampere is dispatched to correct ISA.
0:06:25 If you don't want to go too deep, use Cutlass. If you want to write it on your own, inline assembly is a good choice.
0:07:17 Code focuses on nice matrices: large, square, with dimensions divisible by a large power of two.
0:08:15 Optimizing for Turing (Quadro RTX 400) because it has fewer features, simplifying the process. There's an online submission system for trying the exercise.
0:10:00 Question: What efforts are there to optimize a kernel for a specific GPU, what to pay attention to when hyperspecializing code for it.
0:10:32 Difference is between GPU generations. Compiler tries to hide specialities by reordering, and some level of fine tuning is still needed
0:10:50 C++ code works for both Turing and Ampere.
0:11:53 Specializing for specific GPUs means understanding problem size vs GPU streaming multiprocessors. Tail effects must be considered, select block size to optimize for
0:13:06 Emphasis on providing structured feedback to fix errors instead of simple correctness checks. Using structured matrices (e.g., blocks of constant numbers) can help debug.
0:14:14 Considers small and large Matrix multiplication. Checks against reference result with naive check.
0:15:20 FS algorithm checks product with A and B * Vector X. Also compares qas library, while maintaining focus on code complexity.
0:17:43 Define result type with a result fragment (inner product). The speaker re-frames matmul in terms of "fragments", in order to bridge the gap between scalar math and tensor core math.
0:19:19 Question about best precision for certain devices
0:20:52 Decompose into fixed size submatrices (divisible by 16). This simplifies the problem, where matrix multiplication at the level of these blocks can be optimized.
0:22:21 Cutlass comes with megabytes of header files so just the CUFace is used.
0:22:39 Functions used for cuda: Two load, one store, fill and the MMA sync is exactly this multiplying of two matrix fragments.
0:22:55 Main Cost is not writing assembler. Code is not optimized for all gpus.
0:23:41 Revisits scalar matrix multiplication algorithm in a way that makes parallels to Tensor Cores.
0:24:32 Simplest Tensor Core Matrix. Algorithm level hasn't changed as we're defining a 16x16 fragment. Looping in steps of 16 and addressing needs to take into account the thread and block index. Sums come from MMA Sync Instruction. Result is Matrix SYNC and a caveat is provided about the example.
0:26:35 It isn't that simple to get decent performance even using tensor cores. Need to know the underlying reason for the performance result.
0:26:45 Need data in the right places at the right time. Bad memory access pattern! Strided access!
0:27:30 The Matrix sync functions fetches data from global memory and distributes it across threads in warp in an unspecified manner. This results in registers of Cuda.
0:28:17 The data is strided because B declared to be R major and we get unless Reads and uness Reads are very much terrible.
0:28:21 What are we transferring a lot of data from??
0:54:20 So, the reason why we didn't have a core data and didn't had a small problem as we did at before is because we force them to use specific numbers by design and code the way that we do
0:54:46 Does the trade offs make sense so what we can say is we might see problems in that particular core
0:55:13 If we go for long scoreboard it tells about how the data that's being used and where it's going
0:56:05 If we run the benchmark we can see these details