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

Warnings and seg fault related to k2c_LeakyReLU #18

Open
zmoon opened this issue Oct 12, 2023 · 0 comments
Open

Warnings and seg fault related to k2c_LeakyReLU #18

zmoon opened this issue Oct 12, 2023 · 0 comments

Comments

@zmoon
Copy link

zmoon commented Oct 12, 2023

gcc -std=c99 -I./include/ -c -o fire_test.o fire_model.c -L./include/ -l:libkeras2c.a -lm
fire_model.c: In function ‘fire_model’:
fire_model.c:54402:15: warning: passing argument 1 of ‘k2c_LeakyReLU’ from incompatible pointer type [-Wincompatible-pointer-types]
54402 | k2c_LeakyReLU(&conv2d_output.array,&conv2d_output.numel,leaky_re_lu_alpha);
      |               ^~~~~~~~~~~~~~~~~~~~
      |               |
      |               float **
In file included from fire_model.c:3:
./include/k2c_include.h:37:28: note: expected ‘float *’ but argument is of type ‘float **’
   37 | void k2c_LeakyReLU(float * x, const size_t size, const float alpha);
      |                    ~~~~~~~~^
fire_model.c:54402:36: warning: passing argument 2 of ‘k2c_LeakyReLU’ makes integer from pointer without a cast [-Wint-conversion]
54402 | k2c_LeakyReLU(&conv2d_output.array,&conv2d_output.numel,leaky_re_lu_alpha);
      |                                    ^~~~~~~~~~~~~~~~~~~~
      |                                    |
      |                                    size_t * {aka long unsigned int *}
In file included from fire_model.c:3:
./include/k2c_include.h:37:44: note: expected ‘size_t’ {aka ‘const long unsigned int’} but argument is of type ‘size_t *’ {aka ‘long unsigned int *’}
   37 | void k2c_LeakyReLU(float * x, const size_t size, const float alpha);
      |                               ~~~~~~~~~~~~~^~~~
fire_model.c:54416:15: warning: passing argument 1 of ‘k2c_LeakyReLU’ from incompatible pointer type [-Wincompatible-pointer-types]
54416 | k2c_LeakyReLU(&conv2d_1_output.array,&conv2d_1_output.numel,leaky_re_lu_1_alpha);
      |               ^~~~~~~~~~~~~~~~~~~~~~
      |               |
      |               float **
In file included from fire_model.c:3:
./include/k2c_include.h:37:28: note: expected ‘float *’ but argument is of type ‘float **’
   37 | void k2c_LeakyReLU(float * x, const size_t size, const float alpha);
      |                    ~~~~~~~~^
fire_model.c:54416:38: warning: passing argument 2 of ‘k2c_LeakyReLU’ makes integer from pointer without a cast [-Wint-conversion]
54416 | k2c_LeakyReLU(&conv2d_1_output.array,&conv2d_1_output.numel,leaky_re_lu_1_alpha);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~
      |                                      |
      |                                      size_t * {aka long unsigned int *}
In file included from fire_model.c:3:
./include/k2c_include.h:37:44: note: expected ‘size_t’ {aka ‘const long unsigned int’} but argument is of type ‘size_t *’ {aka ‘long unsigned int *’}
   37 | void k2c_LeakyReLU(float * x, const size_t size, const float alpha);
      |                               ~~~~~~~~~~~~~^~~~
fire_model.c:54430:15: warning: passing argument 1 of ‘k2c_LeakyReLU’ from incompatible pointer type [-Wincompatible-pointer-types]
54430 | k2c_LeakyReLU(&conv2d_2_output.array,&conv2d_2_output.numel,leaky_re_lu_2_alpha);
      |               ^~~~~~~~~~~~~~~~~~~~~~
      |               |
      |               float **
In file included from fire_model.c:3:
./include/k2c_include.h:37:28: note: expected ‘float *’ but argument is of type ‘float **’
   37 | void k2c_LeakyReLU(float * x, const size_t size, const float alpha);
      |                    ~~~~~~~~^
fire_model.c:54430:38: warning: passing argument 2 of ‘k2c_LeakyReLU’ makes integer from pointer without a cast [-Wint-conversion]
54430 | k2c_LeakyReLU(&conv2d_2_output.array,&conv2d_2_output.numel,leaky_re_lu_2_alpha);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~
      |                                      |
      |                                      size_t * {aka long unsigned int *}
In file included from fire_model.c:3:
./include/k2c_include.h:37:44: note: expected ‘size_t’ {aka ‘const long unsigned int’} but argument is of type ‘size_t *’ {aka ‘long unsigned int *’}
   37 | void k2c_LeakyReLU(float * x, const size_t size, const float alpha);
      |                               ~~~~~~~~~~~~~^~~~
fire_model.c:54443:15: warning: passing argument 1 of ‘k2c_LeakyReLU’ from incompatible pointer type [-Wincompatible-pointer-types]
54443 | k2c_LeakyReLU(&dense_output.array,&dense_output.numel,leaky_re_lu_3_alpha);
      |               ^~~~~~~~~~~~~~~~~~~
      |               |
      |               float **
In file included from fire_model.c:3:
./include/k2c_include.h:37:28: note: expected ‘float *’ but argument is of type ‘float **’
   37 | void k2c_LeakyReLU(float * x, const size_t size, const float alpha);
      |                    ~~~~~~~~^
