probability icon indicating copy to clipboard operation
probability copied to clipboard

Performance issue in discussion/turnkey_inference_candidate/window_tune_nuts_sampling.py

Open DLPerf opened this issue 2 years ago • 1 comments

Hello! Our static bug checker has found a performance issue in discussion/turnkey_inference_candidate/window_tune_nuts_sampling.py: Python type argument num_steps is passed to tf.function decorated function slow_adaptation_interval instead of tensors. As there is a for loop, every time the value changes, a new graph will be generated, and that can trigger tf.function retracing warning.

Here is the tensorflow document to support it.

Looking forward to your reply.

DLPerf avatar Feb 24 '23 07:02 DLPerf

I mean it should be a problem but doesn't matter much if rectifying is hard or may make the code more complex.

DLPerf avatar Mar 05 '23 14:03 DLPerf