Live data from Hacker News

Multiplatform Matrix Multiplication Kernels

burn.dev

11–20 of 32 posts

Re: Multiplatform Matrix Multiplication Kernels

#11
post #8

Earlier quoted context omitted.

Using the naming from one of the existing API would put too much bias towards that API. It started as a WebGPU project early on, but some features are not present so mixing terms wasn't ideal. We're also working on extending CubeCL to CPU, so we want terms not only tied to the GPU word.

Why unit instead of point? Unit, plane (as vs train), and cube? Or point, plane, cube (1d, 2d, 3d)?

I don't recall the reason why, point is a valid name.

Re: Multiplatform Matrix Multiplication Kernels

#12
Has there been much research into slightly flawed matrix multiplications?

If you have a measure of correctness, and a measure of performance. Is there a maximum value of correctness per some unit of processing that exists below a full matrix multiply

Obviously it can be done with precision, since that is what floating point is. But is there anything where you can save x% of computation and have fewer than x% incorrect values in a matrix multiplications?

Gradient descent wouldn't really care about a few (Reliably) dud values.

Re: Multiplatform Matrix Multiplication Kernels

#15

Earlier quoted context omitted.

Thread, group, workgroup. There you go you've hit basically two of 3 completely (AMD and Vulkan) and are close enough to CUDA that people would get it. I have no idea what a plane connotes and a cube literally gives a distinct enough picture from block that I will be continuously reminding myself of the mapping. What you did was pointless - you assigned new words to objects that you don't own and now your conceptual…

Well we can agree to disagree, CubeCL also has the concept of instruction parallelism, which would be used to target simd instructions on CPU. Our algorithms are normally flexible on both the plane size and the line size, adapting to the hardware with comptime logique. You are free to dislike the naming, but imo a mix of multiple APIs is worse than something new.

For people who are interested Kokkos (a C++ library for writing portable kernels) also has a naming scheme for hierarchical parallelism. They use ThreadTeam, Thread (for individual threads within a group), and ThreadVector (for per thread SIMD).

Just commenting to share, personally I have no naming preference but the hierarchal abstractions in general are incredibly useful.

Re: Multiplatform Matrix Multiplication Kernels

#16
post #12

Has there been much research into slightly flawed matrix multiplications? If you have a measure of correctness, and a measure of performance. Is there a maximum value of correctness per some unit of processing that exists below a full matrix multiply Obviously it can be done with precision, since that is what floating point is. But is there anything where you can save x% of computation and have fewer than x% incorrec…

Randomized matrix sketching is one way to get at this (see https://arxiv.org/abs/2302.11474), the problem is hardware is heavily optimized for dense multiplies so what you save in flops doesn't translate to real runtime speeds ups.

Re: Multiplatform Matrix Multiplication Kernels

#17

Earlier quoted context omitted.

Well we can agree to disagree, CubeCL also has the concept of instruction parallelism, which would be used to target simd instructions on CPU. Our algorithms are normally flexible on both the plane size and the line size, adapting to the hardware with comptime logique. You are free to dislike the naming, but imo a mix of multiple APIs is worse than something new.

> Our algorithms are normally flexible on both the plane size and the line size Congrats - I have no idea what this means lol.

It will make more sense once you start using CubeCL. There's now a CubeCL book available: https://burn.dev/books/cubecl/.

It does come with some mental overhead, but let’s be honest, there’s no objectively “good” choice here without introducing bias toward a specific vendor API.

Learning the core concepts takes effort, but if CubeCL is useful for your work, it’s definitely worth it.

Re: Multiplatform Matrix Multiplication Kernels

#18
post #8

Earlier quoted context omitted.

Using the naming from one of the existing API would put too much bias towards that API. It started as a WebGPU project early on, but some features are not present so mixing terms wasn't ideal. We're also working on extending CubeCL to CPU, so we want terms not only tied to the GPU word.

Why unit instead of point? Unit, plane (as vs train), and cube? Or point, plane, cube (1d, 2d, 3d)?

Actually, points are zero dimensional, lines are one dimensional.

Re: Multiplatform Matrix Multiplication Kernels

#20

I had bet that matmult would be in transformer-optimized hardware costing a fraction of GPUs first class in torch 2 years ago with no reason to use GPUs any more. Wrong.

> matmult would be in transformer-optimized hardware

It is... it's in GPUs lol

> first class in torch

It is

> costing a fraction of GPUs

Why would anyone give you this for cheaper than GPUs lol?

Post reply on HN