Skip to content

Exclude unused kernels from compilation, when cuDNN backend is selected? #334

Description

@erwincoumans

Some kernels are very heavy (seem to require >64GB of memory), and they may not be used if some manifest selects cuDNN backend.

Could we excluding the Sage Blackwell source from the build, if cuDNN is selected?

Excuses if above assumption are wrong, not very familiar with how things work, it could be more complicated:

Unfortunately it may not be a quick flag. The entire 558-byte shim is:

#undef PYBIND11_MODULE
#define PYBIND11_MODULE(name, variable) static void native_sage3_blackwell_pybind_stub(...)
#include "sageattention3_blackwell/sageattn3/blackwell/api.cu"   // ← the 62 GB compile

That one #include pulls in all of SageAttention‑3's Blackwell api.cu (the full CUTLASS sm_120 kernel library) and instantiates it. 
That's your 62 GB cudafe++.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions