Misaya.Z
Misaya.Z

Reputation: 165

how to use xla with c++ api in tensorflow

Tensorflow give a way to run tensorflow graph via XLA,however, it mention nothing about how to run tensorflow graph via XLA using c++ api. Counld someone give me some advise?

Upvotes: 1

Views: 1896

Answers (2)

zhuzilin
zhuzilin

Reputation: 327

The other answers so far are of AOT compilation, while I believe JIT is needed in most of times. XLA JIT can be turned on with environment variable. Try using TF_XLA_FLAGS="--tf_xla_auto_jit=1".

Upvotes: -1

鄭大大
鄭大大

Reputation: 221

The guide Using AOT compilation might not be very clear in each steps. You can try

  1. bazel build tensorflow/compiler/aot/tests:tfcompile_test

  2. bazel-bin/tensorflow/compiler/aot/tests/tfcompile_test

as an example.

Upvotes: 0

Related Questions