New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bitcast errors for some tf.reduce_sum operations when using XLA #911
Comments
I think it may affect any # but can you reduce sum if no reshape is involved?
xf_r = tf.constant(np.random.randn(5,3), dtype=tf.float32)
@tf.function(experimental_compile=True)
def reducesum(x):
return tf.reduce_sum(x, axis=-1)
reducesum(xf_r) gives the same error:
|
I have done some additional digging for a range of ops that I normally use and conducted some simple tests. See the summary table below. A Pass value of 'Yes' means the XLA function ran with the correct result (it doesn't test speed or efficiency in any way). If it didn't run in XLA, a partial error is reported.
|
I can confirm that all tests listed above now pass (except unsupported ops- not surprising) with |
Same system setup and evironment as reported in #908. In summary, very basic tensorflow ops like
tf.reduce_sum
seem to fail in some instances with "Invalid bitcast" errors when using XLA.In #908, I reported an issue with bincount (also one concerning bitcast errors) that prevented XLA compilation of an expensive to calculate function. To workaround this issue, I have been playing with problems having identical numbers of rows in each bin so that the
tf.math.bincount
(andtf.math.segment_sum
which hasn't been implemented yet AFAIK) can be avoided. Some code generating toy data:Gives this result
For the purposes of exploring XLA, create two tf.functions one implementing XLA and one not:
Running the non-XLA one gives
And running the xla one:
fails with this error
The text was updated successfully, but these errors were encountered: