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

Profiling benchmark_cnn.py using Callgrind #406

Open
ShreyaMaheshwari opened this issue Jul 30, 2019 · 1 comment
Open

Profiling benchmark_cnn.py using Callgrind #406

ShreyaMaheshwari opened this issue Jul 30, 2019 · 1 comment

Comments

@ShreyaMaheshwari
Copy link

ShreyaMaheshwari commented Jul 30, 2019

On profiling the basic classification code, given on the tensorflow website (https://www.tensorflow.org/tutorials/keras/basic_classification), using callgrind, I get multiple errors as the following.

brk segment overflow in thread #1: can't grow to 0x4a3c000 (with different addresses)

Even thought I get these errors, the python program runs along with the profiler and gives me a profile data file named callgrind.out.pid, where pid is the process id of the file being profiled.

On the other hand, when trying to profile the benchmark_cnn.py file, the same brk segment overflow error occurs mutliple times (as mentioned above). But after the program has finished execution, no callgrind.out.pid file is seen.

Another strange thing is that I have observed is that the basic classification code takes around 30 seconds to run without callgrind and about 15 minutes with callgrind. At the same time, the benchmark_cnn.py file runs in around 2.5 hours normally (without profiler), but while doing it with callgrind, it gives me the output in a few minutes.

Why is the program running only for a short period of time? Why is no callgrind.out.pid produced?

@reedwm
Copy link
Member

reedwm commented Jan 17, 2020

It looks this this error is fairly normal and does not indicate an issue in TensorFlow and tf_cnn_benchmarks.

I'm not familiar with callgrind so I'm not sure why there is no callgrind.out.pid. Perhaps callgrind can sometimes handle the segment overflow, but not always? As for why the command gives an output in a few minutes, are you sure the process is ending normally and not crashing?

A command to reproduce would be helpful, but I cannot guarentee I can help given that tf_cnn_benchmarks is unmaintained and I am not familiar with callgrind.

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

2 participants