PaddlePaddle / PaddlePaddle/PaddleCFD
flash_attention 的g_enable_* 属性在最新的paddlepaddle dev 版本中已经移除 ,请解决此冲突
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 63
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
问题描述:
下面代码调用了 flash_attention的g_enable*属性,这个接口在最新的paddlepaddle dev分支已经移除,导致运行时报错。
https://github.com/PaddlePaddle/PaddleCFD/blob/cdbbf9617e86aea436cf05303264a751c2e4200f/ppcfd/models/ppdiffusion/utils/utils.py#L13
问题验证:
- 测试代码:
import paddle
import paddle.nn.functional as F
try:
flash_attention = F.flash_attention
print(flash_attention.g_enable_math)
except AttributeError as e:
print(f"AttributeError: {e}")
if 'flash_attention' in locals():
print("\nflash_attention的所有方法和属性:")
for attr in dir(flash_attention):
print(attr)
- 验证一:
使用paddlepaddle 3.0.0.dev.20250825,有g_enable*属性
- 验证二:
使用paddlepaddle 3.0.0.dev.20251022,无g_enable*属性
结论
paddlecfd 代码中 flash_attention的g_enable*属性已经在paddlepaddle 3.0.0.dev.20251022版本以及后面的版本中移除,请解决此冲突。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at ppcfd/models/ppdiffusion/utils/utils.py around line 13, where flash_attention.g_enable_* is used. Compare that usage with the flash_attention API in the affected PaddlePaddle dev versions. Done means the utility no longer fails because those attributes were removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100