Closed danijel3 closed 4 months ago
My quick and dirty solution was to temporarily add:
const float FLT_MAX=3.402823466e+38F;
at the start of cudadecoder/cuda-decoder-kernels.cu
, but it would nice to know what caused it. Is this something only on my Ubuntu machine or are there others facing the same problem?
inluding
On Thu, May 23, 2024 at 1:57 PM Danijel Koržinek @.***> wrote:
My quick and dirty solution was to temporarily add:
const float FLT_MAX=3.402823466e+38F;
at the start of cudadecoder/cuda-decoder-kernels.cu, but it would nice to know what caused it. Is this something only on my Ubuntu machine or are there others facing the same problem?
— Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/4914#issuecomment-2126927252, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUKYX7ZEWMBT6H4BRSUNBLZDXKRVAVCNFSM6AAAAABIFO7M2CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRWHEZDOMRVGI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Yeah we probably committed the sin of relying on things that are indirectly included. @danijel3 is there any chance you could commit a fix? It looks like we are supposed to
... I think your approach would cause a syntax error if float.h were included, as it's done via a define statement.
limits.h
unfortunately doesn't help and float.h
is already included, but doesn't work for some reason. I'll keep digging at it. It may be an installation issue or something, but I can at least figure it out in case it happens to someone else...
It would be fine to just replace FLT_MAX in the code with that constant, and put // FLT_MAX as a comment.
I confirmed the issue using a blank Ubuntu Docker image. From what I can see, it is related only to CUDA SDK (so the cu files) and not the standard C++ libs. The install uses the latest (as of now) version of the SDK from the NVidia repo on the Ubuntu 22.04:
deb [signed-by=/usr/share/keyrings/cuda-archive-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /
The PR above is harmless and hopefully sufficient. I've checked and it does resolve the issue.
Not sure if something hasn't changed recently, but seems something isn't letting cudadecoder compile properly:
My version of NVCC:
And g++:
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0