[CPU][Perf]Added tanh AOR for faster gelu activations. (#44639)
Signed-off-by: Anna Mayne <anna.mayne@arm.com> Signed-off-by: almayne <anna.mayne@arm.com> Co-authored-by: Li, Jiang <jiang1.li@intel.com>
This commit is contained in:
co-authored by
Li, Jiang <jiang1.li@intel.com>
parent
b446792306
commit
89e99202f2
@@ -193,6 +193,18 @@ class CpuPlatform(Platform):
|
||||
and "-gelu" not in compilation_config.custom_ops
|
||||
):
|
||||
compilation_config.custom_ops.append("+gelu")
|
||||
if (
|
||||
cls.get_cpu_architecture() == CpuArchEnum.ARM
|
||||
and "+gelu_tanh" not in compilation_config.custom_ops
|
||||
and "-gelu_tanh" not in compilation_config.custom_ops
|
||||
):
|
||||
compilation_config.custom_ops.append("+gelu_tanh")
|
||||
if (
|
||||
cls.get_cpu_architecture() == CpuArchEnum.ARM
|
||||
and "+gelu_and_mul" not in compilation_config.custom_ops
|
||||
and "-gelu_and_mul" not in compilation_config.custom_ops
|
||||
):
|
||||
compilation_config.custom_ops.append("+gelu_and_mul")
|
||||
|
||||
vllm_config.profiler_config.torch_profiler_dump_cuda_time_total = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user