[PATCH] D81515: [llvm] Release-mode ML InlineAdvisor

Amir via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 22:15:49 PDT 2020


AmirJamez added a comment.

In D81515#2345894 <https://reviews.llvm.org/D81515#2345894>, @gjain wrote:

> In D81515#2344814 <https://reviews.llvm.org/D81515#2344814>, @mtrofin wrote:
>
>> In D81515#2344805 <https://reviews.llvm.org/D81515#2344805>, @AmirJamez wrote:
>>
>>> Would you provide scripts to load the model and see the layers?
>>
>> Re. second question, visualization - this is a question for Yundi, Gaurav, or Eugene (they are the ML experts). I'll venture "tensorboard" as an answer, but I'll make sure they give the authoritative one in a moment.
>
> You should be able to use tensorboard but you need to first import the model into tensorboard with https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/import_pb_to_tensorboard.py. Something like `python import_pb_to_tensorboard.py --model_dir=llvm/lib/Analysis/models/inliner/ --log_dir=/tmp/inliner` should work. Then you'll be able to run tensorboard on the log_dir.
>
> Here's a hosted visualization from tensorboard for your convenience: https://tensorboard.dev/experiment/C45o0HjZTPGRSqpOrdkbeg/#graphs

Thanks. However, there are still a few problems here:

1. May I ask what was the reason behind using a `tf-nightly` rather than a TensorFlow release?
2. Tensorboard only comes with a release `TF` and not knowing the specific version, when I generate the log file using the helper script, I am running into this issue visualizing them on Tensorboard:

python3 import_pb_to_tensorboard.py --model_dir=./ir2native/ --log_dir=./log
[
tensorboard --logdir=./log

In D81515#2345894 <https://reviews.llvm.org/D81515#2345894>, @gjain wrote:

> In D81515#2344814 <https://reviews.llvm.org/D81515#2344814>, @mtrofin wrote:
>
>> In D81515#2344805 <https://reviews.llvm.org/D81515#2344805>, @AmirJamez wrote:
>>
>>> Would you provide scripts to load the model and see the layers?
>>
>> Re. second question, visualization - this is a question for Yundi, Gaurav, or Eugene (they are the ML experts). I'll venture "tensorboard" as an answer, but I'll make sure they give the authoritative one in a moment.
>
> You should be able to use tensorboard but you need to first import the model into tensorboard with https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/import_pb_to_tensorboard.py. Something like `python import_pb_to_tensorboard.py --model_dir=llvm/lib/Analysis/models/inliner/ --log_dir=/tmp/inliner` should work. Then you'll be able to run tensorboard on the log_dir.
>
> Here's a hosted visualization from tensorboard for your convenience: https://tensorboard.dev/experiment/C45o0HjZTPGRSqpOrdkbeg/#graphs

Thanks.

(1) May I ask what was the reason behind using a `tf-nighlty` rather than a `tensoflow` release? 
(2) tf.nighlty mentioned in https://github.com/google/ml-compiler-opt/blob/master/buildbot/buildbot_init.sh#L119 is no longer available in https://pypi.org/project/tf-nightly/#history :) 
(3) I can confirm that I was abale to generate logs and subsequently visualize the model with `tensorboard 2.3.0` and `tensorflow release 2.2.0` instead. 
(4) Will you also release training scripts for brewing `ir2native`  model as well here: https://github.com/google/ml-compiler-opt

Thanks,

- Amir


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81515/new/

https://reviews.llvm.org/D81515



More information about the llvm-commits mailing list