Skip to content

Conversation

@DongBaiYue
Copy link
Contributor

@DongBaiYue DongBaiYue commented Aug 5, 2025

1. 背景

paddle.linalg.matrix_rank:用于计算输入矩阵的秩(Rank),基于NVIDIA cuSOLVER库提供的奇异值分解(SVD)实现。
例:paddle.linalg.matrix_rank(Tensor([3, 47721859, 5, 6],"float32"), None, False, )
shape[3, 47721859, 5, 6]

  • [3,47721859]是batchSize。
  • [5,6]是单个batch。

代码核心逻辑

for (int i = 0; i < batchSize; ++i){
  // single batch
  dynload::cusolverDnCgesvdj(…)
}

2. 现有问题:

  • 单个batch的元素数超过INT32限制时报错。Paddle显式检查报错
  • 耗时与batchSize成正比,对示例[3, 47721859, 5, 6]耗时达10h+。

3. 解决方案

  • INT32限制时报错添加到paddle_error_dismiss。
  • 删除耗时过长config。

4. 其他

Torch行为:显式报错。已添加到torch_error_skip.txt

@paddle-bot
Copy link

paddle-bot bot commented Aug 5, 2025

Thanks for your contribution!

@wanghuancoder wanghuancoder merged commit 8e5b029 into PFCCLab:main Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants