Skip to content

Fix bad code in c plus and python #11317

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

Merged
merged 4 commits into from
Jun 9, 2018

Conversation

guochaorong
Copy link
Contributor

I am wondering if the script python/paddle/fluid/layers/metric.py have been used so far. the ‘auc’ method in it seems does not work.

@guochaorong guochaorong requested a review from panyx0718 June 8, 2018 11:07
@guochaorong guochaorong changed the title Fix bad code in python Fix bad code in c plus and python Jun 8, 2018
@guochaorong
Copy link
Contributor Author

resolve issues:
#11257
#11256

@@ -130,8 +130,6 @@ void CUPTIAPI bufferRequested(uint8_t **buffer, size_t *size,
uint8_t *buf = reinterpret_cast<uint8_t *>(malloc(kBufSize + kAlignSize));
*size = kBufSize;
*buffer = ALIGN_BUFFER(buf, kAlignSize);
free(buf);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't notice that it was requesting a buffer.... and I found that has been freed through the cuptiActivityRegisterCallbacks , and finally freed at the end of bufferCompleted function.

Copy link
Contributor Author

@guochaorong guochaorong Jun 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a typical false alarm reported by cppcheck analysis tool.

@panyx0718
Copy link
Contributor

nice! We can discuss about this tool later.

@guochaorong guochaorong merged commit eced973 into PaddlePaddle:develop Jun 9, 2018
@guochaorong guochaorong deleted the fix_bad_code branch June 9, 2018 02:59
@guochaorong
Copy link
Contributor Author

Thank you. It's my pleasure to discuss it with you

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