serizba / cppflow

Run TensorFlow models in C++ without installation and without Bazel
https://serizba.github.io/cppflow/
MIT License
779 stars 177 forks source link

Warnings generated on size_t values being passed into integer parameters. #183

Closed 8-byte closed 2 years ago

8-byte commented 2 years ago

This change uses dynamic cast operations to suppress the generation of warnings (539 total) where the TensorFlow C API expects an integer but a size_t is being passed in. This is important for build environments that are configured to treat warnings as errors.

serizba commented 2 years ago

Thanks!

serizba commented 2 years ago

@8-byte I just observed that the raw_ops.h file is modified, but not the generator. Could you also upload the changes of the generator.py file.

8-byte commented 2 years ago

@serizba I just pushed the changes to the generator file and initiated a new pull request for your review. Sorry, I did not realize before that the raw_ops file was being generated with a script (:O). After this change, the generated file compiles with no warnings and my test program works fine so I assume everything is fine. Please let me know if you have any questions or comments. Thanks!!!

serizba commented 2 years ago

@8-byte Yes, I saw it and I accepted it. Thanks for your work!

8-byte commented 2 years ago

Awesome! Thank YOU for this wonderful solution. :)

On Tue, Mar 29, 2022, 12:14 PM Sergio Izquierdo @.***> wrote:

@8-byte https://github.com/8-byte Yes, I saw it and I accepted it. Thanks for your work!

— Reply to this email directly, view it on GitHub https://github.com/serizba/cppflow/pull/183#issuecomment-1082080346, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYNFNR4FZ3WBANIFOHZ4UBDVCMT6DANCNFSM5R4HUSNQ . You are receiving this because you were mentioned.Message ID: @.***>