fire_model.c:54443:35: warning: passing argument 2 of ‘k2c_LeakyReLU’ makes integer from pointer without a cast [-Wint-conversion]
54443 | k2c_LeakyReLU(&dense_output.array,&dense_output.numel,leaky_re_lu_3_alpha);
      |                                   ^~~~~~~~~~~~~~~~~~~
      |                                   |
      |                                   size_t * {aka long unsigned int *}
In file included from fire_model.c:3:
./include/k2c_include.h:37:44: note: expected ‘size_t’ {aka ‘const long unsigned int’} but argument is of type ‘size_t *’ {aka ‘long unsigned int *’}
   37 | void k2c_LeakyReLU(float * x, const size_t size, const float alpha);
      |                               ~~~~~~~~~~~~~^~~~
fire_model.c:54459:15: warning: passing argument 1 of ‘k2c_LeakyReLU’ from incompatible pointer type [-Wincompatible-pointer-types]
54459 | k2c_LeakyReLU(&conv2d_3_output.array,&conv2d_3_output.numel,leaky_re_lu_4_alpha);
      |               ^~~~~~~~~~~~~~~~~~~~~~
      |               |
      |               float **
In file included from fire_model.c:3:
./include/k2c_include.h:37:28: note: expected ‘float *’ but argument is of type ‘float **’
   37 | void k2c_LeakyReLU(float * x, const size_t size, const float alpha);
      |                    ~~~~~~~~^
fire_model.c:54459:38: warning: passing argument 2 of ‘k2c_LeakyReLU’ makes integer from pointer without a cast [-Wint-conversion]
54459 | k2c_LeakyReLU(&conv2d_3_output.array,&conv2d_3_output.numel,leaky_re_lu_4_alpha);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~
      |                                      |
      |                                      size_t * {aka long unsigned int *}
In file included from fire_model.c:3:
./include/k2c_include.h:37:44: note: expected ‘size_t’ {aka ‘const long unsigned int’} but argument is of type ‘size_t *’ {aka ‘long unsigned int *’}
   37 | void k2c_LeakyReLU(float * x, const size_t size, const float alpha);
      |                               ~~~~~~~~~~~~~^~~~
fire_model.c:54470:15: warning: passing argument 1 of ‘k2c_LeakyReLU’ from incompatible pointer type [-Wincompatible-pointer-types]
54470 | k2c_LeakyReLU(&conv2d_4_output.array,&conv2d_4_output.numel,leaky_re_lu_5_alpha);
      |               ^~~~~~~~~~~~~~~~~~~~~~
      |               |
      |               float **
In file included from fire_model.c:3:
./include/k2c_include.h:37:28: note: expected ‘float *’ but argument is of type ‘float **’
   37 | void k2c_LeakyReLU(float * x, const size_t size, const float alpha);
      |                    ~~~~~~~~^
fire_model.c:54470:38: warning: passing argument 2 of ‘k2c_LeakyReLU’ makes integer from pointer without a cast [-Wint-conversion]
54470 | k2c_LeakyReLU(&conv2d_4_output.array,&conv2d_4_output.numel,leaky_re_lu_5_alpha);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~
      |                                      |
      |                                      size_t * {aka long unsigned int *}
In file included from fire_model.c:3:
./include/k2c_include.h:37:44: note: expected ‘size_t’ {aka ‘const long unsigned int’} but argument is of type ‘size_t *’ {aka ‘long unsigned int *’}
   37 | void k2c_LeakyReLU(float * x, const size_t size, const float alpha);
      |                               ~~~~~~~~~~~~~^~~~
fire_model.c:54481:15: warning: passing argument 1 of ‘k2c_LeakyReLU’ from incompatible pointer type [-Wincompatible-pointer-types]
54481 | k2c_LeakyReLU(&conv2d_5_output.array,&conv2d_5_output.numel,leaky_re_lu_6_alpha);
      |               ^~~~~~~~~~~~~~~~~~~~~~
      |               |
      |               float **
In file included from fire_model.c:3:
./include/k2c_include.h:37:28: note: expected ‘float *’ but argument is of type ‘float **’
   37 | void k2c_LeakyReLU(float * x, const size_t size, const float alpha);
      |                    ~~~~~~~~^
fire_model.c:54481:38: warning: passing argument 2 of ‘k2c_LeakyReLU’ makes integer from pointer without a cast [-Wint-conversion]
54481 | k2c_LeakyReLU(&conv2d_5_output.array,&conv2d_5_output.numel,leaky_re_lu_6_alpha);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~
      |                                      |
      |                                      size_t * {aka long unsigned int *}
In file included from fire_model.c:3:
./include/k2c_include.h:37:44: note: expected ‘size_t’ {aka ‘const long unsigned int’} but argument is of type ‘size_t *’ {aka ‘long unsigned int *’}
   37 | void k2c_LeakyReLU(float * x, const size_t size, const float alpha);
      |                               ~~~~~~~~~~~~~^~~~

(gdb) where
#0  0x0000000000403bf0 in k2c_LeakyReLU ()
#1  0x00000000004028b7 in fire_model (input_1_input=0x726cc0 <test1_input_1_input>, conv2d_6_output=0x728640 <c_conv2d_6_test1>) at fire_model.c:54402
#2  0x0000000000403183 in main () at fire_model_test_suite.c:41696

Using the master branch of keras2c.

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

No branches or pull requests

1 participant