mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-04 16:22:57 +08:00
native top_p_sampling (#2901)
This commit is contained in:
@@ -63,7 +63,12 @@ class SiluAndMul(nn.Layer):
|
||||
"""
|
||||
super().__init__()
|
||||
|
||||
if current_platform.is_cuda() or current_platform.is_xpu() or current_platform.is_iluvatar():
|
||||
if (
|
||||
current_platform.is_cuda()
|
||||
or current_platform.is_xpu()
|
||||
or current_platform.is_iluvatar()
|
||||
or current_platform.is_dcu()
|
||||
):
|
||||
self.forward = self.forward_cuda
|
||||
elif current_platform.is_gcu():
|
||||
self.forward = self.forward_gcu
|
||||
|
Reference in New Issue
Block a user