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

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 14:34:16 PDT 2020


mtrofin added a comment.

In D81515#2349037 <https://reviews.llvm.org/D81515#2349037>, @AmirJamez wrote:

> 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?

Historic reason - at the time we started upstreaming the work, the necessary changes to the pip package were not in the release package yet.

> (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 :)

Thanks for pointing it out - updated the script; one of the build bots was also having issues for this reason, must have been a recent change (or the bots weren't rebooted in a while)

> (3) I can confirm that I was able to generate logs and subsequently visualize the model with `tensorboard 2.3.0` and `tensorflow release 2.2.0` instead. Also, in pursuit of installing packages, I ran into:
>
>   tensorboard duplicate plugins for name projector
>
> which it turned out to be a common issue for tensorboard when there are multiple packages installed, as a result of trying tf.nightly with release. Removing duplicate tensorboard fixed the issue.

To confirm, now that we're using the release 2.3.0 tensorflow pip package, this shouldn't be an issue anymore, correct?

> (4) Will you also release training scripts for brewing `ir2native`  model as well here: https://github.com/google/ml-compiler-opt

IR2Native is used for RL training algorithms where we want partial rewards. That's what we initially did, but then we got better characteristics with training algorithms using just final reward (==the .text size in the native object). We abandoned for the short term the partial rewards training. We suspect it will start making sense again when we incorporate more global context than we currently do (currently, the global context is really thin - node/edge counts, uses, and a measure of the initial DAG position). So this is a long way of saying: we should probably yank out IR2Native right now, for code simplicity, but didn't get around to doing it.

> 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