Skip to content
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

Compiler Error and Minor Bug fix #870

Merged
merged 2 commits into from
May 13, 2024

Conversation

manickavela29
Copy link
Contributor

@manickavela29 manickavela29 commented May 13, 2024

Found 2 error

Not sure how these were missed/ why they are occurring now
I am on ubuntu machine with g++10 compiler

2 errors

  1. Obvious code bug, as Hypothesis class function is having Size() as method
  2. Suspecting that SHERPA_ONNX_LOG() function input format is SHERPA_ONNX_LOG(Type) << "";

Not sure if point 2 is valid though

1. /mnt/efs/manickavela/asr_work/trt/sherpa-onnx/sherpa-onnx/csrc/keyword-spotter-transducer-impl.h:310:33: error: ‘class sherpa_onnx::Hypotheses’ has no member named ‘size’; did you mean ‘Size’?
  310 |     SHERPA_ONNX_CHECK_EQ(r.hyps.size(), 1);
      |                                 ^~~~
/mnt/efs/manickavela/asr_work/trt/sherpa-onnx/sherpa-onnx/csrc/log.h:306:5: note: in definition of macro ‘_SHERPA_ONNX_CHECK_OP’
  306 |   ((x)op(y)) ? (void)0                                                         \
      |     ^
/mnt/efs/manickavela/asr_work/trt/sherpa-onnx/sherpa-onnx/csrc/audio-tagging-impl.cc: In static member function ‘static std::unique_ptr<sherpa_onnx::AudioTaggingImpl> sherpa_onnx::AudioTaggingImpl::Create(const sherpa_onnx::AudioTaggingConfig&)’:
/mnt/efs/manickavela/asr_work/trt/sherpa-onnx/sherpa-onnx/csrc/log.h:321:24: error: expected primary-expression before ‘(’ token
  321 |   ::sherpa_onnx::Logger(__FILE__, SHERPA_ONNX_FUNC, __LINE__, ::sherpa_onnx::x)
      |                        ^
/mnt/efs/manickavela/asr_work/trt/sherpa-onnx/sherpa-onnx/csrc/audio-tagging-impl.cc:28:3: note: in expansion of macro ‘SHERPA_ONNX_LOG’
   28 |   SHERPA_ONNX_LOG(
      |   ^~~~~~~~~~~~~~~
/mnt/efs/manickavela/asr_work/trt/sherpa-onnx/sherpa-onnx/csrc/audio-tagging-impl.cc:29:7: error: expected unqualified-id before string constant
   29 |       "Please specify an audio tagging model! Return a null pointer");
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/efs/manickavela/asr_work/trt/sherpa-onnx/sherpa-onnx/csrc/log.h:321:78: note: in definition of macro ‘SHERPA_ONNX_LOG’
  321 |   ::sherpa_onnx::Logger(__FILE__, SHERPA_ONNX_FUNC, __LINE__, ::sherpa_onnx::x)

manickavela29 and others added 2 commits May 13, 2024 09:34
Signed-off-by: manickavela1998@gmail.com <manickavela1998@gmail.com>
@manickavela29 manickavela29 changed the title Compile Erro and Minor Bug fix Compiler Error and Minor Bug fix May 13, 2024
@csukuangfj
Copy link
Collaborator

Thank you for your contribution!

I am wondering why it compiles locally and in GitHub actions.

@csukuangfj csukuangfj merged commit 740d7ae into k2-fsa:master May 13, 2024
167 of 199 checks passed
@manickavela29
Copy link
Contributor Author

yes, not sure what is causing this!
Thank you

@manickavela29 manickavela29 deleted the compiler_fix branch May 13, 2024 09:47
@manickavela29
Copy link
Contributor Author

I build this with SHERPA_ONNX_ENABLE_CHECK flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants