We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我发现 stft_kernel.cu 文件中的代码默认情况下不会被编译,因此怀疑是条件宏出了问题。 于是做了以下修改:doombeaker@1a96e88
#define YCPRINTLOG printf("CUDA_VERSION >= 11000 is true, version: %d, runtime: %d\r\n", CUDA_VERSION, (CUDA_VERSION >= 11000)); #else #define YCPRINTLOG printf("CUDA_VERSION >= 11000 is false, version: %d, runtime: %d\r\n", CUDA_VERSION, (CUDA_VERSION >= 11000)); #endif
然后再运行(见以下的最小复现代码),发现得到的结果是:
/runonewhisper$ python3 bug_report.py CUDA_VERSION >= 11000 is false, version: 11020, runtime: 1
也就是说条件宏确实走的 false 分支,但是运行时的表达式又是 true。
感觉非常诡异。
import oneflow as torch audio = torch.randn(478214).to("cuda") N_FFT = 400 HOP_LENGTH = 160 window = torch.randn(400).to("cuda") stft = torch.stft(audio, N_FFT, HOP_LENGTH, window=window, return_complex=False)
(oneflow-dev-clang10-v2) yaochi@oneflow-22:~/runonewhisper$ python3 -m oneflow --doctor path: ['/home/yaochi/oneflow/python/oneflow'] version: 0.9.1+cu112.git.9ff1e1e7f2 git_commit: 9ff1e1e7f2 cmake_build_type: RelWithDebInfo rdma: False mlir: True
The text was updated successfully, but these errors were encountered:
https://github.com/Oneflow-Inc/oneflow/blob/master/oneflow/user/kernels/stft_kernel.cu#L17
CUDA_VERSION 是在cuda.h中定义的,只能在include cuda.h 之后使用
Sorry, something went wrong.
Fix stft not found (#9924)
a843da1
Fix #9922
Successfully merging a pull request may close this issue.
Summary
我发现 stft_kernel.cu 文件中的代码默认情况下不会被编译,因此怀疑是条件宏出了问题。
于是做了以下修改:doombeaker@1a96e88
然后再运行(见以下的最小复现代码),发现得到的结果是:
也就是说条件宏确实走的 false 分支,但是运行时的表达式又是 true。
感觉非常诡异。
Code to reproduce bug
System Information
The text was updated successfully, but these errors were encountered: