-
Notifications
You must be signed in to change notification settings - Fork 754
Fix building on GCC 14.2 #4163
New issue
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
Fix building on GCC 14.2 #4163
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/audio/4163
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 37e54d4 with merge base ad99271 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Hi @askmyteapot! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
pearu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Introducing compute_default may be unnecessary. Try using the following patch instead:
diff --git a/src/libtorchaudio/rnnt/cpu/compute.cpp b/src/libtorchaudio/rnnt/cpu/compute.cpp
index c8b0f473..a927b5ac 100644
--- a/src/libtorchaudio/rnnt/cpu/compute.cpp
+++ b/src/libtorchaudio/rnnt/cpu/compute.cpp
@@ -21,7 +21,7 @@ std::tuple<Tensor, Tensor> compute(
Tensor target_lengths,
int64_t blank,
double clamp,
- bool fused_log_softmax = true) {
+ bool fused_log_softmax) {
STD_TORCH_CHECK(logits.is_cpu(), "logits must be on CPU");
STD_TORCH_CHECK(
diff --git a/src/libtorchaudio/rnnt/gpu/compute.cu b/src/libtorchaudio/rnnt/gpu/compute.cu
index 03bad83b..7e99fec3 100644
--- a/src/libtorchaudio/rnnt/gpu/compute.cu
+++ b/src/libtorchaudio/rnnt/gpu/compute.cu
@@ -21,7 +21,7 @@ std::tuple<Tensor, Tensor> compute(
Tensor target_lengths,
int64_t blank,
double clamp,
- bool fused_log_softmax = true) {
+ bool fused_log_softmax) {
STD_TORCH_CHECK(logits.is_cuda(), "logits must be on CUDA");
STD_TORCH_CHECK(
Also, notice that build fails on compiling a .cu file so that the issue may not be related to GCC version. What is the output of nvcc --version?
nvcc: NVIDIA (R) Cuda compiler driver |
pearu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please apply the change to src/libtorchaudio/rnnt/cpu/compute.cpp as well. There is no reason to keep cpu and gpu compute signatures different.
|
Done. Apologies on the extra steps. Doing it remotely. |
pearu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Conforming that the issue exists when nvcc uses GCC version 14. Thanks, @askmyteapot!
This allows audio to build under GCC14.2
Fixes the below error: