fix fused_attn with fp32 and add table cls label list (#3377)

release/2.6
zhangyubo0722 2025-04-22 15:04:57 +08:00 committed by GitHub
parent 19e9cfeaf4
commit 2e25edc5ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -65,6 +65,10 @@ class Engine(object):
self.is_rec = True
else:
self.is_rec = False
if self.config["Arch"].get("use_fused_attn", False):
if not self.config.get("AMP", {}).get("use_amp", False):
self.config["Arch"]["use_fused_attn"] = False
self.config["Arch"]["use_fused_linear"] = False
# set seed
seed = self.config["Global"].get("seed", False)
@ -105,7 +109,8 @@ class Engine(object):
# set device
assert self.config["Global"]["device"] in [
"cpu", "gpu", "xpu", "npu", "mlu", "ascend", "intel_gpu", "mps", "gcu"
"cpu", "gpu", "xpu", "npu", "mlu", "dcu", "ascend", "intel_gpu",
"mps", "gcu"
]
self.device = paddle.set_device(self.config["Global"]["device"])
logger.info('train with paddle {} and device {}'.format(

View File

@ -0,0 +1,2 @@
0 wired_table
1 wireless_table