[Performance] Add Triton kernel for Gemma3n sparse GELU (#48498)
Signed-off-by: BWAAEEEK <jooho414@gmail.com> Co-authored-by: Andreas Karatzas <akaratza@amd.com> Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
This commit is contained in:
co-authored by
Andreas Karatzas
Cyrus Leung
parent
e6b4e47d2d
commit
78e84261ab
@@ -755,7 +755,10 @@ class CudaPlatformBase(Platform):
|
||||
rms_norm = ["oink"] + default
|
||||
|
||||
return IrOpPriorityConfig.with_default(
|
||||
default, rms_norm=rms_norm, fused_add_rms_norm=rms_norm
|
||||
default,
|
||||
rms_norm=rms_norm,
|
||||
fused_add_rms_norm=rms_norm,
|
||||
gelu_and_mul_sparse=["triton", "native"],
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -1161,7 +1161,10 @@ class RocmPlatform(Platform):
|
||||
rms_norm = default
|
||||
|
||||
return IrOpPriorityConfig.with_default(
|
||||
default, rms_norm=rms_norm, fused_add_rms_norm=rms_norm
|
||||
default,
|
||||
rms_norm=rms_norm,
|
||||
fused_add_rms_norm=rms_norm,
|
||||
gelu_and_mul_sparse=["native"],
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -491,7 +491,7 @@ class XPUPlatform(Platform):
|
||||
using_inductor = cc.backend == "inductor" and cc.mode != CompilationMode.NONE
|
||||
default = ["native"] if using_inductor else ["vllm_c", "native"]
|
||||
|
||||
return IrOpPriorityConfig.with_default(default)
|
||||
return IrOpPriorityConfig.with_default(default, gelu_and_mul_sparse=["native"])
|
||||
|
||||
@classmethod
|
||||
def device_count(cls) -> int:
|
||||
|
||||
Reference in New Issue
Block a user