Page MenuHomePhabricator

AmirJamez (Amir)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 2 2020, 2:50 PM (8 w, 5 d)

Recent Activity

Oct 29 2020

AmirJamez added a comment to D81515: [llvm] Release-mode ML InlineAdvisor.

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?

Oct 29 2020, 8:14 AM · Restricted Project

Oct 22 2020

AmirJamez added a comment to D81515: [llvm] Release-mode ML InlineAdvisor.

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

Oct 22 2020, 10:15 PM · Restricted Project

Oct 21 2020

AmirJamez added a comment to D81515: [llvm] Release-mode ML InlineAdvisor.

Hi Mircea, Could you also provide the information on what specific tf-nightly, protobuf version did you guys use to save the two frozen models? Unfortunately, I don't seem to load the models using a number of tf-nighly versions and am receiving

google.protobuf.message.DecodeError: Error parsing message

After further investigations, I noticed this has been done using the new TF's SavedModel method and Keras : https://tensorflow.google.cn/tutorials/keras/save_and_load?hl=en#save_checkpoints_during_training

Oct 21 2020, 8:45 AM · Restricted Project