Skip to content

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

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