• barsoap@lemm.ee
    link
    fedilink
    English
    arrow-up
    1
    ·
    22 hours ago

    There’s also a lot of efficiency in hardware-specific kernels. A generic rocm build vs. one with hand-written kernels (not even for the proper card just a close enough one to have the same instructions) is like a 10x performance drop. That’s on the matrix multiply up to convolve these tensors level, on the layer above that you then have things like smart memory management and scheduling as well as minimising how much work needs to be done in the first place (re-ordering operations so tensors stay small) and stuff.

    You can port cuda code to vulkan or opencl – but you’re going to have to reimplement all of that. Just getting the BLAS layer to not suck is a challenge.