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

Compilation Warning Fixed #72

Open
wlt-cortex opened this issue Aug 18, 2020 · 0 comments
Open

Compilation Warning Fixed #72

wlt-cortex opened this issue Aug 18, 2020 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@wlt-cortex
Copy link
Member

The current cvm-runtime project has some warnings in compilation:

/home/serving/cvm-runtime/src/runtime/infer_attr.cc: In member function ‘int64_t cvm::runtime::CvmRuntime::GetOps()’:
/home/serving/cvm-runtime/src/runtime/infer_attr.cc:116:51: warning: ‘*((void*)& shape +8)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         base_ops = static_cast<int64_t>(shape[0]) * 20;
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/home/serving/cvm-runtime/src/runtime/infer_attr.cc:112:56: warning:*((void*)& weight_shp +16)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         base_ops = static_cast<int64_t>(weight_shp[1]) * 3; // MAX (1<<24) * 3 < 1G

That's because the TShape does not support the json array parse in graph_runtime.h, try to add the
extra TShape json handler parser like the partial template std::vector in file : include/utils/json.h:472.

@wlt-cortex wlt-cortex added the help wanted Extra attention is needed label Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant