url
stringlengths
63
63
repository_url
stringclasses
1 value
labels_url
stringlengths
77
77
comments_url
stringlengths
72
72
events_url
stringlengths
70
70
html_url
stringlengths
51
53
id
int64
1.57B
2.35B
node_id
stringlengths
18
19
number
int64
59.5k
69.6k
title
stringlengths
1
554
user
dict
labels
listlengths
0
8
state
stringclasses
2 values
locked
bool
2 classes
assignee
dict
assignees
listlengths
0
8
milestone
null
comments
listlengths
0
30
created_at
timestamp[s]
updated_at
timestamp[s]
closed_at
timestamp[s]
author_association
stringclasses
4 values
active_lock_reason
stringclasses
3 values
draft
bool
2 classes
pull_request
dict
body
stringlengths
1
65.4k
reactions
dict
timeline_url
stringlengths
72
72
performed_via_github_app
null
state_reason
stringclasses
3 values
is_pull_request
bool
2 classes
https://api.github.com/repos/tensorflow/tensorflow/issues/62282
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62282/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62282/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62282/events
https://github.com/tensorflow/tensorflow/issues/62282
1,968,312,512
I_kwDOArmXAs51UhDA
62,282
Different Behavior of tf.raw_ops.Cos+tf.raw_ops.Selu with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "I was able to notice the difference in behavior, however as per the comment here https://github.com/tensorflow/tensorflow/issues/62287#issuecomment-1809045878, it is not considered as a bug, rather a difference in implementation is resulting in this.\r\nAttaching the Gist [here](https://colab.sandbox.google.com/gist/sachinprasadhs/f7f93940f7a76073bdbd64b489346e22/tf-raw_ops-cos-tf-raw_ops-selu.ipynb) for reference. ", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62282\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62282\">No</a>\n" ]
2023-10-30T13:04:58
2023-11-29T01:49:07
2023-11-29T01:49:02
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.Cos+tf.raw_ops.Selu** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a CPU device. The problem occurs when input Tensors pass through tf.raw_ops.Cos+tf.raw_ops.Selu. With individual Ops there is no issue. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.Cos(x=x, ) x = tf.raw_ops.Selu(features=x, ) return x m = Network() inp = { "x": tf.random.normal([10, 9, 8], dtype=tf.bfloat16), } with tf.device('/CPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/CPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 27, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 9, 8) dtype=float64) = ' 1.0390625, 0.7265625, 0.98046875, ... b'y (shape=(10, 9, 8) dtype=float64) = ' 1.0390625, 0.7265625, 0.98046875, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62282/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62282/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62281
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62281/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62281/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62281/events
https://github.com/tensorflow/tensorflow/issues/62281
1,968,309,615
I_kwDOArmXAs51UgVv
62,281
[RNN] TFLite converter segfaults with GRU models
{ "login": "CNugteren", "id": 1162108, "node_id": "MDQ6VXNlcjExNjIxMDg=", "avatar_url": "https://avatars.githubusercontent.com/u/1162108?v=4", "gravatar_id": "", "url": "https://api.github.com/users/CNugteren", "html_url": "https://github.com/CNugteren", "followers_url": "https://api.github.com/users/CNugteren/followers", "following_url": "https://api.github.com/users/CNugteren/following{/other_user}", "gists_url": "https://api.github.com/users/CNugteren/gists{/gist_id}", "starred_url": "https://api.github.com/users/CNugteren/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/CNugteren/subscriptions", "organizations_url": "https://api.github.com/users/CNugteren/orgs", "repos_url": "https://api.github.com/users/CNugteren/repos", "events_url": "https://api.github.com/users/CNugteren/events{/privacy}", "received_events_url": "https://api.github.com/users/CNugteren/received_events", "type": "User", "site_admin": false }
[ { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 750616506, "node_id": "MDU6TGFiZWw3NTA2MTY1MDY=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:lite", "name": "comp:lite", "color": "0052cc", "default": false, "description": "TF Lite related issues" }, { "id": 1315098405, "node_id": "MDU6TGFiZWwxMzE1MDk4NDA1", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/regression%20issue", "name": "regression issue", "color": "50bcc4", "default": false, "description": "To spot regression issues in latest version" }, { "id": 1463677878, "node_id": "MDU6TGFiZWwxNDYzNjc3ODc4", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:performance", "name": "type:performance", "color": "159b2e", "default": false, "description": "Performance Issue" }, { "id": 1661751498, "node_id": "MDU6TGFiZWwxNjYxNzUxNDk4", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TFLiteConverter", "name": "TFLiteConverter", "color": "bfdadc", "default": false, "description": "For issues related to TFLite converter" }, { "id": 2671351731, "node_id": "MDU6TGFiZWwyNjcxMzUxNzMx", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/ModelOptimizationToolkit", "name": "ModelOptimizationToolkit", "color": "BFD629", "default": false, "description": "TF Model Optimization Toolkit" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
open
false
{ "login": "abattery", "id": 3203059, "node_id": "MDQ6VXNlcjMyMDMwNTk=", "avatar_url": "https://avatars.githubusercontent.com/u/3203059?v=4", "gravatar_id": "", "url": "https://api.github.com/users/abattery", "html_url": "https://github.com/abattery", "followers_url": "https://api.github.com/users/abattery/followers", "following_url": "https://api.github.com/users/abattery/following{/other_user}", "gists_url": "https://api.github.com/users/abattery/gists{/gist_id}", "starred_url": "https://api.github.com/users/abattery/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/abattery/subscriptions", "organizations_url": "https://api.github.com/users/abattery/orgs", "repos_url": "https://api.github.com/users/abattery/repos", "events_url": "https://api.github.com/users/abattery/events{/privacy}", "received_events_url": "https://api.github.com/users/abattery/received_events", "type": "User", "site_admin": false }
[ { "login": "abattery", "id": 3203059, "node_id": "MDQ6VXNlcjMyMDMwNTk=", "avatar_url": "https://avatars.githubusercontent.com/u/3203059?v=4", "gravatar_id": "", "url": "https://api.github.com/users/abattery", "html_url": "https://github.com/abattery", "followers_url": "https://api.github.com/users/abattery/followers", "following_url": "https://api.github.com/users/abattery/following{/other_user}", "gists_url": "https://api.github.com/users/abattery/gists{/gist_id}", "starred_url": "https://api.github.com/users/abattery/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/abattery/subscriptions", "organizations_url": "https://api.github.com/users/abattery/orgs", "repos_url": "https://api.github.com/users/abattery/repos", "events_url": "https://api.github.com/users/abattery/events{/privacy}", "received_events_url": "https://api.github.com/users/abattery/received_events", "type": "User", "site_admin": false }, { "login": "pkgoogle", "id": 132095473, "node_id": "U_kgDOB9-d8Q", "avatar_url": "https://avatars.githubusercontent.com/u/132095473?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pkgoogle", "html_url": "https://github.com/pkgoogle", "followers_url": "https://api.github.com/users/pkgoogle/followers", "following_url": "https://api.github.com/users/pkgoogle/following{/other_user}", "gists_url": "https://api.github.com/users/pkgoogle/gists{/gist_id}", "starred_url": "https://api.github.com/users/pkgoogle/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pkgoogle/subscriptions", "organizations_url": "https://api.github.com/users/pkgoogle/orgs", "repos_url": "https://api.github.com/users/pkgoogle/repos", "events_url": "https://api.github.com/users/pkgoogle/events{/privacy}", "received_events_url": "https://api.github.com/users/pkgoogle/received_events", "type": "User", "site_admin": false } ]
null
[ "@CNugteren This issue might not be occurring in TF v2.13 or older but it is a known issue for TF v2.14. Could you try to use TFLite micro converter as it supports GRU models?\r\nThank you!", "> Could you try to use TFLite micro converter\r\n\r\nCould you elaborate what you mean with this and share a link to where I can find that? As far as I am aware, https://github.com/tensorflow/tflite-micro does not have a converter. In any case, that would be a workaround and does not solve the actual issue.", "@CNugteren Yes, it is a workaround and it doesn't solve the real issue.\r\n To use the TFLite Micro converter to convert a GRU model, you can use the following command:\r\n```\r\ntflite_convert --input_format=keras --output_format=tflite --target_spec=micro --enable_mlir_converter --saved_model_dir=my_model\r\n```\r\nThis will create a TFLite Micro model file that you can use on your embedded device.\r\n\r\n@pjpratik Could you please have a look at this issue and take it forward?\r\nThank you!", "I was able to reproduce the issue in TF 2.14 and nightly as well. Please find this [gist](https://colab.research.google.com/gist/pjpratik/5cff9875ce9ef8739f14ab24eac8081e/62281.ipynb).\r\n\r\nA similar issue is already being tracked in #61370 \r\n\r\n@pkgoogle Could you please look into this?\r\n\r\nThanks.", "I was able to replicate with the attached gist. @abattery, can you please take a look? Thanks.", "I could reproduce this with a small STFT layer.\r\n\r\nKeras model: [keras_stft.keras.zip](https://github.com/tensorflow/tensorflow/files/13843255/keras_stft.keras.zip)\r\nSavedModel: [keras_stft_tf.zip](https://github.com/tensorflow/tensorflow/files/13843261/keras_stft_tf.zip)\r\n\r\nI don't have the TF code to create said STFT, as it was converted from Torch via nobuco. However, when running `tflite_convert` in Tensorflow 2.15.0, I get the following errors:\r\n\r\n```\r\ntflite_convert --input_format=keras --output_format=tflite --enable_mlir_converter --saved_model_dir=./export/keras_stft_tf/ --output_file=./export/keras_stft_tfmicro.tflite\r\n2024-01-05 15:15:13.398031: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:378] Ignored output_format.\r\n2024-01-05 15:15:13.398046: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:381] Ignored drop_control_dependency.\r\n2024-01-05 15:15:13.398425: I tensorflow/cc/saved_model/reader.cc:83] Reading SavedModel from: ./export/keras_stft_tf/\r\n2024-01-05 15:15:13.398819: I tensorflow/cc/saved_model/reader.cc:51] Reading meta graph with tags { serve }\r\n2024-01-05 15:15:13.398827: I tensorflow/cc/saved_model/reader.cc:146] Reading SavedModel debug info (if present) from: ./export/keras_stft_tf/\r\n2024-01-05 15:15:13.399504: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:388] MLIR V1 optimization pass is not enabled\r\n2024-01-05 15:15:13.399787: I tensorflow/cc/saved_model/loader.cc:233] Restoring SavedModel bundle.\r\n2024-01-05 15:15:13.404777: I tensorflow/cc/saved_model/loader.cc:217] Running initialization op on SavedModel bundle at path: ./export/keras_stft_tf/\r\n2024-01-05 15:15:13.408131: I tensorflow/cc/saved_model/loader.cc:316] SavedModel load for tags { serve }; Status: success: OK. Took 9707 microseconds.\r\n2024-01-05 15:15:13.412411: I tensorflow/compiler/mlir/tensorflow/utils/dump_mlir_util.cc:269] disabling MLIR crash reproducer, set env var `MLIR_CRASH_REPRODUCER_DIRECTORY` to enable.\r\n2024-01-05 15:15:13.420106: E tensorflow/compiler/mlir/lite/stablehlo/transforms/op_stat_pass.cc:119] Unsupported data type.\r\n2024-01-05 15:15:13.420112: E tensorflow/compiler/mlir/lite/stablehlo/transforms/op_stat_pass.cc:119] Unsupported data type.\r\n2024-01-05 15:15:13.420115: E tensorflow/compiler/mlir/lite/stablehlo/transforms/op_stat_pass.cc:119] Unsupported data type.\r\nSummary on the non-converted ops:\r\n---------------------------------\r\n * Accepted dialects: tfl, builtin, func\r\n * Non-Converted Ops: 12, Total Ops 30, % non-converted = 40.00 %\r\n * 12 ARITH ops\r\n\r\n- arith.constant: 12 occurrences (f32: 1, i32: 11)\r\n\r\n\r\n\r\n (: 1)\r\n (f32: 2)\r\n (f32: 1)\r\n (f32: 1)\r\n (f32: 1)\r\n (f32: 1)\r\n (: 1, f32: 5)\r\n (: 1)\r\n (f32: 1)\r\n2024-01-05 15:15:13.420384: I tensorflow/compiler/mlir/lite/flatbuffer_export.cc:2989] Estimated count of arithmetic ops: 1.051 M ops, equivalently 0.525 M MACs\r\n```\r\n\r\nIt successfully converts without errors in Tensorflow 2.12.0.\r\n\r\nThis is just to say that this error is not limited to GRU models.", "Running into similar issues. Segfaults, while trying to convert an LSTM autoencoder model to tflite with representative dataset with `TFLITE_BUILTINS_INT8`. Was having a segfault on `2.14` and `2.15` and `nightly`. Issue is not present in `2.13`." ]
2023-10-30T13:03:22
2024-02-01T06:20:18
null
CONTRIBUTOR
null
null
null
### 1. System information - **OS Platform and Distribution** Tested both on x86 Ubuntu 22.04 and x86 macOS 13.6 - **TensorFlow installation:** From pip package - **TensorFlow library:** Occurs with TF 2.14, 2.15rc0 and tf-nightly ### 2. Code The following snippet segfaults with TF 2.14 or newer, but runs and works fine with TF 2.13: ```python import tensorflow as tf NUM_SAMPLES = 10 SAMPLE_SIZE = 64 def convert(model: tf.keras.Model, dataset_gen): converter = tf.lite.TFLiteConverter.from_keras_model(model) converter.optimizations = [tf.lite.Optimize.DEFAULT] converter.representative_dataset = dataset_gen converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8] converter.inference_input_type = tf.int8 converter.inference_output_type = tf.int8 return converter.convert() def gru_dataset(): for _ in range(100): shape = (1, NUM_SAMPLES, SAMPLE_SIZE) yield [tf.random.uniform(shape, minval=-1, maxval=1)] in_layer = tf.keras.layers.Input((NUM_SAMPLES, SAMPLE_SIZE), batch_size=1) out_layer = tf.keras.layers.GRU(units=16)(in_layer) gru_model = tf.keras.Model(in_layer, out_layer) int8_model = convert(gru_model, gru_dataset) ``` ### 3. Logs It runs and converts fine with `tensorflow-cpu==2.13.0`. With `tensorflow-cpu==2.14.0`: ``` 2023-10-30 13:52:41.063290: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. ~/venv/lib/python3.10/site-packages/tensorflow/lite/python/convert.py:947: UserWarning: Statistics for quantized inputs were expected, but not specified; continuing anyway. warnings.warn( 2023-10-30 13:52:44.353130: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:378] Ignored output_format. 2023-10-30 13:52:44.353146: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:381] Ignored drop_control_dependency. 2023-10-30 13:52:44.353537: I tensorflow/cc/saved_model/reader.cc:83] Reading SavedModel from: /tmp/tmpprk8uurf 2023-10-30 13:52:44.359495: I tensorflow/cc/saved_model/reader.cc:51] Reading meta graph with tags { serve } 2023-10-30 13:52:44.359516: I tensorflow/cc/saved_model/reader.cc:146] Reading SavedModel debug info (if present) from: /tmp/tmpprk8uurf 2023-10-30 13:52:44.372983: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:382] MLIR V1 optimization pass is not enabled 2023-10-30 13:52:44.376101: I tensorflow/cc/saved_model/loader.cc:233] Restoring SavedModel bundle. 2023-10-30 13:52:44.407856: I tensorflow/cc/saved_model/loader.cc:217] Running initialization op on SavedModel bundle at path: /tmp/tmpprk8uurf 2023-10-30 13:52:44.432972: I tensorflow/cc/saved_model/loader.cc:316] SavedModel load for tags { serve }; Status: success: OK. Took 79436 microseconds. 2023-10-30 13:52:44.550427: I tensorflow/compiler/mlir/lite/flatbuffer_export.cc:2245] Estimated count of arithmetic ops: 0.011 M ops, equivalently 0.005 M MACs Segmentation fault (core dumped) ``` With `tensorflow-cpu==2.15.0rc0`: ``` 2023-10-30 13:58:11.732055: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. ~/venv/lib/python3.10/site-packages/tensorflow/lite/python/convert.py:953: UserWarning: Statistics for quantized inputs were expected, but not specified; continuing anyway. warnings.warn( 2023-10-30 13:58:14.849958: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:378] Ignored output_format. 2023-10-30 13:58:14.849973: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:381] Ignored drop_control_dependency. 2023-10-30 13:58:14.850413: I tensorflow/cc/saved_model/reader.cc:83] Reading SavedModel from: /tmp/tmpx9tx89pf 2023-10-30 13:58:14.855818: I tensorflow/cc/saved_model/reader.cc:51] Reading meta graph with tags { serve } 2023-10-30 13:58:14.855848: I tensorflow/cc/saved_model/reader.cc:146] Reading SavedModel debug info (if present) from: /tmp/tmpx9tx89pf 2023-10-30 13:58:14.868133: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:388] MLIR V1 optimization pass is not enabled 2023-10-30 13:58:14.872102: I tensorflow/cc/saved_model/loader.cc:233] Restoring SavedModel bundle. 2023-10-30 13:58:14.905284: I tensorflow/cc/saved_model/loader.cc:217] Running initialization op on SavedModel bundle at path: /tmp/tmpx9tx89pf 2023-10-30 13:58:14.931276: I tensorflow/cc/saved_model/loader.cc:316] SavedModel load for tags { serve }; Status: success: OK. Took 80863 microseconds. Summary on the non-converted ops: --------------------------------- * Accepted dialects: tfl, builtin, func * Non-Converted Ops: 14, Total Ops 49, % non-converted = 28.57 % * 14 ARITH ops - arith.constant: 14 occurrences (f32: 5, i32: 9) (i1: 1, i32: 1) (f32: 4, i32: 2) (f32: 2) (f32: 1) (i1: 1) (f32: 2) (f32: 3) (f32: 2) (f32: 2) (f32: 1) (f32: 1) (f32: 1) (i32: 1) 2023-10-30 13:58:15.052025: I tensorflow/compiler/mlir/lite/flatbuffer_export.cc:2989] Estimated count of arithmetic ops: 0.011 M ops, equivalently 0.005 M MACs Segmentation fault (core dumped) ``` With `tf_nightly_cpu==2.16.0.dev20231026`: ``` 2023-10-30 13:42:25.667161: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. ~/venv/lib/python3.10/site-packages/tensorflow/lite/python/convert.py:953: UserWarning: Statistics for quantized inputs were expected, but not specified; continuing anyway. warnings.warn( 2023-10-30 13:42:27.079622: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:378] Ignored output_format. 2023-10-30 13:42:27.079636: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:381] Ignored drop_control_dependency. 2023-10-30 13:42:27.080066: I tensorflow/cc/saved_model/reader.cc:83] Reading SavedModel from: /tmp/tmpppmyiije 2023-10-30 13:42:27.080602: I tensorflow/cc/saved_model/reader.cc:51] Reading meta graph with tags { serve } 2023-10-30 13:42:27.080613: I tensorflow/cc/saved_model/reader.cc:146] Reading SavedModel debug info (if present) from: /tmp/tmpppmyiije 2023-10-30 13:42:27.082323: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:388] MLIR V1 optimization pass is not enabled 2023-10-30 13:42:27.082703: I tensorflow/cc/saved_model/loader.cc:233] Restoring SavedModel bundle. 2023-10-30 13:42:27.095715: I tensorflow/cc/saved_model/loader.cc:217] Running initialization op on SavedModel bundle at path: /tmp/tmpppmyiije 2023-10-30 13:42:27.103319: I tensorflow/cc/saved_model/loader.cc:316] SavedModel load for tags { serve }; Status: success: OK. Took 23253 microseconds. 2023-10-30 13:42:27.120091: I tensorflow/compiler/mlir/tensorflow/utils/dump_mlir_util.cc:269] disabling MLIR crash reproducer, set env var `MLIR_CRASH_REPRODUCER_DIRECTORY` to enable. loc(fused["ReadVariableOp:", callsite("functional_1_1/gru_1/while/gru_cell_1/ReadVariableOp@functional_1_1_gru_1_while_body_135"("scratch.py":23:1) at callsite("scratch.py":13:1 at callsite("~/venv/lib/python3.10/site-packages/tensorflow/lite/python/lite.py":1139:1 at callsite("~/venv/lib/python3.10/site-packages/tensorflow/lite/python/lite.py":1093:1 at callsite("~/venv/lib/python3.10/site-packages/tensorflow/lite/python/lite.py":1601:1 at callsite("~/venv/lib/python3.10/site-packages/tensorflow/lite/python/lite.py":1579:1 at callsite("~/venv/lib/python3.10/site-packages/tensorflow/lite/python/convert_phase.py":205:1 at callsite("~/venv/lib/python3.10/site-packages/tensorflow/lite/python/lite.py":1502:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/backend/tensorflow/layer.py":57:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/backend/tensorflow/layer.py":119:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py":118:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/layers/layer.py":830:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py":118:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/ops/operation.py":42:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py":157:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/models/functional.py":188:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/ops/function.py":140:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/models/functional.py":574:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py":118:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/layers/layer.py":830:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py":118:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/ops/operation.py":42:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py":157:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/layers/rnn/gru.py":559:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/layers/rnn/rnn.py":397:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/layers/rnn/gru.py":554:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/layers/rnn/rnn.py":339:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/backend/tensorflow/rnn.py":423:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/backend/tensorflow/rnn.py":408:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/layers/rnn/rnn.py":331:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py":118:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/layers/layer.py":830:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py":118:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/ops/operation.py":42:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py":157:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/layers/rnn/gru.py":194:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/ops/numpy.py":4654:1 at callsite("~/venv/lib/python3.10/site-packages/keras/src/backend/tensorflow/numpy.py":1057:1 at "~/venv/lib/python3.10/site-packages/keras/src/backend/tensorflow/core.py":49:1))))))))))))))))))))))))))))))))))))))]): error: missing attribute 'value' LLVM ERROR: Failed to infer result type(s). Aborted (core dumped) ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62281/reactions", "total_count": 3, "+1": 3, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62281/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62280
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62280/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62280/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62280/events
https://github.com/tensorflow/tensorflow/issues/62280
1,968,302,230
I_kwDOArmXAs51UeiW
62,280
Different Behavior of tf.raw_ops.Acos with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 1133285679, "node_id": "MDU6TGFiZWwxMTMzMjg1Njc5", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:xla", "name": "comp:xla", "color": "0052cc", "default": false, "description": "XLA" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
open
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @**zoux1a ,**\r\n\r\nI have replicated the reported behaviour with jit_compile=True and with jit_compile = False as well. It works with jit_compile=False. I attached a [gist](https://colab.research.google.com/gist/Venkat6871/64a54987d4df72b511db65d2b9bc71bd/62280_gpu-214-v.ipynb) for your reference.\r\n\r\nThank you!", "It seems this bug is about Acos? At least the reproducer is for Acos.", "Hi @zoux1a , @akuegel \r\n\r\nThe results with `jit_compile` and without `jit_compile` seems differing more than 100% and even increase if the value of input increases if we calculate like `[(res_xla-res_eager)/res_xla]` . The difference seems large for me as it is not just precision difference.\r\n\r\nAttaching [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/46fa1bc78ccc81c4d3ed109fb5565d12/62280_r1.ipynb#scrollTo=UfbnkQyT6ur-) for my exercise on this.", "Can the title and the bug description please be adjusted to *Acos* instead of *Asin*? All the reproducers I saw here are for Acos, so it seems this is what the bug is about?" ]
2023-10-30T12:59:35
2023-12-06T09:07:28
null
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.Acos** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **GPU** device. ### Standalone code to reproduce the issue ```shell I can reproduce this issue on colab: https://colab.research.google.com/drive/1SJWDSLO8pIIVYfZYv1M8gFaUiOyX--MI?usp=sharing ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 50, in <module> tf.debugging.assert_near(no_op_res, op_res, atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float32), atol = tf.Tensor(0.001, shape=(), dtype=float32)' b'x (shape=(10, 9) dtype=complex64) = ' (2.0430856-14.103499j), (2.0611959+14.493816j), (2.392881+13.213637j), ... b'y (shape=(10, 9) dtype=complex64) = ' (2.0430856-14.103499j), 3.465736j, 4.158883j, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62280/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62280/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62279
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62279/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62279/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62279/events
https://github.com/tensorflow/tensorflow/issues/62279
1,968,264,650
I_kwDOArmXAs51UVXK
62,279
Different Behavior of tf.raw_ops.Cos+tf.raw_ops.Square with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false }
[ { "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false } ]
null
[ "@zoux1a,\r\n This is likely due to fusion, where the intermediate result may be computed and kept in float32 in the case of jit-compilation, whereas without fusion it would cast to bfloat16 between the ops and produce a less precise answer. Still, both are correct.", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62279\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62279\">No</a>\n", "Hi,\r\n\r\nI see it fails in both **jit_compile = True** and **jit_compile = False** on GPU, since it invloves random values as an input, results are not guaranteed to match in both the scenarios.\r\nHere is the attached [Gist](https://colab.research.google.com/gist/tilakrayal/616308fba879567a81fe3e4ca91ec259/untitled.ipynb) for reference.", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "Hi @tilakrayal , please feel free to close this issue. thanks for your information.", "As mentioned above, closing the issue as it has been resolved. Thank you!", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62279\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62279\">No</a>\n" ]
2023-10-30T12:41:45
2024-02-01T05:36:16
2024-02-01T05:36:12
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.Cos+tf.raw_ops.Square** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **GPU** device. The problem occurs when input Tensors pass through raw_ops.Cos and raw_ops.Square. With individual Ops there is no issue. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.Cos(x=x, ) x = tf.raw_ops.Square(x=x, ) return x m = Network() inp = { "x": tf.random.normal([10, 9], dtype=tf.bfloat16), } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 27, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 9) dtype=float64) = ' 0.1396484375, 0.66015625, 0.064453125, ... b'y (shape=(10, 9) dtype=float64) = ' 0.1396484375, 0.65625, 0.06494140625, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62279/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62279/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62278
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62278/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62278/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62278/events
https://github.com/tensorflow/tensorflow/issues/62278
1,968,239,994
I_kwDOArmXAs51UPV6
62,278
Different Behavior of tf.raw_ops.IgammaGradA
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "I observe similar result in both `jit_compile = True` and `jit_compile = False`, since when compiling with `JIT` takes different code path and involves `fusion` operation and `casting` `dtype` to specific `dtype`, based on all these conditions, you can't expect the same result with `JIT` and without `JIT`.\r\nAttaching the Gist [here](https://colab.sandbox.google.com/gist/sachinprasadhs/1f64cb8c1d286ba5de2a240ff915f5d9/-tf-raw_ops-igammagrada.ipynb) for comparison. Thanks!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62278\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62278\">No</a>\n" ]
2023-10-30T12:28:52
2023-11-29T01:49:11
2023-11-29T01:49:04
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.IgammaGradA** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **CPU** device. ### Standalone code to reproduce the issue ```shell #this issue is about tf.raw_ops.IgammaGradA import tensorflow as tf import traceback def replace_special_values(tensor): # Convert tensor to tf.float32 if it's not a supported dtype supported_dtypes = [tf.float16, tf.float32, tf.float64, tf.bfloat16] if tensor.dtype not in supported_dtypes: original_dtype = tensor.dtype tensor = tf.cast(tensor, tf.float32) else : original_dtype = None # Replace NaNs with zeros tensor = tf.where(tf.math.is_nan(tensor), tf.zeros_like(tensor), tensor) # Replace positive infinities with a large number (e.g., 1e30) tensor = tf.where(tf.math.is_inf(tensor), 100, tensor) # Replace negative infinities with a small number (e.g., -1e30) tensor = tf.where(tf.math.is_inf(tensor) & tf.math.less(tensor, 0), -100, tensor) # Convert tensor back to its original dtype if original_dtype is not None : tensor = tf.cast(tensor, original_dtype) return tensor class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.IgammaGradA(x=x, a=tf.random.normal([1, 3, 6, 6, 1, 4, 6, 2, 1, 1], dtype=tf.float32)) return x is_valid = True inf = float('inf') m = Network() inp = { "x": tf.random.normal([10, 9], dtype=tf.float32), } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) try : no_op_res = m(**inp) except : print(traceback.format_exc()) # Generated ops in forward is invalid, generated code is invalid. is_valid=False if is_valid : tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) if isinstance(no_op_res, tf.Tensor) and isinstance(op_res, tf.Tensor) : no_op_res = replace_special_values(no_op_res) op_res = replace_special_values(op_res) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) print("no_error") ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 60, in <module> tf.debugging.assert_near(no_op_res, op_res, atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float32), atol = tf.Tensor(0.001, shape=(), dtype=float32)' b'x (shape=(1, 3, 6, 6, 1, 4, 6, 2, 10, 9) dtype=float32) = ' 0.0, 0.0, 0.0, ... b'y (shape=(1, 3, 6, 6, 1, 4, 6, 2, 10, 9) dtype=float32) = ' 0.0, 0.0, 0.0, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62278/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62278/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62277
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62277/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62277/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62277/events
https://github.com/tensorflow/tensorflow/issues/62277
1,968,204,801
I_kwDOArmXAs51UGwB
62,277
Different Behavior of tf.raw_ops.Asin with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi, @zoux1a! \r\nI was able to replicate the issue reported here with JIT compilation enabled (jit_compile=True) but didn't face any issue with (jit_compile=False) and after commenting out tf.config.run_functions_eagerly(False). Please find the attached [gist](https://colab.research.google.com/gist/sushreebarsa/2e59f4d886ee959c228bdf3dd4d51a9d/asin.ipynb#scrollTo=f45-JnMr2Vw7). Thank you!", "Hi, @sushreebarsa \r\nHowever, we think the different behaviors between `eagermode` and `jit_compile=True` mode should be corrected in the future. What is your opinion on this matter?", "The code is failing with the condition of `rtol` and `atol=0.001` when` jit_compile = True` and does not fail when `jit_compile = False`.\r\n The difference in behavior is not a bug rather it is when compiling with `JIT` it takes different code path and involves `fusion` operation and casting `dtype` to specific `dtype`, based on all these conditions, you can't expect the same result with `JIT` and without `JIT`.\r\nAttaching the Gist [here](https://colab.sandbox.google.com/gist/sachinprasadhs/4463346fb30ddbdbe0669e7852b58a26/tf-raw_ops-asin.ipynb) for comparison. Thanks!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62277\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62277\">No</a>\n" ]
2023-10-30T12:12:34
2023-11-29T01:49:14
2023-11-29T01:49:05
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.Asin** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **CPU** device. ### Standalone code to reproduce the issue ```shell i can reproduce this issue on colab: https://colab.research.google.com/drive/1htnUG-v-3av_ZAQg8KPm05aSfTnKwi2j?usp=sharing ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 27, in <module> tf.debugging.assert_near(no_op_res, op_res, atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float32), atol = tf.Tensor(0.001, shape=(), dtype=float32)' b'x (shape=(6, 9, 7, 2, 1) dtype=complex64) = ' (-0.35167462-13.58743j), (-0.35001186-13.258179j), (-0.9673807-14.284173j), ... b'y (shape=(6, 9, 7, 2, 1) dtype=complex64) = ' (-0.33401474-13.561536j), (-0.35795882-13.256111j), (-1.0240958-14.297717j), ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62277/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62277/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62276
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62276/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62276/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62276/events
https://github.com/tensorflow/tensorflow/issues/62276
1,968,184,448
I_kwDOArmXAs51UByA
62,276
Different Behavior of tf.raw_ops.BatchMatMulV2+tf.raw_ops.Sin with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 2691123225, "node_id": "MDU6TGFiZWwyNjkxMTIzMjI1", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:tf.function", "name": "comp:tf.function", "color": "0052cc", "default": false, "description": "tf.function related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi, **@zoux1a!**\r\nI was able to replicate this issue with jit_compile=True and jit_compile=False too.Here I attached a\r\n[gist](https://colab.research.google.com/gist/Venkat6871/e16dd00de9045e7981ca411a9d22a9a1/62276_gpu_tf-2-14-v-nightly.ipynb) here.\r\n\r\nThank you!", "It seems the behaviour occurs with both `jit_compile=True` and` jit_compile=False`. Might be related to `tf.function` component.", "Hi @zoux1a ,\r\n\r\nI noticed an issue here.\r\n\r\nInside the call function you are generating the value for `y`, which in each calls generates different random values which makes the output different for obvious reason.\r\n\r\nI have done the changes to shift `y` to outside the call function to ensure same inputs. I ran 10 experiments with different inputs of `x` & `y` and printed the `reduce_sum` results of `no_op_res` and `op_res` which outputs almost same results with minor precision changes which is expected with XLA compilation. \r\n\r\nPlease refer attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/e429d7b42b664cc4d5788a5ebe06355c/62294_final.ipynb) for the experiments.", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62276\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62276\">No</a>\n" ]
2023-10-30T12:02:51
2023-12-29T01:46:14
2023-12-29T01:46:10
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.BatchMatMulV2+tf.raw_ops.Sin** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **GPU** device. The problem occurs when input Tensors pass through raw_ops.BatchMatMulV2 and raw_ops.Sin. With individual Ops there is no issue. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.BatchMatMulV2(x=x, adj_x=False,adj_y=False,y=tf.random.normal([7, 8, 8, 8, 8, 2], dtype=tf.float32)) x = tf.raw_ops.Sin(x=x, ) return x m = Network() inp = { "x": tf.random.normal([7, 8], dtype=tf.float32), } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 27, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(7, 8, 8, 8, 7, 2) dtype=float64) = ' -0.999790608882904, -0.24259799718856812, -0.9164532423019409, ... b'y (shape=(7, 8, 8, 8, 7, 2) dtype=float64) = ' -0.8664708733558655, 0.15172512829303741, -0.12566372752189636, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62276/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62276/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62275
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62275/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62275/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62275/events
https://github.com/tensorflow/tensorflow/issues/62275
1,968,157,649
I_kwDOArmXAs51T7PR
62,275
Different Behavior of tf.raw_ops.SqrtGrad with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" } ]
closed
false
{ "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false }
[ { "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false } ]
null
[ "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62275\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62275\">No</a>\n" ]
2023-10-30T11:50:13
2023-10-30T11:52:43
2023-10-30T11:52:41
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.SqrtGrad** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **CPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): real_part = tf.random.normal([], dtype=tf.float64) imag_part = tf.random.normal([], dtype=tf.float64) tensor = tf.complex(real_part, imag_part) tensor = tf.cast(tensor,dtype=tf.complex128) x = tf.raw_ops.SqrtGrad(dy=x, y=tensor) return x m = Network() real_part = tf.random.normal([], dtype=tf.float64) imag_part = tf.random.normal([], dtype=tf.float64) tensor = tf.complex(real_part, imag_part) tensor = tf.cast(tensor,dtype=tf.complex128) inp = { "x": tensor, } with tf.device('/CPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/CPU:0'): op_res = m(**inp) tf.debugging.assert_near(no_op_res, op_res, atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 33, in <module> tf.debugging.assert_near(no_op_res, op_res, atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=() dtype=complex128) = ' (-0.20583126869122956-0.1606528338452279j) b'y (shape=() dtype=complex128) = ' (0.2721269549260611+0.24474350338228776j) ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62275/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62275/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62274
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62274/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62274/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62274/events
https://github.com/tensorflow/tensorflow/issues/62274
1,967,891,498
I_kwDOArmXAs51S6Qq
62,274
tflite_micro / segmentation fault(core dump) while access InputTensor
{ "login": "hammnii-study", "id": 143974454, "node_id": "U_kgDOCJTgNg", "avatar_url": "https://avatars.githubusercontent.com/u/143974454?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hammnii-study", "html_url": "https://github.com/hammnii-study", "followers_url": "https://api.github.com/users/hammnii-study/followers", "following_url": "https://api.github.com/users/hammnii-study/following{/other_user}", "gists_url": "https://api.github.com/users/hammnii-study/gists{/gist_id}", "starred_url": "https://api.github.com/users/hammnii-study/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hammnii-study/subscriptions", "organizations_url": "https://api.github.com/users/hammnii-study/orgs", "repos_url": "https://api.github.com/users/hammnii-study/repos", "events_url": "https://api.github.com/users/hammnii-study/events{/privacy}", "received_events_url": "https://api.github.com/users/hammnii-study/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 750616506, "node_id": "MDU6TGFiZWw3NTA2MTY1MDY=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:lite", "name": "comp:lite", "color": "0052cc", "default": false, "description": "TF Lite related issues" }, { "id": 1589976566, "node_id": "MDU6TGFiZWwxNTg5OTc2NTY2", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:micro", "name": "comp:micro", "color": "3e2eea", "default": false, "description": "Related to TensorFlow Lite Microcontrollers" }, { "id": 3797168204, "node_id": "LA_kwDOArmXAs7iVDBM", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF%202.8", "name": "TF 2.8", "color": "5DC9D0", "default": false, "description": "" } ]
closed
false
{ "login": "pjpratik", "id": 118897289, "node_id": "U_kgDOBxY6iQ", "avatar_url": "https://avatars.githubusercontent.com/u/118897289?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pjpratik", "html_url": "https://github.com/pjpratik", "followers_url": "https://api.github.com/users/pjpratik/followers", "following_url": "https://api.github.com/users/pjpratik/following{/other_user}", "gists_url": "https://api.github.com/users/pjpratik/gists{/gist_id}", "starred_url": "https://api.github.com/users/pjpratik/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pjpratik/subscriptions", "organizations_url": "https://api.github.com/users/pjpratik/orgs", "repos_url": "https://api.github.com/users/pjpratik/repos", "events_url": "https://api.github.com/users/pjpratik/events{/privacy}", "received_events_url": "https://api.github.com/users/pjpratik/received_events", "type": "User", "site_admin": false }
[ { "login": "pjpratik", "id": 118897289, "node_id": "U_kgDOBxY6iQ", "avatar_url": "https://avatars.githubusercontent.com/u/118897289?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pjpratik", "html_url": "https://github.com/pjpratik", "followers_url": "https://api.github.com/users/pjpratik/followers", "following_url": "https://api.github.com/users/pjpratik/following{/other_user}", "gists_url": "https://api.github.com/users/pjpratik/gists{/gist_id}", "starred_url": "https://api.github.com/users/pjpratik/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pjpratik/subscriptions", "organizations_url": "https://api.github.com/users/pjpratik/orgs", "repos_url": "https://api.github.com/users/pjpratik/repos", "events_url": "https://api.github.com/users/pjpratik/events{/privacy}", "received_events_url": "https://api.github.com/users/pjpratik/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @hammnii-study \r\n\r\nCan you please try with latest TF2.14? Also, if you could provide a toy tflite model, that would help us understand the issue better.\r\n\r\nPlease check your memory on the device and modify the model before converting into TFLite accordingly.\r\n\r\nThanks.\r\n", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62274\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62274\">No</a>\n" ]
2023-10-30T09:24:12
2023-11-21T01:50:49
2023-11-21T01:50:46
NONE
null
null
null
### Issue type Support ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.8 ### Custom code Yes ### OS platform and distribution linux ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version VERSION 2.8.12 CMAKE_CXX_STANDARD 17 ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? When I run this code, I get a segmentation error . When I output the print statement in the middle, everything comes out normally. `TfLiteStatus allocate_status = tflInterpreter->AllocateTensors(); if (allocate_status != kTfLiteOk) { printf("TfLiteInterpreter initialization failed with error code: %d\n", allocate_status); } else { printf("TfLiteInterpreter initialized successfully.\n"); } tflOutputTensor = tflInterpreter->output(0); tflInputTensor = tflInterpreter->input(0); if (tflOutputTensor == nullptr || tflInputTensor == nullptr) { printf("Failed to allocate input or output tensors.\n"); } else { printf("allocate successfully.\n"); } it5 = listAccX.begin(); it6 = listAccY.begin(); it7 = listAccZ.begin(); it8 = listGyroX.begin(); it9 = listGyroY.begin(); it10 = listGyroZ.begin(); printf("%d\n", listAccX.size()); for (int g = 0; it5 != listAccX.end(); ++it5, ++it6, ++it7, ++it8, ++it9, ++it10) { printf("%f\n", *it5); tflInputTensor->data.f[g * 6 + 0] = (*it5); printf("%f\n", *it6); tflInputTensor->data.f[g * 6 + 1] = (*it6); tflInputTensor->data.f[g * 6 + 2] = (*it7); tflInputTensor->data.f[g * 6 + 3] = (*it8); tflInputTensor->data.f[g * 6 + 4] = (*it9); tflInputTensor->data.f[g * 6 + 5] = (*it10); g++; } ` ### Standalone code to reproduce the issue ```shell TfLiteInterpreter initialized successfully. allocate successfully. 25 1.525879 segmentation fault (core dump) ``` ### Relevant log output _No response_
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62274/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62274/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62273
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62273/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62273/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62273/events
https://github.com/tensorflow/tensorflow/pull/62273
1,967,476,092
PR_kwDOArmXAs5eEqY3
62,273
Update BUILD
{ "login": "Anil9703", "id": 105957856, "node_id": "U_kgDOBlDJ4A", "avatar_url": "https://avatars.githubusercontent.com/u/105957856?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Anil9703", "html_url": "https://github.com/Anil9703", "followers_url": "https://api.github.com/users/Anil9703/followers", "following_url": "https://api.github.com/users/Anil9703/following{/other_user}", "gists_url": "https://api.github.com/users/Anil9703/gists{/gist_id}", "starred_url": "https://api.github.com/users/Anil9703/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Anil9703/subscriptions", "organizations_url": "https://api.github.com/users/Anil9703/orgs", "repos_url": "https://api.github.com/users/Anil9703/repos", "events_url": "https://api.github.com/users/Anil9703/events{/privacy}", "received_events_url": "https://api.github.com/users/Anil9703/received_events", "type": "User", "site_admin": false }
[ { "id": 1169364259, "node_id": "MDU6TGFiZWwxMTY5MzY0MjU5", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/size:XS", "name": "size:XS", "color": "adafea", "default": false, "description": "CL Change Size: Extra Small" }, { "id": 1593512946, "node_id": "MDU6TGFiZWwxNTkzNTEyOTQ2", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/invalid", "name": "invalid", "color": "db6f57", "default": true, "description": "Hacktoberfest spam PR" } ]
closed
false
{ "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false }
[ { "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false } ]
null
[ "Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).\n\nView this [failed invocation](https://github.com/tensorflow/tensorflow/pull/62273/checks?check_run_id=18170255296) of the CLA check for more information.\n\nFor the most up to date status, view the checks section at the bottom of the pull request.", "Hi @Anil9703 Can you please sign CLA. Thank you!", "> Contributor\r\nI have signed CLA just now\r\n", "Hi @Anil9703, Please submit multiple typo fixes in a single PR as the CPU/GPU hours are wasted on CI. \r\nHence, we do not encourage one liner grammatical changes as it is an expensive process. Thank you for your contribution!" ]
2023-10-30T04:30:15
2023-10-31T19:52:51
2023-10-30T05:36:10
NONE
null
false
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/pulls/62273", "html_url": "https://github.com/tensorflow/tensorflow/pull/62273", "diff_url": "https://github.com/tensorflow/tensorflow/pull/62273.diff", "patch_url": "https://github.com/tensorflow/tensorflow/pull/62273.patch", "merged_at": null }
I think that their might be a punctual error in using comma in line19
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62273/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62273/timeline
null
null
true
https://api.github.com/repos/tensorflow/tensorflow/issues/62272
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62272/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62272/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62272/events
https://github.com/tensorflow/tensorflow/issues/62272
1,967,327,803
I_kwDOArmXAs51Qwo7
62,272
tensorflowlite build error about fatal error C1001:Internal compiler error for O2 option
{ "login": "leizhu1989", "id": 35773005, "node_id": "MDQ6VXNlcjM1NzczMDA1", "avatar_url": "https://avatars.githubusercontent.com/u/35773005?v=4", "gravatar_id": "", "url": "https://api.github.com/users/leizhu1989", "html_url": "https://github.com/leizhu1989", "followers_url": "https://api.github.com/users/leizhu1989/followers", "following_url": "https://api.github.com/users/leizhu1989/following{/other_user}", "gists_url": "https://api.github.com/users/leizhu1989/gists{/gist_id}", "starred_url": "https://api.github.com/users/leizhu1989/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/leizhu1989/subscriptions", "organizations_url": "https://api.github.com/users/leizhu1989/orgs", "repos_url": "https://api.github.com/users/leizhu1989/repos", "events_url": "https://api.github.com/users/leizhu1989/events{/privacy}", "received_events_url": "https://api.github.com/users/leizhu1989/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473173351, "node_id": "MDU6TGFiZWw0NzMxNzMzNTE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:build/install", "name": "type:build/install", "color": "159b2e", "default": false, "description": "Build and install issues" }, { "id": 473184161, "node_id": "MDU6TGFiZWw0NzMxODQxNjE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:support", "name": "type:support", "color": "159b2e", "default": false, "description": "Support issues" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 750616506, "node_id": "MDU6TGFiZWw3NTA2MTY1MDY=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:lite", "name": "comp:lite", "color": "0052cc", "default": false, "description": "TF Lite related issues" }, { "id": 1188421838, "node_id": "MDU6TGFiZWwxMTg4NDIxODM4", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/subtype:windows", "name": "subtype:windows", "color": "b619ea", "default": false, "description": "Windows Build/Installation Issues" }, { "id": 5206407904, "node_id": "LA_kwDOArmXAs8AAAABNlN64A", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF%202.12", "name": "TF 2.12", "color": "c5def5", "default": false, "description": "For issues related to Tensorflow 2.12" } ]
closed
false
{ "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false }
[ { "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false }, { "login": "pkgoogle", "id": 132095473, "node_id": "U_kgDOB9-d8Q", "avatar_url": "https://avatars.githubusercontent.com/u/132095473?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pkgoogle", "html_url": "https://github.com/pkgoogle", "followers_url": "https://api.github.com/users/pkgoogle/followers", "following_url": "https://api.github.com/users/pkgoogle/following{/other_user}", "gists_url": "https://api.github.com/users/pkgoogle/gists{/gist_id}", "starred_url": "https://api.github.com/users/pkgoogle/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pkgoogle/subscriptions", "organizations_url": "https://api.github.com/users/pkgoogle/orgs", "repos_url": "https://api.github.com/users/pkgoogle/repos", "events_url": "https://api.github.com/users/pkgoogle/events{/privacy}", "received_events_url": "https://api.github.com/users/pkgoogle/received_events", "type": "User", "site_admin": false } ]
null
[ "@leizhu1989 Could you please check our compatibility matrix for each TF version at https://www.tensorflow.org/install/source_windows#tested_build_configurations ? Maybe for the different version, it was not compiling. Kindly check your local path and change the version internally, if required!\r\nThank you!", "@sushreebarsa thank you for your quick reply . When I checkout to r2.6 branch as \"https://www.tensorflow.org/install/source_windows#tested_build_configurations\" show it is still error\r\nmy command: cmake -A Win32 ..\\tensorflow\\lite\\c -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=True -DTFLITE_ENABLE_XNNPACK=ON -DCMAKE_BUILD_TYPE=Release\r\n\r\nit show:\r\n Completed 'psimd'\r\n Building Custom Rule D:/project/tensorflow/build_win32_2.6/psimd-download/CMakeLists.txt\r\n Building Custom Rule D:/project/tensorflow/build_win32_2.6/psimd-download/CMakeLists.txt\r\nDisabling MSVC /O2 optimization for Win32\r\n-- Configuring done\r\n-- Generating done\r\n-- Build files have been written to: D:/project/tensorflow/build_win32_2.6\r\nwhy it Disabled O2?\r\n\r\nthe same error:\r\n\"D:\\project\\tensorflow\\build_win32_2.6\\gemmlowp\\internal\\output.h(176): fatal error C1001:Internal compiler error\"\r\n\r\nwhen I try use bazel to build for version r2.12:\r\nbazel build -c opt --config=mkl //tensorflow/lite/c:tensorflowlite_c.dll --cpu=x64_x86_windows\r\n\r\nit has error:\r\nINFO: Build option --define has changed, discarding analysis cache.\r\nWARNING: Download from https://golang.org/dl/?mode=json&include=all failed: class java.io.IOException connect timed out\r\nERROR: C:/users/xxx/_bazel_xxx/qotdwtts/external/cpuinfo/BUILD.bazel:104:11: configurable attribute \"srcs\" in @cpuinfo//:cpuinfo_impl doesn't match this configuration. Would a default condition help?\r\n\r\nConditions checked:\r\n @cpuinfo//:linux_x86_64\r\n @cpuinfo//:linux_arm\r\n @cpuinfo//:linux_armhf\r\n @cpuinfo//:linux_armv7a\r\n @cpuinfo//:linux_armeabi\r\n @cpuinfo//:linux_aarch64\r\n @cpuinfo//:linux_mips64\r\n @cpuinfo//:linux_riscv64\r\n @cpuinfo//:linux_s390x\r\n @cpuinfo//:macos_x86_64\r\n @cpuinfo//:macos_arm64\r\n @cpuinfo//:windows_x86_64\r\n @cpuinfo//:android_armv7\r\n @cpuinfo//:android_arm64\r\n @cpuinfo//:android_x86\r\n @cpuinfo//:android_x86_64\r\n @cpuinfo//:ios_x86_64\r\n @cpuinfo//:ios_x86\r\n @cpuinfo//:ios_armv7\r\n @cpuinfo//:ios_arm64\r\n @cpuinfo//:ios_arm64e\r\n @cpuinfo//:ios_sim_arm64\r\n @cpuinfo//:watchos_x86_64\r\n @cpuinfo//:watchos_x86\r\n @cpuinfo//:watchos_armv7k\r\n @cpuinfo//:watchos_arm64_32\r\n @cpuinfo//:tvos_x86_64\r\n @cpuinfo//:tvos_arm64\r\n @cpuinfo//:emscripten_wasm\r\n \r\nhow can I build win32 with O2 for accelerating?", "@leizhu1989 Thank you for your reply! \r\nTF v2.6 is an older version which is not recommended to be used. Could you please let us know which version of Microsoft Visual Studio compiler you are using ? As a workaround you may use a different version of the compiler.\r\nThank you!", "thank you for your reply!\r\nmy compiler and windows sdk:\r\n\r\nwindows sdk:10.0.19041.0\r\nvisual studio 2019(v142)", "@sushreebarsa thank you for your reply!\r\nmy compiler and windows sdk:\r\n\r\nwindows sdk:10.0.19041.0\r\nvisual studio 2019(v142)", "@leizhu1989 Thanks again!\r\n Please try to install the most recent release from https://visualstudio.microsoft.com/downloads/ , which should fix this issue. Please let us know? Thank you!", "@sushreebarsa thank you very much!\r\nIt means that should I use visual studio 2022 and the r2.12 version of tensorflowlite to build tensorflowlite_c?", "@sushreebarsa hi! I'm very sorry for not answering accurately before, my compiler is like this:\r\n-- Building for: Visual Studio 16 2019\r\n-- The C compiler identification is MSVC 19.29.30146.0\r\n-- The CXX compiler identification is MSVC 19.29.30146.0\r\n-- Detecting C compiler ABI info\r\n-- Detecting C compiler ABI info - done\r\n-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x86/cl.exe - skipped\r\n-- Detecting C compile features\r\n-- Detecting C compile features - done\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\n\r\n\r\n", "@leizhu1989 Thanks for your reply!\r\nIs there any luck with visual studio 2022 so far?\r\nThank you!", "@sushreebarsa sorry to reply late, I have not try on visual studio 2022. I recently deployed on Centos", "@leizhu1989 Could you please try the same and let us know the outcome?\r\nThank you!", "@sushreebarsa thank you for your reply ,I plan to first finish my algorithm job for linux and android. Then, I will try it in visual studio 2022, is this ok? when I try it out ,I will tell you the result, thank you very much", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62272\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62272\">No</a>\n" ]
2023-10-30T02:07:57
2023-12-15T05:53:33
2023-12-13T01:49:38
NONE
null
null
null
**System information** - OS: windows11 - TensorFlow Lite in Play Services SDK version (found in `build.gradle`): 2.12 - build method: cmake -A Win32 ..\tensorflow\lite\c -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=True -DTFLITE_ENABLE_XNNPACK=ON -DCMAKE_BUILD_TYPE=Release **Standalone code to reproduce the issue** I want to use O2 compilation to improve speed, but there was a "D:\project\tensorflow\build_win32_dll\gemmlowp\internal\output.h(176): fatal error C1001:Internal compiler error" error when compiling TensorFlow Lite.lib in win32 release mode, What is the reason for this situation? When I check to O1, it has succeeded.
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62272/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62272/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62271
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62271/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62271/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62271/events
https://github.com/tensorflow/tensorflow/issues/62271
1,966,947,004
I_kwDOArmXAs51PTq8
62,271
Documentation of `tf.nn.depthwise_conv2d` fails to mention limitation on strides
{ "login": "burnpanck", "id": 1310437, "node_id": "MDQ6VXNlcjEzMTA0Mzc=", "avatar_url": "https://avatars.githubusercontent.com/u/1310437?v=4", "gravatar_id": "", "url": "https://api.github.com/users/burnpanck", "html_url": "https://github.com/burnpanck", "followers_url": "https://api.github.com/users/burnpanck/followers", "following_url": "https://api.github.com/users/burnpanck/following{/other_user}", "gists_url": "https://api.github.com/users/burnpanck/gists{/gist_id}", "starred_url": "https://api.github.com/users/burnpanck/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/burnpanck/subscriptions", "organizations_url": "https://api.github.com/users/burnpanck/orgs", "repos_url": "https://api.github.com/users/burnpanck/repos", "events_url": "https://api.github.com/users/burnpanck/events{/privacy}", "received_events_url": "https://api.github.com/users/burnpanck/received_events", "type": "User", "site_admin": false }
[ { "id": 284443156, "node_id": "MDU6TGFiZWwyODQ0NDMxNTY=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:docs-bug", "name": "type:docs-bug", "color": "159b2e", "default": false, "description": "Document issues" }, { "id": 1097545817, "node_id": "MDU6TGFiZWwxMDk3NTQ1ODE3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:apis", "name": "comp:apis", "color": "0052cc", "default": false, "description": "Highlevel API related issues" }, { "id": 3911105852, "node_id": "LA_kwDOArmXAs7pHr08", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/awaiting%20PR%20merge", "name": "awaiting PR merge", "color": "4080bf", "default": false, "description": "awaiting PR merge" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
open
false
{ "login": "Venkat6871", "id": 147127861, "node_id": "U_kgDOCMT-NQ", "avatar_url": "https://avatars.githubusercontent.com/u/147127861?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Venkat6871", "html_url": "https://github.com/Venkat6871", "followers_url": "https://api.github.com/users/Venkat6871/followers", "following_url": "https://api.github.com/users/Venkat6871/following{/other_user}", "gists_url": "https://api.github.com/users/Venkat6871/gists{/gist_id}", "starred_url": "https://api.github.com/users/Venkat6871/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Venkat6871/subscriptions", "organizations_url": "https://api.github.com/users/Venkat6871/orgs", "repos_url": "https://api.github.com/users/Venkat6871/repos", "events_url": "https://api.github.com/users/Venkat6871/events{/privacy}", "received_events_url": "https://api.github.com/users/Venkat6871/received_events", "type": "User", "site_admin": false }
[ { "login": "Venkat6871", "id": 147127861, "node_id": "U_kgDOCMT-NQ", "avatar_url": "https://avatars.githubusercontent.com/u/147127861?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Venkat6871", "html_url": "https://github.com/Venkat6871", "followers_url": "https://api.github.com/users/Venkat6871/followers", "following_url": "https://api.github.com/users/Venkat6871/following{/other_user}", "gists_url": "https://api.github.com/users/Venkat6871/gists{/gist_id}", "starred_url": "https://api.github.com/users/Venkat6871/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Venkat6871/subscriptions", "organizations_url": "https://api.github.com/users/Venkat6871/orgs", "repos_url": "https://api.github.com/users/Venkat6871/repos", "events_url": "https://api.github.com/users/Venkat6871/events{/privacy}", "received_events_url": "https://api.github.com/users/Venkat6871/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi **@burnpanck ,**\r\nI was able to replicate this issue. I checked with equal and unequal strides with tf 2.14 and tf.nightly. The filter tensor should be as follows;\r\n ' [filter_height, filter_width, in_channels, channel_multiplier]' then only it runs with equal strides. Otherwise it shows an error with equal strides too. I attached a[ gist ](https://colab.research.google.com/drive/1GsLmX8Pv7CqVwWrBtSaVsURLhqOH73Pr?authuser=0#scrollTo=uizxFnPOeqFz)here for your reference.\r\n\r\nThank you!", "@Venkat6871 I'm not quite sure I understand what you are saying, except for that you can confirm that `tf.nn.depthwise_conv2d` does not conform to it's documentation. As far as I can see, there is unfortunately no workaround that would let us do the equivalent operation efficiently. So it just remains a documentation bug that should be fixed. I had spent many hours figuring out how to map a custom layer to TF, and the only way I could do it was using unqeual strides. If the documentation had mentioned this limitation, then I could have spared myself that effort. There may be others who run into this, so I think it should be fixed.", "But it can be interesting to remove this limitation!" ]
2023-10-29T11:17:14
2023-12-28T12:58:49
null
NONE
null
null
null
### Issue type Documentation Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source binary ### TensorFlow version 2.14.0 ### Custom code No ### OS platform and distribution macOS 13.6 ### Mobile device none ### Python version 3.11 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? Apparently, tensorflow's [`tf.nn.depthwise_conv2d`](https://www.tensorflow.org/api_docs/python/tf/nn/depthwise_conv2d) recently lost the ability to work with inequal strides (see #60391; apparently it was supported up to TF 2.11). This is mentioned in the documentation of [`tf.keras.layers.SeparableConv2D`](https://www.tensorflow.org/api_docs/python/tf/keras/layers/SeparableConv2D) (albeit IMHO it should be more emphasised given that this is a limitation specific to depthwise convolutions). ### Standalone code to reproduce the issue ```shell import tensorflow as tf import numpy as np layer1 = tf.nn.depthwise_conv2d(np.ones((2,3,4,5)),filter=np.ones((1,2,5)),strides=(1,1,2,1),padding="SAME") ``` ### Relevant log output ```shell InvalidArgumentError: {{function_node __wrapped__DepthwiseConv2dNative_device_/job:localhost/replica:0/task:0/device:CPU:0}} Current implementation only supports equal length strides in the row and column dimensions. [Op:DepthwiseConv2dNative] name: ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62271/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62271/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62270
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62270/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62270/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62270/events
https://github.com/tensorflow/tensorflow/issues/62270
1,966,573,394
I_kwDOArmXAs51N4dS
62,270
Shape problems in LSTM; Configuring LSTM properly in Keras
{ "login": "flexorcist", "id": 143087967, "node_id": "U_kgDOCIdZXw", "avatar_url": "https://avatars.githubusercontent.com/u/143087967?v=4", "gravatar_id": "", "url": "https://api.github.com/users/flexorcist", "html_url": "https://github.com/flexorcist", "followers_url": "https://api.github.com/users/flexorcist/followers", "following_url": "https://api.github.com/users/flexorcist/following{/other_user}", "gists_url": "https://api.github.com/users/flexorcist/gists{/gist_id}", "starred_url": "https://api.github.com/users/flexorcist/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/flexorcist/subscriptions", "organizations_url": "https://api.github.com/users/flexorcist/orgs", "repos_url": "https://api.github.com/users/flexorcist/repos", "events_url": "https://api.github.com/users/flexorcist/events{/privacy}", "received_events_url": "https://api.github.com/users/flexorcist/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473184161, "node_id": "MDU6TGFiZWw0NzMxODQxNjE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:support", "name": "type:support", "color": "159b2e", "default": false, "description": "Support issues" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097546578, "node_id": "MDU6TGFiZWwxMDk3NTQ2NTc4", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:keras", "name": "comp:keras", "color": "0052cc", "default": false, "description": "Keras related issues" }, { "id": 3797168204, "node_id": "LA_kwDOArmXAs7iVDBM", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF%202.8", "name": "TF 2.8", "color": "5DC9D0", "default": false, "description": "" } ]
closed
false
{ "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false }
[ { "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false } ]
null
[ "@flexorcist,\r\nYour input needs to be reshaped.\r\n**input_shape: A 3D tensor with shape [batch, timesteps, features]**\r\n\r\nKeras' convention is that the batch dimension (number of examples (not the same as timesteps)) is typically omitted in the input_shape arguments. The batching (number of examples per batch) is handled in the fit call.\r\n\r\nAlso please take a look at this SO [link](https://stackoverflow.com/questions/44583254/valueerror-input-0-is-incompatible-with-layer-lstm-13-expected-ndim-3-found-n) and the https://github.com/keras-team/keras/issues/7403 with the similar error. Thank you!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62270\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62270\">No</a>\n" ]
2023-10-28T12:17:43
2023-11-15T01:49:12
2023-11-15T01:49:10
NONE
null
null
null
### Issue type Support ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version tf 2.8 ### Custom code Yes ### OS platform and distribution Windows 11 ### Mobile device _No response_ ### Python version 3.10 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? So I wanted to make a neural network that predicts weather on python. It should take data on previous 30 days as input and make a prediction on how many % (+ or -) will the air temperature change. Neural network will compute 2 inputs, so data on a single day looks like this: 1-st input: [20, 72, 1] First entry is temperature, second is humidity and third is atmospheric pressure. 2-nd input: [*Weather observations*] [*Weather observations*] array contains long strings of weather observations. In this array there may be one observation, may be more than one or none. One complete unit of training data for 30-ty days looks like this: 1-st input: [ [20, 72, 1], #1-st day [15, 89, 1.03], #2-nd day [19, 79, 1.01], #3-d day [24, 67, 0.98], #... ... ... ] 2-nd input: [ ["Many cloudy spots...", "Today we had experienced..."], #1-st day ["Rain has been going for..."], #2-nd day [""], #3-d day ["In following regions...", "Cause of geomagnetic...", "Today is one of the sunniest...], #... ... ... ] So both of those input units contains thirty entries like this (becuase of mentioned 30-ty days), and the label for this unit is air temperature on the day that is a week ahead of the last entry. Summarizing, the inputs will be lists of lists, where each list contains device readings/weather observations for 30 days with daily readings/observations placed in another list inside. So, first element in the second group of 30 days will be a set of observations which is second element in the first group of 30 days (aka 3-rank list, I hope you got it). I wrote the following model: ### Standalone code to reproduce the issue ```shell embedding_dim = 128 vocab_size = len(words_to_int) # number of unique words num_input = keras.Input(shape= (30,3), name="nums") nmlstm = layers.LSTM(64)(num_input) #num input goes to num lstm nmdense = layers.Dense(64)(nmlstm) #num lstm goes to num dense text_input = keras.Input(shape= (30, max_sequence_length), name="text") #basically length of the longest string observation sequence text_vec = layers.Embedding(vocab_size, embedding_dim, mask_zero=True)(text_input) #text input goes to text embedding txlstm = layers.LSTM(64)(text_vec) #text embedding goes to text lstm united = layers.concatenate([nmdense, txlstm]) #concatenating text lstm and num dense almostlast = layers.Dense(64)(united) #computing united input last = layers.Dense(2, name='prediction')(almostlast) #output dense layer model = keras.Model(inputs=[num_input, text_input], outputs=last) model.compile(optimizer='adam', loss=keras.losses.CategoricalCrossentropy) model.fit( {"nums": X1_train, "text": X2_train}, {"prediction": y_train}, epochs=8, batch_size=10) ``` ``` ### Relevant log output ```shell When I try to run the code, I get this error: ValueError: Input 0 of layer "lstm_1" is incompatible with the layer: expected ndim=3, found ndim=4. Full shape received: (None, 30, 2, 128) I tried changing the input shape of text_input, but I kept on getting the same error. To mention, I didn't have any problems on encoding data, padding it etc. Also it's better if there's a way of fixing it without changing the shape of 2-nd input data because the main goal is to make the neural network treat 30-day data as one input and providing only one output (how many % (+ or -) the air temperature will change) while learning on text observations to make predictions also based on them. Thank you in advance. ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62270/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62270/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62269
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62269/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62269/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62269/events
https://github.com/tensorflow/tensorflow/issues/62269
1,966,382,369
I_kwDOArmXAs51NJ0h
62,269
Different Behavior of tf.raw_ops.Sin+tf.raw_ops.Selu with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1133285679, "node_id": "MDU6TGFiZWwxMTMzMjg1Njc5", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:xla", "name": "comp:xla", "color": "0052cc", "default": false, "description": "XLA" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @zoux1a ,\r\n\r\nReplicated the reported behaviour with `jit_compile=True` and with `jit_compile = False` no error as reported. Attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/f25a4e6c47b12de7ffe6d0411e767718/62269_gpu-2-14v.ipynb) for reference.", "Hi @zoux1a ,\r\n\r\nPlease note that the Op `Selu` is supported for `T={double,float}` dtypes and Sin is supported for \r\n`T={complex64,double,float}` only, whereas you are passing `bfloat16` dtype which may give unexpected results. \r\n\r\nPlease refer the attached [source](https://github.com/tensorflow/tensorflow/blob/r2.14/tensorflow/compiler/tf2xla/g3doc/gpu_supported_ops.md) for XLA supported Ops list with dtypes for reference.\r\n\r\nI have tested with supported `dtypes` and `assert_near` is success. Please refer attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/ff671a3f4a3cc992a14eae6ea64564e8/62294_gpu.ipynb).\r\n\r\nCould you please test with supported `dtypes` of respective Op and let us know the outcome. Thanks!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62269\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62269\">No</a>\n", "Hi @GwiHwan-Go ,\r\n\r\nI have tested the code with Tf2.14v and the difference is related to precision only which happens due to XLA internal fusions and conversions and XLA uses FP32 precision by default.\r\n\r\nTo check that , I have printed the `reduce_sum` of results which are same for both which is `-16.875` for an experiment. This indicates the results are same but only precision differences with XLA which is expected.\r\n\r\nPlease refer attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/c4b436b9c19c4567ccd48b3814881083/62269_final.ipynb).\r\n\r\nThanks!" ]
2023-10-28T02:56:15
2023-12-13T16:02:36
2023-11-17T01:49:02
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.Sin+tf.raw_ops.Selu** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **GPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.Sin(x=x, ) x = tf.raw_ops.Selu(features=x, ) return x m = Network() inp = { "x": tf.random.normal([10, 9], dtype=tf.bfloat16), } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 27, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 9) dtype=float64) = ' -0.89453125, 0.5234375, 0.0908203125, ... b'y (shape=(10, 9) dtype=float64) = ' -0.89453125, 0.5234375, 0.0908203125, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62269/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62269/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62268
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62268/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62268/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62268/events
https://github.com/tensorflow/tensorflow/issues/62268
1,966,379,850
I_kwDOArmXAs51NJNK
62,268
Different Behavior of tf.raw_ops.ReciprocalGrad with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi, @zoux1a! I was able to replicate the error reported [here](https://colab.research.google.com/gist/sushreebarsa/3fa86ca3f4507b7edb3c703b8577344c/62268.ipynb#scrollTo=XkMIOvdbxdEZ). Thank you!", "I observe similar result in both `jit_compile = True` and `jit_compile = False`, since when compiling with `JIT` takes different code path and involves `fusion` operation and `casting` `dtype` to specific `dtype`, based on all these conditions, you can't expect the same result with `JIT` and without `JIT`.\r\nAttaching the Gist [here](https://colab.sandbox.google.com/gist/sachinprasadhs/4e872794b1d8ccd4ae2a0662cf216a58/tf-raw_ops-reciprocalgrad.ipynb) for comparison. Thanks!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62268\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62268\">No</a>\n" ]
2023-10-28T02:48:48
2023-11-29T01:49:17
2023-11-29T01:49:07
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.ReciprocalGrad** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **CPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): real_part = tf.random.normal([9, 8], dtype=tf.float32) imag_part = tf.random.normal([9, 8], dtype=tf.float32) tensor = tf.complex(real_part, imag_part) tensor = tf.cast(tensor,dtype=tf.complex64) x = tf.raw_ops.ReciprocalGrad(dy=x, y=tensor) return x m = Network() real_part = tf.random.normal([9, 8], dtype=tf.float32) imag_part = tf.random.normal([9, 8], dtype=tf.float32) tensor = tf.complex(real_part, imag_part) tensor = tf.cast(tensor,dtype=tf.complex64) inp = { "x": tensor, } with tf.device('/CPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/CPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 33, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(9, 8) dtype=float64) = ' -0.08226121962070465, 6.176657199859619, -0.17181062698364258, ... b'y (shape=(9, 8) dtype=float64) = ' -0.5560287833213806, 0.7939937114715576, 0.044297292828559875, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62268/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62268/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62267
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62267/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62267/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62267/events
https://github.com/tensorflow/tensorflow/issues/62267
1,966,378,087
I_kwDOArmXAs51NIxn
62,267
Different Behavior of tf.raw_ops.IgammaGradA+tf.raw_ops.DivNoNan with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 2691123225, "node_id": "MDU6TGFiZWwyNjkxMTIzMjI1", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:tf.function", "name": "comp:tf.function", "color": "0052cc", "default": false, "description": "tf.function related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi, @zoux1a!\r\nI was able to replicate this issue with jit_compile=True and jit_compile=False too.Here I attached a [gist](https://colab.research.google.com/gist/Venkat6871/18329013f60651a9defccbdb3ac76c7b/62267_2-14-v_cpu.ipynb) here.\r\n\r\nThank you!", "Hi @zoux1a ,\r\n\r\nI have noticed an issue here.\r\n\r\nInside the call function you are generating the value for y and z, which in each calls generates different random values which makes the output different for obvious reason.\r\n\r\nI have done the changes to shift y & z to outside the call function to ensure same inputs. I ran 10 experiments with different inputs of x ,y & z each time and printed the `reduced_sum` results of `no_op_res` and `op_res` which outputs almost same results on each run with minor precision changes which is expected with XLA compilation.\r\n\r\nPlease refer attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/bc774fade2117c8bdc5458a85f0a3347/62267_final.ipynb) for the experiments.", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62267\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62267\">No</a>\n" ]
2023-10-28T02:44:11
2023-12-29T01:46:16
2023-12-29T01:46:12
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.IgammaGradA+tf.raw_ops.DivNoNan** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **CPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback def replace_special_values(tensor): # Convert tensor to tf.float32 if it's not a supported dtype supported_dtypes = [tf.float16, tf.float32, tf.float64, tf.bfloat16] if tensor.dtype not in supported_dtypes: original_dtype = tensor.dtype tensor = tf.cast(tensor, tf.float32) else : original_dtype = None # Replace NaNs with zeros tensor = tf.where(tf.math.is_nan(tensor), tf.zeros_like(tensor), tensor) # Replace positive infinities with a large number (e.g., 1e30) tensor = tf.where(tf.math.is_inf(tensor), 100, tensor) # Replace negative infinities with a small number (e.g., -1e30) tensor = tf.where(tf.math.is_inf(tensor) & tf.math.less(tensor, 0), -100, tensor) # Convert tensor back to its original dtype if original_dtype is not None : tensor = tf.cast(tensor, original_dtype) return tensor class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.IgammaGradA(a=x, x=tf.random.normal([4], dtype=tf.float32)) x = tf.raw_ops.DivNoNan(y=x, x=tf.random.normal([1, 1, 1, 1], dtype=tf.float32)) return x m = Network() inp = { "x": tf.random.normal([3, 2, 2, 3,4], dtype=tf.float32), } with tf.device('/CPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/CPU:0'): op_res = m(**inp) no_op_res = replace_special_values(no_op_res) op_res = replace_special_values(op_res) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 51, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(3, 2, 2, 3, 4) dtype=float64) = ' 0.0, 10.672931671142578, 0.0, ... b'y (shape=(3, 2, 2, 3, 4) dtype=float64) = ' 0.0, 0.0, 0.0, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62267/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62267/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62266
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62266/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62266/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62266/events
https://github.com/tensorflow/tensorflow/issues/62266
1,966,375,667
I_kwDOArmXAs51NILz
62,266
Different Behavior of tf.raw_ops.SquareDifference+tf.raw_ops.Cos with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "@sachinprasadhs,\r\nI was able to reproduce the issue on tensorflow v2.14 and tf-nightly. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/12239f809d8cd60d8810b1fc5c529ef0/untitled1489.ipynb).", "I observe similar result in both jit_compile = True and jit_compile = False, since when compiling with JIT takes different code path and involves fusion operation and casting dtype to specific dtype, based on all these conditions, you can't expect the same result with JIT and without JIT.\r\nAlso when you are involving random number in the operation, it will give different result for each run.\r\nAttaching the Gist [here](https://colab.sandbox.google.com/gist/sachinprasadhs/a67c9e106a49ae29ece79a0359c416e4/tf-raw_ops-squaredifference-tf-raw_ops-cos.ipynb) for comparison. Thanks!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62266\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62266\">No</a>\n" ]
2023-10-28T02:37:29
2023-11-29T01:49:20
2023-11-29T01:49:08
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.SquareDifference+tf.raw_ops.Cos** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **CPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): real_part = tf.random.normal([1], dtype=tf.float32) imag_part = tf.random.normal([1], dtype=tf.float32) tensor = tf.complex(real_part, imag_part) tensor = tf.cast(tensor,dtype=tf.complex64) x = tf.raw_ops.SquaredDifference(y=x, x=tensor) x = tf.raw_ops.Cos(x=x, ) return x m = Network() real_part = tf.random.normal([8, 2], dtype=tf.float32) imag_part = tf.random.normal([8, 2], dtype=tf.float32) tensor = tf.complex(real_part, imag_part) tensor = tf.cast(tensor,dtype=tf.complex64) inp = { "x": tensor, } with tf.device('/CPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/CPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 34, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(8, 2) dtype=float64) = ' -0.9023030400276184, -0.8812462687492371, -0.6324461102485657, ... b'y (shape=(8, 2) dtype=float64) = ' -0.8898392915725708, 0.49911314249038696, -0.15750333666801453, ... (night) guihuan@heyuan2:~$ ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62266/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62266/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62265
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62265/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62265/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62265/events
https://github.com/tensorflow/tensorflow/issues/62265
1,966,373,284
I_kwDOArmXAs51NHmk
62,265
Different Behavior of tf.raw_ops.AdjustSaturation with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @zoux1a ,\r\n\r\nI have replicated the reported behaviour with `jit_compile=True `and with` jit_compile = False` as well. It seems not related to `jit_compile` issue. Attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/ceca6be7b2efcf2529589b212694af29/62265_gpu-2-14v.ipynb) for reference.", "Hi @zoux1a ,\r\n\r\nI noticed an issue here.\r\n\r\nInside the call function you are generating the value for `images`, which in each calls generates different random values( because seed gets changed every call) which makes the output different for obvious reason.\r\n\r\nI have done the changes to shift `images` to outside the call function to ensure same inputs. I ran 10 experiments with different inputs of x & `images` and printed the `reduce_sum` results of `no_op_res` and `op_res` which outputs almost same results with minor precision differences which is expected with XLA compilation.\r\n\r\nPlease refer attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/14200d88789f860749ca900113334864/62265_final.ipynb) for the experiments.", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62265\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62265\">No</a>\n" ]
2023-10-28T02:31:31
2023-12-30T01:48:07
2023-12-30T01:48:03
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.AdjustSaturation** operation is invoked within a tf.function with JIT compilation enabled (jit_compile=True), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **GPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback def replace_special_values(tensor): # Convert tensor to tf.float32 if it's not a supported dtype supported_dtypes = [tf.float16, tf.float32, tf.float64, tf.bfloat16] if tensor.dtype not in supported_dtypes: original_dtype = tensor.dtype tensor = tf.cast(tensor, tf.float32) else : original_dtype = None # Replace NaNs with zeros tensor = tf.where(tf.math.is_nan(tensor), tf.zeros_like(tensor), tensor) # Replace positive infinities with a large number (e.g., 1e30) tensor = tf.where(tf.math.is_inf(tensor), 100, tensor) # Replace negative infinities with a small number (e.g., -1e30) tensor = tf.where(tf.math.is_inf(tensor) & tf.math.less(tensor, 0), -100, tensor) # Convert tensor back to its original dtype if original_dtype is not None : tensor = tf.cast(tensor, original_dtype) return tensor class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.AdjustSaturation(scale=x, images=tf.random.normal([9, 10, 3], dtype=tf.float32)) return x m = Network() inp = { "x": tf.random.normal([], dtype=tf.float32), } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) no_op_res = replace_special_values(no_op_res) op_res = replace_special_values(op_res) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 50, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(9, 10, 3) dtype=float64) = ' 0.0, 0.653150737285614, 0.7379282116889954, ... b'y (shape=(9, 10, 3) dtype=float64) = ' 0.0, 0.05600351840257645, 0.007689270656555891, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62265/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62265/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62264
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62264/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62264/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62264/events
https://github.com/tensorflow/tensorflow/issues/62264
1,966,368,468
I_kwDOArmXAs51NGbU
62,264
Different Behavior of tf.raw_ops.LeftShift with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi, @zoux1a!\r\nI was able to replicate the issue reported here. Please find the attached [gist](https://colab.research.google.com/gist/sushreebarsa/8fcb71b61980c0f1b2c3abf466619d47/62264.ipynb#scrollTo=2TYGMlsN59gz) here. Thank you!", "I observed similar result in both `jit_compile = True` and `jit_compile = False` scenarios \r\n`tf.Tensor([ 0. 0. -128. 0. -128. 0. 0. -128. -128.], shape=(9,), dtype=float64)`\r\n\r\nSince it involves random tensor generation, result will be different for each run. \r\nAttaching the [Gist](https://colab.sandbox.google.com/gist/sachinprasadhs/f63ae4c73ae56dd609226aaa64a86981/tf-raw_ops-leftshift.ipynb#scrollTo=0krxe-ueifIB) here for reference. ", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62264\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62264\">No</a>\n" ]
2023-10-28T02:17:04
2023-11-29T01:49:22
2023-11-29T01:49:10
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? When the **tf.raw_ops.Leftshift** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **CPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback def replace_special_values(tensor): # Convert tensor to tf.float32 if it's not a supported dtype supported_dtypes = [tf.float16, tf.float32, tf.float64, tf.bfloat16] if tensor.dtype not in supported_dtypes: original_dtype = tensor.dtype tensor = tf.cast(tensor, tf.float32) else : original_dtype = None # Replace NaNs with zeros tensor = tf.where(tf.math.is_nan(tensor), tf.zeros_like(tensor), tensor) # Replace positive infinities with a large number (e.g., 1e30) tensor = tf.where(tf.math.is_inf(tensor), 100, tensor) # Replace negative infinities with a small number (e.g., -1e30) tensor = tf.where(tf.math.is_inf(tensor) & tf.math.less(tensor, 0), -100, tensor) # Convert tensor back to its original dtype if original_dtype is not None : tensor = tf.cast(tensor, original_dtype) return tensor class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): random_tensor = tf.random.uniform([9],minval=0,maxval=255,dtype=tf.int32) int8_tensor = tf.dtypes.cast(random_tensor, tf.int8) x = tf.raw_ops.LeftShift(y=x, x=int8_tensor) return x m = Network() random_tensor = tf.random.uniform([],minval=0,maxval=255,dtype=tf.int32) int8_tensor = tf.dtypes.cast(random_tensor, tf.int8) inp = { "x": int8_tensor, } with tf.device('/CPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/CPU:0'): op_res = m(**inp) no_op_res = replace_special_values(no_op_res) op_res = replace_special_values(op_res) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 53, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(9,) dtype=float64) = ' -32.0, -116.0, 27.0, ... b'y (shape=(9,) dtype=float64) = ' 0.0, 0.0, 0.0, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62264/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62264/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62263
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62263/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62263/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62263/events
https://github.com/tensorflow/tensorflow/issues/62263
1,966,365,224
I_kwDOArmXAs51NFoo
62,263
Different Behavior of tf.raw_ops.SqrtGrad with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 2691123225, "node_id": "MDU6TGFiZWwyNjkxMTIzMjI1", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:tf.function", "name": "comp:tf.function", "color": "0052cc", "default": false, "description": "tf.function related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
open
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi, **@zoux1a**!\r\nI was able to replicate this issue with jit_compile=True and jit_compile=False too.Here I attached a [gist](https://colab.research.google.com/gist/Venkat6871/e9db4fb9d907d226d962d2a2f85a76dd/62263_gpu-2-14-nightly.ipynb) here.\r\n\r\nThank you!", "Seems to be issue with tf.function as the replicable with and without `jit_compile`." ]
2023-10-28T02:08:02
2023-11-28T09:22:23
null
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution _No response_ ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.SqrtGrad** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **GPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): real_part = tf.random.normal([], dtype=tf.float64) imag_part = tf.random.normal([], dtype=tf.float64) tensor = tf.complex(real_part, imag_part) tensor = tf.cast(tensor,dtype=tf.complex128) x = tf.raw_ops.SqrtGrad(y=x, dy=tensor) return x m = Network() real_part = tf.random.normal([], dtype=tf.float64) imag_part = tf.random.normal([], dtype=tf.float64) tensor = tf.complex(real_part, imag_part) tensor = tf.cast(tensor,dtype=tf.complex128) inp = { "x": tensor, } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 33, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=() dtype=float64) = ' -0.006697387971180855 b'y (shape=() dtype=float64) = ' 0.07167101474792367 ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62263/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62263/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62262
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62262/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62262/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62262/events
https://github.com/tensorflow/tensorflow/issues/62262
1,966,363,455
I_kwDOArmXAs51NFM_
62,262
Different Behavior of tf.raw_ops.Xloggy+tf.raw_ops.Lgamma with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "@sachinprasadhs,\r\nI was able to reproduce the issue on tensorflow v2.14 and tf-nightly. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/82d83661e0b39ac4d46a84db55776d80/untitled1487.ipynb).", "Hi,\r\n\r\nI see it fails in both` jit_compile = True` and `jit_compile = False` on GPU, since it invloves random values as an input, results are not guaranteed to match in both the scenarios.\r\nHere is the attached [Gist](https://colab.sandbox.google.com/gist/sachinprasadhs/babe79d71ca277d4a949e7327d78b2ba/tf-raw_ops-xloggy-tf-raw_ops-lgamma.ipynb) for reference.", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62262\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62262\">No</a>\n" ]
2023-10-28T02:02:55
2023-11-29T01:49:26
2023-11-29T01:49:11
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.Xloggy+tf.raw_ops.Lgamma** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **GPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback def replace_special_values(tensor): # Convert tensor to tf.float32 if it's not a supported dtype supported_dtypes = [tf.float16, tf.float32, tf.float64, tf.bfloat16] if tensor.dtype not in supported_dtypes: original_dtype = tensor.dtype tensor = tf.cast(tensor, tf.float32) else : original_dtype = None # Replace NaNs with zeros tensor = tf.where(tf.math.is_nan(tensor), tf.zeros_like(tensor), tensor) # Replace positive infinities with a large number (e.g., 1e30) tensor = tf.where(tf.math.is_inf(tensor), 100, tensor) # Replace negative infinities with a small number (e.g., -1e30) tensor = tf.where(tf.math.is_inf(tensor) & tf.math.less(tensor, 0), -100, tensor) # Convert tensor back to its original dtype if original_dtype is not None : tensor = tf.cast(tensor, original_dtype) return tensor class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.Xlogy(x=x, y=tf.random.normal([1, 4, 2, 10, 7], dtype=tf.float32)) x = tf.raw_ops.Lgamma(x=x, ) return x m = Network() inp = { "x": tf.random.normal([7, 4, 2, 10, 7], dtype=tf.float32), } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) no_op_res = replace_special_values(no_op_res) op_res = replace_special_values(op_res) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 51, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(7, 4, 2, 10, 7) dtype=float64) = ' 0.0, 0.37531375885009766, 0.0, ... b'y (shape=(7, 4, 2, 10, 7) dtype=float64) = ' 2.251509666442871, 1.629914402961731, 0.0, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62262/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62262/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62261
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62261/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62261/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62261/events
https://github.com/tensorflow/tensorflow/issues/62261
1,966,360,857
I_kwDOArmXAs51NEkZ
62,261
Different Behavior of tf.raw_ops.UpperBound with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @zoux1a ,\r\n\r\nI have replicated the reported behaviour with jit_compile=True and with jit_compile = False as well. It seems not related to jit_compile issue. Attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/bb7015fd5c57b4b4885bbb67f82296e0/62261_gpu-2-14v.ipynb) for reference.", "@zoux1a ,\r\n\r\nIt seems UpperBound Op is not supported on XLA. Could you please cross verify at the source [here](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/compiler/tf2xla/g3doc).", "Hi, @SuryanarayanaY\r\nThanks for your information. ", "Hi @zoux1a ,\r\n\r\nCould you please confirm whether this issue can be closed or still looking for anything to test here ?", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62261\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62261\">No</a>\n" ]
2023-10-28T01:56:00
2023-11-24T01:48:30
2023-11-24T01:48:27
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.UpperBound** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **GPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback def replace_special_values(tensor): # Convert tensor to tf.float32 if it's not a supported dtype supported_dtypes = [tf.float16, tf.float32, tf.float64, tf.bfloat16] if tensor.dtype not in supported_dtypes: original_dtype = tensor.dtype tensor = tf.cast(tensor, tf.float32) else : original_dtype = None # Replace NaNs with zeros tensor = tf.where(tf.math.is_nan(tensor), tf.zeros_like(tensor), tensor) # Replace positive infinities with a large number (e.g., 1e30) tensor = tf.where(tf.math.is_inf(tensor), 100, tensor) # Replace negative infinities with a small number (e.g., -1e30) tensor = tf.where(tf.math.is_inf(tensor) & tf.math.less(tensor, 0), -100, tensor) # Convert tensor back to its original dtype if original_dtype is not None : tensor = tf.cast(tensor, original_dtype) return tensor class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): random_tensor = tf.random.uniform([10, 8],minval=-32768,maxval=32767,dtype=tf.int32) int16_tensor = tf.dtypes.cast(random_tensor, tf.int16) x = tf.raw_ops.UpperBound(sorted_inputs=x, values=int16_tensor) return x m = Network() random_tensor = tf.random.uniform([10, 9],minval=-32768,maxval=32767,dtype=tf.int32) int16_tensor = tf.dtypes.cast(random_tensor, tf.int16) inp = { "x": int16_tensor, } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) no_op_res = replace_special_values(no_op_res) op_res = replace_special_values(op_res) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 53, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 8) dtype=float64) = ' 5.0, 8.0, 8.0, ... b'y (shape=(10, 8) dtype=float64) = ' 0.0, 2.0, 7.0, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62261/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62261/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62260
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62260/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62260/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62260/events
https://github.com/tensorflow/tensorflow/issues/62260
1,966,357,141
I_kwDOArmXAs51NDqV
62,260
Different Behavior of tf.raw_ops.BatchMatMulV2 with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi, @zoux1a !\r\nI was able to replicate the issue reported here with both (jit_compile=True) and (jit_compile=False). Please find the attached [gist](https://colab.research.google.com/gist/sushreebarsa/6b1e2facce99faf001e80f76cc6fc7c3/62260.ipynb#scrollTo=iM4Hid_Z4hqu). Thank you!", "Even with the seed is set, it gives different result for each run, and errors for both `jit_compile=True` and `jit_compile=False`.\r\n\r\n```python\r\nimport tensorflow as tf\r\nimport traceback\r\ntf.random.set_seed(42)\r\n\r\nclass Network(tf.Module):\r\n def __init__(self):\r\n super().__init__()\r\n\r\n @tf.function(jit_compile=True)\r\n def __call__(self, x):\r\n \r\n x = tf.raw_ops.BatchMatMulV2(y=x, adj_x=False,adj_y=False,x=tf.random.normal([10, 4], dtype=tf.float32)) \r\n return x\r\n\r\nm = Network()\r\ninp = {\r\n \"x\": tf.random.normal([10, 4, 9, 10, 4, 7], dtype=tf.float32),\r\n}\r\n\r\nwith tf.device('/GPU:0'):\r\n tf.config.run_functions_eagerly(True)\r\n no_op_res = m(**inp)\r\n tf.config.run_functions_eagerly(False)\r\n with tf.device('/GPU:0'):\r\n op_res = m(**inp)\r\n print(tf.cast(no_op_res, tf.float64) - tf.cast(op_res, tf.float64))\r\n tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001)\r\n```", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62260\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62260\">No</a>\n" ]
2023-10-28T01:45:04
2023-11-26T01:49:34
2023-11-26T01:49:32
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.BatchMatMulV2** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **GPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.BatchMatMulV2(y=x, adj_x=False,adj_y=False,x=tf.random.normal([10, 4], dtype=tf.float32)) return x m = Network() inp = { "x": tf.random.normal([10, 4, 9, 10, 4, 7], dtype=tf.float32), } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 26, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 4, 9, 10, 10, 7) dtype=float64) = ' 3.095237970352173, 1.269474744796753, 1.7049360275268555, ... b'y (shape=(10, 4, 9, 10, 10, 7) dtype=float64) = ' -0.8066665530204773, 1.0990331172943115, 0.033941611647605896, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62260/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62260/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62259
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62259/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62259/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62259/events
https://github.com/tensorflow/tensorflow/issues/62259
1,966,339,434
I_kwDOArmXAs51M_Vq
62,259
Installation of Tensorflow
{ "login": "TariqHasan5167", "id": 43911658, "node_id": "MDQ6VXNlcjQzOTExNjU4", "avatar_url": "https://avatars.githubusercontent.com/u/43911658?v=4", "gravatar_id": "", "url": "https://api.github.com/users/TariqHasan5167", "html_url": "https://github.com/TariqHasan5167", "followers_url": "https://api.github.com/users/TariqHasan5167/followers", "following_url": "https://api.github.com/users/TariqHasan5167/following{/other_user}", "gists_url": "https://api.github.com/users/TariqHasan5167/gists{/gist_id}", "starred_url": "https://api.github.com/users/TariqHasan5167/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/TariqHasan5167/subscriptions", "organizations_url": "https://api.github.com/users/TariqHasan5167/orgs", "repos_url": "https://api.github.com/users/TariqHasan5167/repos", "events_url": "https://api.github.com/users/TariqHasan5167/events{/privacy}", "received_events_url": "https://api.github.com/users/TariqHasan5167/received_events", "type": "User", "site_admin": false }
[ { "id": 473173351, "node_id": "MDU6TGFiZWw0NzMxNzMzNTE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:build/install", "name": "type:build/install", "color": "159b2e", "default": false, "description": "Build and install issues" } ]
closed
false
{ "login": "Venkat6871", "id": 147127861, "node_id": "U_kgDOCMT-NQ", "avatar_url": "https://avatars.githubusercontent.com/u/147127861?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Venkat6871", "html_url": "https://github.com/Venkat6871", "followers_url": "https://api.github.com/users/Venkat6871/followers", "following_url": "https://api.github.com/users/Venkat6871/following{/other_user}", "gists_url": "https://api.github.com/users/Venkat6871/gists{/gist_id}", "starred_url": "https://api.github.com/users/Venkat6871/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Venkat6871/subscriptions", "organizations_url": "https://api.github.com/users/Venkat6871/orgs", "repos_url": "https://api.github.com/users/Venkat6871/repos", "events_url": "https://api.github.com/users/Venkat6871/events{/privacy}", "received_events_url": "https://api.github.com/users/Venkat6871/received_events", "type": "User", "site_admin": false }
[ { "login": "Venkat6871", "id": 147127861, "node_id": "U_kgDOCMT-NQ", "avatar_url": "https://avatars.githubusercontent.com/u/147127861?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Venkat6871", "html_url": "https://github.com/Venkat6871", "followers_url": "https://api.github.com/users/Venkat6871/followers", "following_url": "https://api.github.com/users/Venkat6871/following{/other_user}", "gists_url": "https://api.github.com/users/Venkat6871/gists{/gist_id}", "starred_url": "https://api.github.com/users/Venkat6871/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Venkat6871/subscriptions", "organizations_url": "https://api.github.com/users/Venkat6871/orgs", "repos_url": "https://api.github.com/users/Venkat6871/repos", "events_url": "https://api.github.com/users/Venkat6871/events{/privacy}", "received_events_url": "https://api.github.com/users/Venkat6871/received_events", "type": "User", "site_admin": false } ]
null
[ "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62259\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62259\">No</a>\n" ]
2023-10-28T00:58:54
2023-10-28T20:38:54
2023-10-28T20:38:52
NONE
null
null
null
### Issue type Build/Install ### Have you reproduced the bug with TensorFlow Nightly? No ### Source binary ### TensorFlow version 2.14 ### Custom code Yes ### OS platform and distribution Windows10 ### Mobile device _No response_ ### Python version 3.9 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? I have installed tensorflow. While importing tensorflow with following command it failed to import: C:\Program Files\Python39\Lib\site-packages>python3 -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))" ### Standalone code to reproduce the issue ```shell C:\Program Files\Python39\Lib\site-packages>python3 -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))" ``` ### Relevant log output ```shell Traceback (most recent call last): File "C:\Program Files\Python39\Lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 62, in <module> from tensorflow.python._pywrap_tensorflow_internal import * ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Program Files\Python39\Lib\site-packages\tensorflow\__init__.py", line 38, in <module> from tensorflow.python.tools import module_util as _module_util File "C:\Program Files\Python39\Lib\site-packages\tensorflow\python\__init__.py", line 36, in <module> from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow File "C:\Program Files\Python39\Lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 77, in <module> raise ImportError( ImportError: Traceback (most recent call last): File "C:\Program Files\Python39\Lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 62, in <module> from tensorflow.python._pywrap_tensorflow_internal import * ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found. Failed to load the native TensorFlow runtime. See https://www.tensorflow.org/install/errors for some common causes and solutions. If you need help, create an issue at https://github.com/tensorflow/tensorflow/issues and include the entire stack trace above this error message. ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62259/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62259/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62258
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62258/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62258/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62258/events
https://github.com/tensorflow/tensorflow/pull/62258
1,966,301,260
PR_kwDOArmXAs5eA7Mw
62,258
Update RELEASE.md
{ "login": "ronaghy", "id": 147886872, "node_id": "U_kgDOCNCTGA", "avatar_url": "https://avatars.githubusercontent.com/u/147886872?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ronaghy", "html_url": "https://github.com/ronaghy", "followers_url": "https://api.github.com/users/ronaghy/followers", "following_url": "https://api.github.com/users/ronaghy/following{/other_user}", "gists_url": "https://api.github.com/users/ronaghy/gists{/gist_id}", "starred_url": "https://api.github.com/users/ronaghy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ronaghy/subscriptions", "organizations_url": "https://api.github.com/users/ronaghy/orgs", "repos_url": "https://api.github.com/users/ronaghy/repos", "events_url": "https://api.github.com/users/ronaghy/events{/privacy}", "received_events_url": "https://api.github.com/users/ronaghy/received_events", "type": "User", "site_admin": false }
[]
closed
false
{ "login": "huberalberti", "id": 6607216, "node_id": "MDQ6VXNlcjY2MDcyMTY=", "avatar_url": "https://avatars.githubusercontent.com/u/6607216?v=4", "gravatar_id": "", "url": "https://api.github.com/users/huberalberti", "html_url": "https://github.com/huberalberti", "followers_url": "https://api.github.com/users/huberalberti/followers", "following_url": "https://api.github.com/users/huberalberti/following{/other_user}", "gists_url": "https://api.github.com/users/huberalberti/gists{/gist_id}", "starred_url": "https://api.github.com/users/huberalberti/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/huberalberti/subscriptions", "organizations_url": "https://api.github.com/users/huberalberti/orgs", "repos_url": "https://api.github.com/users/huberalberti/repos", "events_url": "https://api.github.com/users/huberalberti/events{/privacy}", "received_events_url": "https://api.github.com/users/huberalberti/received_events", "type": "User", "site_admin": false }
[ { "login": "huberalberti", "id": 6607216, "node_id": "MDQ6VXNlcjY2MDcyMTY=", "avatar_url": "https://avatars.githubusercontent.com/u/6607216?v=4", "gravatar_id": "", "url": "https://api.github.com/users/huberalberti", "html_url": "https://github.com/huberalberti", "followers_url": "https://api.github.com/users/huberalberti/followers", "following_url": "https://api.github.com/users/huberalberti/following{/other_user}", "gists_url": "https://api.github.com/users/huberalberti/gists{/gist_id}", "starred_url": "https://api.github.com/users/huberalberti/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/huberalberti/subscriptions", "organizations_url": "https://api.github.com/users/huberalberti/orgs", "repos_url": "https://api.github.com/users/huberalberti/repos", "events_url": "https://api.github.com/users/huberalberti/events{/privacy}", "received_events_url": "https://api.github.com/users/huberalberti/received_events", "type": "User", "site_admin": false } ]
null
[]
2023-10-27T23:32:05
2023-10-27T23:36:28
2023-10-27T23:36:28
CONTRIBUTOR
null
false
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/pulls/62258", "html_url": "https://github.com/tensorflow/tensorflow/pull/62258", "diff_url": "https://github.com/tensorflow/tensorflow/pull/62258.diff", "patch_url": "https://github.com/tensorflow/tensorflow/pull/62258.patch", "merged_at": "2023-10-27T23:36:27" }
Updated release notes as per DevRel feedback provided by markdaoust@
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62258/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62258/timeline
null
null
true
https://api.github.com/repos/tensorflow/tensorflow/issues/62257
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62257/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62257/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62257/events
https://github.com/tensorflow/tensorflow/issues/62257
1,965,812,222
I_kwDOArmXAs51K-n-
62,257
Tensorflow on Docker linux/amd64 on mac M1
{ "login": "FrankyDBravo", "id": 22367743, "node_id": "MDQ6VXNlcjIyMzY3NzQz", "avatar_url": "https://avatars.githubusercontent.com/u/22367743?v=4", "gravatar_id": "", "url": "https://api.github.com/users/FrankyDBravo", "html_url": "https://github.com/FrankyDBravo", "followers_url": "https://api.github.com/users/FrankyDBravo/followers", "following_url": "https://api.github.com/users/FrankyDBravo/following{/other_user}", "gists_url": "https://api.github.com/users/FrankyDBravo/gists{/gist_id}", "starred_url": "https://api.github.com/users/FrankyDBravo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/FrankyDBravo/subscriptions", "organizations_url": "https://api.github.com/users/FrankyDBravo/orgs", "repos_url": "https://api.github.com/users/FrankyDBravo/repos", "events_url": "https://api.github.com/users/FrankyDBravo/events{/privacy}", "received_events_url": "https://api.github.com/users/FrankyDBravo/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473173351, "node_id": "MDU6TGFiZWw0NzMxNzMzNTE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:build/install", "name": "type:build/install", "color": "159b2e", "default": false, "description": "Build and install issues" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1205765054, "node_id": "MDU6TGFiZWwxMjA1NzY1MDU0", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/subtype:macOS", "name": "subtype:macOS", "color": "b619ea", "default": false, "description": "macOS Build/Installation issues" }, { "id": 2498949452, "node_id": "MDU6TGFiZWwyNDk4OTQ5NDUy", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF%202.5", "name": "TF 2.5", "color": "5319e7", "default": false, "description": "Issues related to TF 2.5" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "@FrankyDBravo,\r\nTo utilize TensorFlow with GPU acceleration, the installation of the CUDA toolkit is essential. However, it's crucial to note that CUDA was developed by NVIDIA and is optimized for use with NVIDIA GPUs. \r\n\r\nAs a result, it's not feasible to run TensorFlow on AMD GPUs. For a comprehensive list of CUDA-enabled GPU devices that are compatible with TensorFlow, please take a look at this [documentation](https://www.tensorflow.org/install/pip#hardware_requirements). \r\nFor GPUs with unsupported CUDA® architectures, or to avoid JIT compilation from PTX, or to use different versions of the NVIDIA® libraries, see the [Linux build from source](https://www.tensorflow.org/install/source) guide.\r\n\r\nhttps://discuss.tensorflow.org/t/does-tensorflow-support-amd-radeon-graphics-cards/18765/5\r\n\r\nAlso you are trying to install tensorflow v2.5 which is pretty old, please try to update for tensorflow latest stable v2.14 or v2.13 for the smooth installation. Thank you!\r\n\r\n\r\n", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62257\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62257\">No</a>\n", "thanks for the follow up, However I had the same problem with tensorflow-cpu==2.5.0 \r\nI actually don't care about using gpu, would like to use the cpu but I need to use that version in that docker", "Let me rephrase my question: Do you have any exemple of dockerFile for linux/amd64 ubuntu with tensorflow that works on macOS with ARM processor ? ", "Hi, Recently from past few versions, `TensorFlow` started supporting MacOS M1 in it's official release, you can use the latest `TensorFlow` version(2.14 as of now).\r\n\r\nOr you can directly to `pip install tensorflow` on your M1, to get GPU support additionally you need to install `pip install tensorflow-metal`", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62257\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62257\">No</a>\n", "indeed it will work fine on a mac M1, but it doesn't seem to work on a docker (linux/amd64 ubuntu:20.04) running on mac M1", "I have the same problem. \r\nThe reason why I wanted to run tensorflow on docker in the first place was so i can use actually use tf-models-original which can not be properly installed on the M1 Mac which i use.\r\n\r\nIf i use docker platform linux/amd64, I can actually build and run the image with tensorflow and tf-models-original. But as soon as I try to import the tf package the kernel dies because of illegal instructions. I guess this is because docker can not properly simulate the amd64 architecture.\r\n\r\n\r\nI would really like to know if there is a way to make tf-models-original run in a way that is not overly complicated: i have heared things about installing it with no dependencies and then installing them separately (and using a special pyyaml version ... i think it was 5.3.1). I tried it and it failed at the step of installing tensorflow-text (which is a dependency) cause there was no available package. \r\n\r\nI would really appreciate some concrete steps to either install all relevant tf packages on M1 or a way to install them within docker so I can run them this way.", "With a base image with arm64 support and installing hdf5 and tensorflow things should work fine. Using an amd64 docker image resolved in core dump for me. Here is a slightly modified docker file that worked for me: (need to specify platform to be arm64. I even built it in a amd64 linux vm with qemu)\r\n```FROM rockylinux:8.9.20231119\r\nENV BASE_DIR /home/nexus-rtcl-app\r\nWORKDIR ${BASE_DIR}\r\n\r\nUSER root\r\n#### Main starts\r\nRUN dnf -y install epel-release\r\nRUN dnf config-manager --set-enabled powertools\r\nRUN yum -y update \\\r\n && yum install -y wget curl unzip which time \\\r\n && yum -y update \\ \r\n && dnf -y install gcc-c++ \\\r\n && dnf -y install hdf5-devel\r\n\r\nRUN dnf -y install python38-devel \r\n\r\nRUN ln -s /usr/bin/python3 /usr/local/bin/python\r\n\r\nRUN python -m pip install -r trieste \\\r\n && python -m pip install numpy \\\r\n && python -m pip install urllib3==1.26.16 \\\r\n && python -m pip install -U pip setuptools\r\n```\r\n\r\nimage on dockerhub (it has a lil extra stuff for our project but could be used for a quick test): yusenz/nexus-bayes_opt:1.4\r\n\r\nnote: hdf5py team should have prebuilt wheels for arm but installer still wants to build from source for some reason that I am too lazy to figure out.\r\n" ]
2023-10-27T16:06:40
2024-05-09T18:40:51
2023-11-29T01:49:13
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source binary ### TensorFlow version tf 2.5 ### Custom code No ### OS platform and distribution Docker ubuntu:20.04 ### Mobile device _No response_ ### Python version 3.8 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? I am trying to install tensorflow 2.5.0 on my docker ubuntu:20.04. I am running this docker on a mac M1 (arm chip). My code is simple : docker file: `# Use the official Ubuntu 20.04 base image FROM --platform=linux/amd64 ubuntu:20.04 RUN apt-get update && \ apt-get install -y git python3.8=3.8.10* python3-pip libfreetype6-dev pkg-config && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 && \ update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 # Install the Python packages from requirements.txt RUN pip3 install tensorflow==2.5.0 ` then running my docker image i have the following error if i try to import tensorflow: `>>> import tensorflow Illegal instruction ` I tried different docker images, installing from whl files, etc.. all led to the same error. Using bazel and installing from source fails after an hour in the process with some error on gcc I set up Rosetta on Docker config as well. Is it a known issue? ### Standalone code to reproduce the issue ```shell # Use the official Ubuntu 20.04 base image FROM --platform=linux/amd64 ubuntu:20.04 RUN apt-get update && \ apt-get install -y git python3.8=3.8.10* python3-pip libfreetype6-dev pkg-config && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 && \ update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 # Install the Python packages from requirements.txt RUN pip3 install tensorflow==2.5.0 ``` ### Relevant log output _No response_
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62257/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62257/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62256
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62256/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62256/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62256/events
https://github.com/tensorflow/tensorflow/issues/62256
1,965,652,736
I_kwDOArmXAs51KXsA
62,256
[RNN] LSTM - quantization issue
{ "login": "RuxandraRusu29", "id": 83610798, "node_id": "MDQ6VXNlcjgzNjEwNzk4", "avatar_url": "https://avatars.githubusercontent.com/u/83610798?v=4", "gravatar_id": "", "url": "https://api.github.com/users/RuxandraRusu29", "html_url": "https://github.com/RuxandraRusu29", "followers_url": "https://api.github.com/users/RuxandraRusu29/followers", "following_url": "https://api.github.com/users/RuxandraRusu29/following{/other_user}", "gists_url": "https://api.github.com/users/RuxandraRusu29/gists{/gist_id}", "starred_url": "https://api.github.com/users/RuxandraRusu29/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/RuxandraRusu29/subscriptions", "organizations_url": "https://api.github.com/users/RuxandraRusu29/orgs", "repos_url": "https://api.github.com/users/RuxandraRusu29/repos", "events_url": "https://api.github.com/users/RuxandraRusu29/events{/privacy}", "received_events_url": "https://api.github.com/users/RuxandraRusu29/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 750616506, "node_id": "MDU6TGFiZWw3NTA2MTY1MDY=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:lite", "name": "comp:lite", "color": "0052cc", "default": false, "description": "TF Lite related issues" }, { "id": 1661751498, "node_id": "MDU6TGFiZWwxNjYxNzUxNDk4", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TFLiteConverter", "name": "TFLiteConverter", "color": "bfdadc", "default": false, "description": "For issues related to TFLite converter" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "pjpratik", "id": 118897289, "node_id": "U_kgDOBxY6iQ", "avatar_url": "https://avatars.githubusercontent.com/u/118897289?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pjpratik", "html_url": "https://github.com/pjpratik", "followers_url": "https://api.github.com/users/pjpratik/followers", "following_url": "https://api.github.com/users/pjpratik/following{/other_user}", "gists_url": "https://api.github.com/users/pjpratik/gists{/gist_id}", "starred_url": "https://api.github.com/users/pjpratik/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pjpratik/subscriptions", "organizations_url": "https://api.github.com/users/pjpratik/orgs", "repos_url": "https://api.github.com/users/pjpratik/repos", "events_url": "https://api.github.com/users/pjpratik/events{/privacy}", "received_events_url": "https://api.github.com/users/pjpratik/received_events", "type": "User", "site_admin": false }
[ { "login": "pjpratik", "id": 118897289, "node_id": "U_kgDOBxY6iQ", "avatar_url": "https://avatars.githubusercontent.com/u/118897289?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pjpratik", "html_url": "https://github.com/pjpratik", "followers_url": "https://api.github.com/users/pjpratik/followers", "following_url": "https://api.github.com/users/pjpratik/following{/other_user}", "gists_url": "https://api.github.com/users/pjpratik/gists{/gist_id}", "starred_url": "https://api.github.com/users/pjpratik/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pjpratik/subscriptions", "organizations_url": "https://api.github.com/users/pjpratik/orgs", "repos_url": "https://api.github.com/users/pjpratik/repos", "events_url": "https://api.github.com/users/pjpratik/events{/privacy}", "received_events_url": "https://api.github.com/users/pjpratik/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @RuxandraRusu29 \r\n\r\nSorry for the delayed response.\r\n\r\nI guess the quantization scale might be affected because of the input tensors during representative dataset calibration and should not be a problem unless it's affecting the performance. I'm interested to know if it is ?\r\n\r\nThanks.", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62256\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62256\">No</a>\n" ]
2023-10-27T14:28:24
2023-11-22T01:49:38
2023-11-22T01:49:35
NONE
null
null
null
1. System information - Google Colab - tensorflow version - 2.14.0 2. Code I started from the following tutorial provided by tensorflow. https://blog.tensorflow.org/2021/04/adaptive-framework-for-on-device-recommendation.html The end goal was to create a quantized model that used the LSTM encoder. The quantization code is as it follows: ``` def representative_data_gen(): rep_dataset = input_pipeline.get_input_dataset( data_filepattern=FLAGS.training_data_filepattern, input_config=input_config, vocab_file_dir=FLAGS.vocab_dir, batch_size=100) print(rep_dataset) for data in rep_dataset: for i in range(100): yield ( "serving_default", { "context_movie_genre" : data[0]["context_movie_genre"][i], "context_movie_id" : data[0]["context_movie_id"][i], "context_movie_rating" : data[0]["context_movie_rating"][i], } ) return converter.optimizations = [tf.lite.Optimize.DEFAULT] converter.representative_dataset = representative_data_gen tflite_quant_model = converter.convert() tflite_quant_model_path = os.path.join(export_dir, 'model_quant.tflite') with tf.io.gfile.GFile(tflite_quant_model_path, 'wb') as f: f.write(tflite_quant_model) ``` 3. Failure after conversion The conversion is successful, but the generated model is wrong. The interpreter supports the model, but I consider there is a problem with the quantization parameters. ![image](https://github.com/tensorflow/tensorflow/assets/83610798/4bb684e6-98d5-414f-aac7-f2422cc6fec0) The quantization **scale** for **output_state_in** and the actual **output** is different. After consulting the source code I was not able to notice any difference in the way the 2 vectors are treated during evaluation, so I suspect there may be some issues with the conversion. I attached the generated model and the LSTM cell that has the problem highlighted. [model_quant (3).zip](https://github.com/tensorflow/tensorflow/files/13189426/model_quant.3.zip)
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62256/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62256/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62255
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62255/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62255/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62255/events
https://github.com/tensorflow/tensorflow/issues/62255
1,965,631,366
I_kwDOArmXAs51KSeG
62,255
Different Behavior of tf.raw_ops.DivNoNan with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi, @zoux1a ! I was able to replicate the issue reported here. Please find the attached gist [here](https://colab.research.google.com/gist/sushreebarsa/0aae5cba75276bf5cca75f1038b30b5a/62255.ipynb#scrollTo=FWqXpco-26dV). Thank you!", "Hi @zoux1a ,\r\n\r\nI noticed an issue here.\r\n\r\nInside the call function you are generating the value for images, which in each calls generates different random values because XLA currently ignores TF seeds to random operations which makes the output different for obvious reason. Please refer [known](https://www.tensorflow.org/xla/known_issues#random_number_generation_ignores_tf_seed) issues from XLA section.\r\n\r\nI have done the changes to shift images to outside the call function to ensure same inputs. I ran 10 experiments with different inputs of `x` & `tensor` and printed the difference or `reduce_sum` results of `no_op_res` and `op_res` which outputs `0` for each case.\r\n\r\nPlease refer attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/6f935bce59bde12810afe2ed1127c9c1/62255_final.ipynb) for the experiments.", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62255\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62255\">No</a>\n" ]
2023-10-27T14:17:13
2023-12-30T01:48:10
2023-12-30T01:48:05
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.DivNoNan** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a GPU device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): tensor = tf.random.normal([6, 10, 1, 1], dtype=tf.bfloat16) x = tf.raw_ops.DivNoNan(x=x, y=tensor) return x m = Network() inp = { "x": tf.random.normal([1, 1], dtype=tf.bfloat16), } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 26, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(6, 10, 1, 1) dtype=float64) = ' -80.0, 1.078125, 1.765625, ... b'y (shape=(6, 10, 1, 1) dtype=float64) = ' -2.171875, 1.5703125, 3.578125, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62255/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62255/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62254
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62254/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62254/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62254/events
https://github.com/tensorflow/tensorflow/issues/62254
1,965,619,901
I_kwDOArmXAs51KPq9
62,254
Different Behavior of tf.raw_ops.Zeta+tf.raw_ops.Square with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 2691123225, "node_id": "MDU6TGFiZWwyNjkxMTIzMjI1", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:tf.function", "name": "comp:tf.function", "color": "0052cc", "default": false, "description": "tf.function related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @zoux1a ,\r\n\r\nI have replicated the reported behaviour with jit_compile=True and with jit_compile = False as well. It seems not related to jit_compile issue. I attached a [gist](https://colab.research.google.com/gist/Venkat6871/72c9cb33e4d68a1e50dfe2db70e1682f/62254_gpu_2-14-nightly-v.ipynb) for your reference.\r\n\r\nThank you!", "Hi @zoux1a ,\r\n\r\n`tf.math.is_inf` will return True for both `+inf` and `-inf` also. Numpy has separate APIs(`np. isposinf, np.isneginf`) for this but in TF it seems don't have these. Hence it is difficult to identify +ve and -ve inf with TF APIs.\r\n\r\nHence the code you tested results in unexpected behaviour and can't guarantee same results. ", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62254\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62254\">No</a>\n" ]
2023-10-27T14:10:57
2023-12-30T01:48:13
2023-12-30T01:48:06
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? When the tf.raw_ops.Zeta+tf.raw_ops.Square operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **CPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback def replace_special_values(tensor): # Convert tensor to tf.float32 if it's not a supported dtype supported_dtypes = [tf.float16, tf.float32, tf.float64, tf.bfloat16] if tensor.dtype not in supported_dtypes: original_dtype = tensor.dtype tensor = tf.cast(tensor, tf.float32) else : original_dtype = None # Replace NaNs with zeros tensor = tf.where(tf.math.is_nan(tensor), tf.zeros_like(tensor), tensor) # Replace positive infinities with a large number (e.g., 1e30) tensor = tf.where(tf.math.is_inf(tensor), 100, tensor) # Replace negative infinities with a small number (e.g., -1e30) tensor = tf.where(tf.math.is_inf(tensor) & tf.math.less(tensor, 0), -100, tensor) # Convert tensor back to its original dtype if original_dtype is not None : tensor = tf.cast(tensor, original_dtype) return tensor class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): tensor = tf.random.normal([9, 9, 7, 10, 1], dtype=tf.float32) x = tf.raw_ops.Zeta(q=x, x=tensor) x = tf.raw_ops.Square(x=x, ) return x is_valid = True inf = float('inf') m = Network() tensor = tf.random.normal([7, 10, 8], dtype=tf.float32) inp = { "x": tensor, } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) no_op_res = replace_special_values(no_op_res) op_res = replace_special_values(op_res) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 54, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(9, 9, 7, 10, 8) dtype=float64) = ' 0.0, 0.0, 0.0, ... b'y (shape=(9, 9, 7, 10, 8) dtype=float64) = ' 0.0, 0.0, 0.0, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62254/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62254/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62253
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62253/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62253/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62253/events
https://github.com/tensorflow/tensorflow/issues/62253
1,965,601,986
I_kwDOArmXAs51KLTC
62,253
Different Behavior of tf.raw_ops.Exp+tf.raw_ops.Square with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 1133285679, "node_id": "MDU6TGFiZWwxMTMzMjg1Njc5", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:xla", "name": "comp:xla", "color": "0052cc", "default": false, "description": "XLA" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false }
[ { "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false } ]
null
[ "@zoux1a,\r\nI tried to execute the mentioned code on both [CPU](https://colab.research.google.com/gist/tilakrayal/418333a8757368178be2491ccbd4164d/untitled1482.ipynb) and [GPU](https://colab.research.google.com/gist/tilakrayal/1a746f8bfde6d33247e108f8094cd007/untitled1481.ipynb) with tensorflow v2.14 and observed that the error outputs are similar with both the cases. Kindly find the gist. Thank you!", "@tilakrayal ,\r\nYes, we have also tried running the code on both CPU and GPU and observed similar error outputs. Thanks for your information.", "@zoux1a,\r\n This is likely due to fusion, where the intermediate result may be computed and kept in float32 in the case of jit-compilation, whereas without fusion it would cast to bfloat16 between the ops and produce a less precise answer. Still, both are correct. Thank you!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62253\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62253\">No</a>\n" ]
2023-10-27T14:02:45
2023-12-07T01:49:18
2023-12-07T01:49:16
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.Exp+tf.raw_ops.Square** operation is invoked within a tf.function with JIT compilation enabled (jit_compile=True), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **CPU** device. ### Standalone code to reproduce the issue ```shell i can replicate this issue on colab: https://colab.research.google.com/drive/1otYLopKrwLbSNl5iwNrk05ofy59WLYP3?usp=sharing ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 53, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 9) dtype=float64) = ' 0.0, 0.0, 0.0, ... b'y (shape=(10, 9) dtype=float64) = ' -0.0, -0.0, 100.0, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62253/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62253/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62252
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62252/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62252/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62252/events
https://github.com/tensorflow/tensorflow/issues/62252
1,965,582,911
I_kwDOArmXAs51KGo_
62,252
Different Behavior of tf.raw_ops.Relu6+tf.raw_ops.Sigmoid with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1133285679, "node_id": "MDU6TGFiZWwxMTMzMjg1Njc5", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:xla", "name": "comp:xla", "color": "0052cc", "default": false, "description": "XLA" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @zoux1a ,\r\n\r\nReplicated the reported behaviour with `jit_compile=True` and with `jit_compile = False` no error as reported. Attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/33b78c9c51ab69005bb4d869711f85c2/62252_gpu-2-14v.ipynb) for reference.", "Hi @zoux1a ,\r\n\r\nThe issue seems to be dtypes compatibility of XLA Ops. Please check the XLA Ops with supported dtypes. I have checked with only compatible dtypes and `assert_near` is success. Could you please refer attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/4f82ca1df07a62ce2c66662240030fbe/62294_gpu.ipynb). Thanks.", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62252\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62252\">No</a>\n", "Hi @GwiHwan-Go ,\r\n\r\nI have tested the code with Tf2.14v and the difference is related to precision only which happens due to XLA internal fusions and conversions and XLA uses FP32 precision by default.\r\n\r\nTo check that , I have printed `tf.reduce_sum(no_op_res).numpy()` and `tf.reduce_sum(op_res).numpy()` which is printing `420` and `420` respectively. This indicates the results are same but only precision differences with XLA which is expected.\r\n\r\nPlease refer attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/3d2b86bd888f3f0d081c6b41425eb953/62252_final.ipynb).\r\n\r\nThanks!" ]
2023-10-27T13:52:43
2023-12-13T15:51:24
2023-11-17T01:49:05
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.Relu6+tf.raw_ops.Sigmoid** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **CPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.Relu6(features=x, ) x = tf.raw_ops.Sigmoid(x=x, ) return x m = Network() tensor = tf.random.normal([10, 9, 8], dtype=tf.bfloat16) inp = { "x": tensor, } with tf.device('/CPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/CPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 28, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 9, 8) dtype=float64) = ' 0.6875, 0.87890625, 0.84375, ... b'y (shape=(10, 9, 8) dtype=float64) = ' 0.6875, 0.87890625, 0.84375, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62252/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62252/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62251
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62251/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62251/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62251/events
https://github.com/tensorflow/tensorflow/issues/62251
1,965,571,687
I_kwDOArmXAs51KD5n
62,251
Different Behavior of tf.raw_ops.Zeta with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi, @zoux1a!\r\nI was able to replicate the issue reported [here](https://colab.research.google.com/gist/sushreebarsa/30c71f68e9324dcbf33b2c82bc7f24d3/62251.ipynb). Thank you! ", "Hi @zoux1a ,\r\n\r\nI noticed an issue here.\r\n\r\nInside the __call__ function you are generating the value for `tensor`, which in each calls generates different random values because XLA currently ignores TF seeds to random operations which makes the output different for obvious reason. Please refer [known](https://www.tensorflow.org/xla/known_issues#random_number_generation_ignores_tf_seed) issues from XLA section.\r\n\r\nI have done the changes to shift images to outside the call function to ensure same inputs. I ran 10 experiments with different inputs of x & tensor and printed the `reduce_sum` results of `no_op_res` and `op_res` which outputs same values except with minor FP precision for each case.\r\n\r\nPlease refer attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/09ea09b30967eb0cf6b7caead1d44546/62251_final.ipynb) for the experiments.\r\n", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62251\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62251\">No</a>\n" ]
2023-10-27T13:46:21
2023-12-30T01:48:16
2023-12-30T01:48:07
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.Zeta** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **CPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback def replace_special_values(tensor): # Convert tensor to tf.float32 if it's not a supported dtype supported_dtypes = [tf.float16, tf.float32, tf.float64, tf.bfloat16] if tensor.dtype not in supported_dtypes: original_dtype = tensor.dtype tensor = tf.cast(tensor, tf.float32) else : original_dtype = None # Replace NaNs with zeros tensor = tf.where(tf.math.is_nan(tensor), tf.zeros_like(tensor), tensor) # Replace positive infinities with a large number (e.g., 1e30) tensor = tf.where(tf.math.is_inf(tensor), 100, tensor) # Replace negative infinities with a small number (e.g., -1e30) tensor = tf.where(tf.math.is_inf(tensor) & tf.math.less(tensor, 0), -100, tensor) # Convert tensor back to its original dtype if original_dtype is not None : tensor = tf.cast(tensor, original_dtype) return tensor class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): tensor = tf.random.normal([6, 7, 10], dtype=tf.float32) x = tf.raw_ops.Zeta(q=x, x=tensor) return x m = Network() tensor = tf.random.normal([4, 4, 1, 1, 1], dtype=tf.float32) inp = { "x": tensor, } with tf.device('/CPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/CPU:0'): op_res = m(**inp) no_op_res = replace_special_values(no_op_res) op_res = replace_special_values(op_res) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 50, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(4, 4, 6, 7, 10) dtype=float64) = ' 0.0, 0.0, 0.0, ... b'y (shape=(4, 4, 6, 7, 10) dtype=float64) = ' 0.0, 0.0, 0.0, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62251/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62251/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62250
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62250/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62250/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62250/events
https://github.com/tensorflow/tensorflow/issues/62250
1,965,558,153
I_kwDOArmXAs51KAmJ
62,250
Different Behavior of tf.raw_ops.Acos+tf.raw_ops.exp with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 1133285679, "node_id": "MDU6TGFiZWwxMTMzMjg1Njc5", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:xla", "name": "comp:xla", "color": "0052cc", "default": false, "description": "XLA" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @zoux1a ,\r\n\r\nI have replicated the reported behaviour with jit_compile=True and with jit_compile = False. I don't find any errors with jit_compile=false . Here I attached a [gist](https://colab.research.google.com/gist/Venkat6871/8f27f7a7358eafa5696fabe46ddbe80b/62250_cpu-2-14-v.ipynb) for your reference.\r\n\r\nThank you!", "Hi @zoux1a ,\r\n\r\nThe difference is only of precisional difference which is expected due to various fusion operations inside XLA and also it does float32 conversions internally causing some precisional changes. Please refer developer [comment](https://github.com/tensorflow/tensorflow/issues/62287#issuecomment-1809045878) on similar behaviour.\r\n\r\nThe assertion is success if I modify `rtol` to `0.01` from `0.001`. Please refer attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/1325d7b8373872c0c1163dd61e119dff/62250_r1.ipynb#scrollTo=v15ia0SgDQsW).", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62250\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62250\">No</a>\n" ]
2023-10-27T13:39:34
2023-12-22T01:48:47
2023-12-22T01:48:44
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.Acos+tf.raw_ops.Exp** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **CPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.Acos(x=x, ) x = tf.raw_ops.Exp(x=x, ) return x m = Network() dic = {'ele': (-731778.6211090556-59304.1731637927j), 'size': [], 'dtype': tf.complex128} inp = { "x": tf.constant(dic['ele'], dtype=tf.as_dtype(dic['dtype'])), } with tf.device('/CPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/CPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 28, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=() dtype=float64) = ' -1.3327908001899897 b'y (shape=() dtype=float64) = ' -1.3287233642820495 ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62250/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62250/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62249
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62249/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62249/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62249/events
https://github.com/tensorflow/tensorflow/issues/62249
1,965,542,767
I_kwDOArmXAs51J81v
62,249
Different Behavior of tf.raw_ops.RealDiv+tf.raw_ops.Zeta with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "@zoux1a,\r\nI tried to execute the mentioned code on both [CPU](https://colab.research.google.com/gist/tilakrayal/83831a3564c9f37d52e6d068d8ac7dd8/untitled1485.ipynb) & [GPU](https://colab.research.google.com/gist/tilakrayal/2216e3f5d89d2b7513b6082e2fdc04f6/untitled1485.ipynb) with tensorflow v2.14 by having **jit_compilet=True & False** and observed that the code is executed in the similar error. Kindly find the gist of it here. Thank you!", "Hi, @tilakrayal \r\nWill this be fixed?", "This operation is involving random number operation inside the function and in both the cases it ends up giving different result.\r\n\r\nIt is producing the different random result for each run and it give the same error both with `jit` and without `jit` and most of the outputs are 0s \r\n\r\n```\r\ntf.Tensor(\r\n[[[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00]\r\n [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 -2.14894843e+00\r\n -4.87949133e-01 0.00000000e+00]\r\n [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 4.88830388e-01\r\n 1.29876584e-01 3.73942882e-01]\r\n [-4.36347818e+00 -5.26255035e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 -4.81049919e+00]\r\n [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00]\r\n [-2.84923196e+00 -1.44343531e+00 -2.66312265e+00 -3.35091400e+00\r\n -2.65819025e+00 -1.22158730e+00]\r\n [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00]\r\n [ 1.08069979e-01 3.39594245e-01 1.85945816e+01 2.87998247e+00\r\n 0.00000000e+00 2.00009853e-01]]\r\n```", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62249\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62249\">No</a>\n" ]
2023-10-27T13:32:13
2023-11-26T01:49:38
2023-11-26T01:49:34
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.RealDiv+tf.raw_ops.Zeta** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **GPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback def replace_special_values(tensor): # Convert tensor to tf.float32 if it's not a supported dtype supported_dtypes = [tf.float16, tf.float32, tf.float64, tf.bfloat16] if tensor.dtype not in supported_dtypes: original_dtype = tensor.dtype tensor = tf.cast(tensor, tf.float32) else : original_dtype = None # Replace NaNs with zeros tensor = tf.where(tf.math.is_nan(tensor), tf.zeros_like(tensor), tensor) # Replace positive infinities with a large number (e.g., 1e30) tensor = tf.where(tf.math.is_inf(tensor), 100, tensor) # Replace negative infinities with a small number (e.g., -1e30) tensor = tf.where(tf.math.is_inf(tensor) & tf.math.less(tensor, 0), -100, tensor) # Convert tensor back to its original dtype if original_dtype is not None : tensor = tf.cast(tensor, original_dtype) return tensor class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): tensor = tf.random.normal([9, 8, 6], dtype=tf.float32) x = tf.raw_ops.RealDiv(y=x, x=tensor) tensor1 = tf.random.normal([8, 1], dtype=tf.float32) x = tf.raw_ops.Zeta(q=x, x=tensor1) return x m = Network() tensor = tf.random.normal([1], dtype=tf.float32) inp = { "x": tensor, } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) no_op_res = replace_special_values(no_op_res) op_res = replace_special_values(op_res) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 80, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(9, 8, 6) dtype=float64) = ' 0.0, 0.0, 0.0, ... b'y (shape=(9, 8, 6) dtype=float64) = ' 0.0, 0.0, 0.0, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62249/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62249/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62248
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62248/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62248/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62248/events
https://github.com/tensorflow/tensorflow/issues/62248
1,965,343,950
I_kwDOArmXAs51JMTO
62,248
Tensorflow requires Python<3.8 for Docker
{ "login": "frkanyilmaz2", "id": 59698269, "node_id": "MDQ6VXNlcjU5Njk4MjY5", "avatar_url": "https://avatars.githubusercontent.com/u/59698269?v=4", "gravatar_id": "", "url": "https://api.github.com/users/frkanyilmaz2", "html_url": "https://github.com/frkanyilmaz2", "followers_url": "https://api.github.com/users/frkanyilmaz2/followers", "following_url": "https://api.github.com/users/frkanyilmaz2/following{/other_user}", "gists_url": "https://api.github.com/users/frkanyilmaz2/gists{/gist_id}", "starred_url": "https://api.github.com/users/frkanyilmaz2/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/frkanyilmaz2/subscriptions", "organizations_url": "https://api.github.com/users/frkanyilmaz2/orgs", "repos_url": "https://api.github.com/users/frkanyilmaz2/repos", "events_url": "https://api.github.com/users/frkanyilmaz2/events{/privacy}", "received_events_url": "https://api.github.com/users/frkanyilmaz2/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473173351, "node_id": "MDU6TGFiZWw0NzMxNzMzNTE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:build/install", "name": "type:build/install", "color": "159b2e", "default": false, "description": "Build and install issues" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1205615612, "node_id": "MDU6TGFiZWwxMjA1NjE1NjEy", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/subtype:%20ubuntu/linux", "name": "subtype: ubuntu/linux", "color": "b619ea", "default": false, "description": "Ubuntu/Linux Build/Installation Issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "@frkanyilmaz2 ,\r\n\r\nHere are my observations. \r\n\r\nTf2.14 needs Python to be in 3.9-3.11 versions range. Please refer the source for tested configurations.Python <3.8 is not in supported range and may raise backward compatibility issues.\r\n \r\nFrom the error log it searching for `tensorflow-intel==2.14.0` which is intel package intended for Windows CPU environment. For Linux TF has its own package which can be installed by using `pip install tensorflow` command itself. Could you please cross check the environment details and import suitable TF package.\r\n", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62248\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62248\">No</a>\n" ]
2023-10-27T11:41:27
2023-11-14T01:48:12
2023-11-14T01:48:10
NONE
null
null
null
### Issue type Build/Install ### Have you reproduced the bug with TensorFlow Nightly? Yes ### Source source ### TensorFlow version tf 2.14 ### Custom code Yes ### OS platform and distribution Ubuntu 20.04 ### Mobile device _No response_ ### Python version 3.9.18-slim-bullseye ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? When I tried create a container which based on python:3.9.18-slim-bullseye by docker compose, tensorflow didn't let the build complete as it required python >2.6 and python<3.8. ### Standalone code to reproduce the issue ```shell FROM python:3.9.18-slim-bullseye RUN pip install --upgrade pip && pip install pip-tools COPY ./requirements.txt . RUN pip install -r requirements.txt WORKDIR /app ## add app COPY . /app RUN apt-get update && apt-get install -y netcat ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini /tini RUN chmod +x /tini # Set Tini as the ENTRYPOINT and specify Uvicorn CMD ENTRYPOINT ["/tini", "--"] CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "30022"] requirements.txt tensorboard==2.14.0 tensorboard-data-server==0.7.2 tensorflow==v2.15.0-rc0 tensorflow-estimator==v2.15.0-rc0 tensorflow-intel==v2.15.0-rc0 tensorflow-io-gcs-filesystem==0.31.0 ``` ### Relevant log output ```shell ERROR: Ignored the following versions that require a different python version: 0.2.1 Requires-Python >2.6, !=3.3.*, <3.8 ERROR: Could not find a version that satisfies the requirement tensorflow-intel==2.14.0 (from versions: 0.0.1) ERROR: No matching distribution found for tensorflow-intel==2.14.0 ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62248/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62248/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62247
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62247/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62247/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62247/events
https://github.com/tensorflow/tensorflow/issues/62247
1,964,806,614
I_kwDOArmXAs51HJHW
62,247
Different Behavior of tf.raw_ops.DivNoNan+tf.raw_ops.Asin with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @zoux1a ,\r\n\r\nI have replicated the behaviour with jit_compile=True. With jit_compile=False and also by commenting out the code tf.config.run_functions_eagerly(False) the problem does not persist. Attached [gist](https://colab.research.google.com/gist/sushreebarsa/681ba89eaa46b5ed47781cb977dda47c/62247.ipynb) for reference. \r\nThank you!", "However, we think the different behaviors between eager mode and `jit_compiled` should be corrected in the future. Will it be fixed?", "Hi @zoux1a ,\r\n\r\nThe difference in outputs is only minor precisional change which is expected with XLA due to internal fusions and conversions from `bfloat16` to `float32` etc. \r\n\r\nI have changed the `rtol` to `0.01` from `0.001` and executed the code 10 runs and it executed successfully. Please refer attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/d970c2bd79dca7e44b3ab782dcf96f4d/62247_final.ipynb).", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62247\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62247\">No</a>\n" ]
2023-10-27T05:42:52
2023-12-30T01:48:19
2023-12-30T01:48:09
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the tf.raw_ops.DivNoNan+tf.raw_ops.Asin operation is invoked within a tf.function with JIT compilation enabled (jit_compile=True), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a CPU device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback def replace_special_values(tensor): # Convert tensor to tf.float32 if it's not a supported dtype supported_dtypes = [tf.float16, tf.float32, tf.float64, tf.bfloat16] if tensor.dtype not in supported_dtypes: original_dtype = tensor.dtype tensor = tf.cast(tensor, tf.float32) else : original_dtype = None # Replace NaNs with zeros tensor = tf.where(tf.math.is_nan(tensor), tf.zeros_like(tensor), tensor) # Replace positive infinities with a large number (e.g., 1e30) tensor = tf.where(tf.math.is_inf(tensor), 100, tensor) # Replace negative infinities with a small number (e.g., -1e30) tensor = tf.where(tf.math.is_inf(tensor) & tf.math.less(tensor, 0), -100, tensor) # Convert tensor back to its original dtype if original_dtype is not None : tensor = tf.cast(tensor, original_dtype) return tensor class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): dic = {'ele': [[-921600.0, -499712.0, 638976.0, 344064.0]], 'size': [1, 4], 'dtype': tf.bfloat16} x = tf.raw_ops.DivNoNan(y=x, x=tf.constant(dic['ele'], dtype=tf.as_dtype(dic['dtype']))) x = tf.raw_ops.Asin(x=x, ) return x m = Network() dic = {'ele': [[688128.0, -344064.0, -778240.0, -532480.0], [-466944.0, -888832.0, 843776.0, -172032.0], [-704512.0, -389120.0, -827392.0, -188416.0], [778240.0, 32768.0, 794624.0, 761856.0], [-122880.0, -110592.0, -811008.0, 139264.0], [-561152.0, 106496.0, -389120.0, -548864.0], [909312.0, -94208.0, -499712.0, 811008.0]], 'size': [7, 4], 'dtype': tf.bfloat16} inp = { "x": tf.constant(dic['ele'], dtype=tf.as_dtype(dic['dtype'])), } with tf.device('/CPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/CPU:0'): op_res = m(**inp) no_op_res = replace_special_values(no_op_res) op_res = replace_special_values(op_res) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 53, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(7, 4) dtype=float64) = ' 0.0, 0.0, -0.9609375, ... b'y (shape=(7, 4) dtype=float64) = ' 0.0, 0.0, -0.95703125, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62247/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62247/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62246
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62246/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62246/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62246/events
https://github.com/tensorflow/tensorflow/issues/62246
1,964,746,206
I_kwDOArmXAs51G6Xe
62,246
Different Behavior of tf.raw_ops.Zeta with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false }
[ { "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false } ]
null
[ "![image](https://github.com/tensorflow/tensorflow/assets/120479977/c5f8c38d-df65-42de-b1f5-15b414381983)\r\n\r\nI'm trying to recreate the issue, but the code i copied from your issue is not creating any inconsistency. or if it is then i am not able to figure out the inconsistency. \r\nthank you for your time!", "@zoux1a Inside the call function you are generating the value for tensor, which in each calls generates different random values because XLA currently ignores TF seeds to random operations which makes the output different for obvious reason. Please refer [known](https://www.tensorflow.org/xla/known_issues#random_number_generation_ignores_tf_seed) issues from XLA section.\r\n\r\nPlease have a look at this modified [gist](https://colab.research.google.com/gist/sushreebarsa/cb6eb80f33f04716a56da117e291a439/62246.ipynb) for reference.\r\nThank you!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62246\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62246\">No</a>\n" ]
2023-10-27T04:30:50
2023-12-30T01:48:22
2023-12-30T01:48:11
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.Zeta** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **CPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback def replace_special_values(tensor): # Convert tensor to tf.float32 if it's not a supported dtype supported_dtypes = [tf.float16, tf.float32, tf.float64, tf.bfloat16] if tensor.dtype not in supported_dtypes: original_dtype = tensor.dtype tensor = tf.cast(tensor, tf.float32) else : original_dtype = None # Replace NaNs with zeros tensor = tf.where(tf.math.is_nan(tensor), tf.zeros_like(tensor), tensor) # Replace positive infinities with a large number (e.g., 1e30) tensor = tf.where(tf.math.is_inf(tensor), 100, tensor) # Replace negative infinities with a small number (e.g., -1e30) tensor = tf.where(tf.math.is_inf(tensor) & tf.math.less(tensor, 0), -100, tensor) # Convert tensor back to its original dtype if original_dtype is not None : tensor = tf.cast(tensor, original_dtype) return tensor class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): random_tensor = tf.random.normal([2, 1, 10], dtype=tf.float32) x = tf.raw_ops.Zeta(q=x, x=random_tensor) return x m = Network() random_tensor = tf.random.normal([10, 1, 5, 10], dtype=tf.float32) inp = { "x": random_tensor, } with tf.device('/CPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/CPU:0'): op_res = m(**inp) no_op_res = replace_special_values(no_op_res) op_res = replace_special_values(op_res) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 51, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 2, 5, 10) dtype=float64) = ' 0.0, 0.0, 494.08197021484375, ... b'y (shape=(10, 2, 5, 10) dtype=float64) = ' 0.0, 11.413576126098633, 0.0, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62246/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62246/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62245
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62245/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62245/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62245/events
https://github.com/tensorflow/tensorflow/issues/62245
1,964,524,516
I_kwDOArmXAs51GEPk
62,245
Remove or update zh-cn translation from installation instructions
{ "login": "zcxsythenew", "id": 30565051, "node_id": "MDQ6VXNlcjMwNTY1MDUx", "avatar_url": "https://avatars.githubusercontent.com/u/30565051?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zcxsythenew", "html_url": "https://github.com/zcxsythenew", "followers_url": "https://api.github.com/users/zcxsythenew/followers", "following_url": "https://api.github.com/users/zcxsythenew/following{/other_user}", "gists_url": "https://api.github.com/users/zcxsythenew/gists{/gist_id}", "starred_url": "https://api.github.com/users/zcxsythenew/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zcxsythenew/subscriptions", "organizations_url": "https://api.github.com/users/zcxsythenew/orgs", "repos_url": "https://api.github.com/users/zcxsythenew/repos", "events_url": "https://api.github.com/users/zcxsythenew/events{/privacy}", "received_events_url": "https://api.github.com/users/zcxsythenew/received_events", "type": "User", "site_admin": false }
[ { "id": 284443156, "node_id": "MDU6TGFiZWwyODQ0NDMxNTY=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:docs-bug", "name": "type:docs-bug", "color": "159b2e", "default": false, "description": "Document issues" }, { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473173351, "node_id": "MDU6TGFiZWw0NzMxNzMzNTE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:build/install", "name": "type:build/install", "color": "159b2e", "default": false, "description": "Build and install issues" } ]
open
false
{ "login": "joefernandez", "id": 931947, "node_id": "MDQ6VXNlcjkzMTk0Nw==", "avatar_url": "https://avatars.githubusercontent.com/u/931947?v=4", "gravatar_id": "", "url": "https://api.github.com/users/joefernandez", "html_url": "https://github.com/joefernandez", "followers_url": "https://api.github.com/users/joefernandez/followers", "following_url": "https://api.github.com/users/joefernandez/following{/other_user}", "gists_url": "https://api.github.com/users/joefernandez/gists{/gist_id}", "starred_url": "https://api.github.com/users/joefernandez/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/joefernandez/subscriptions", "organizations_url": "https://api.github.com/users/joefernandez/orgs", "repos_url": "https://api.github.com/users/joefernandez/repos", "events_url": "https://api.github.com/users/joefernandez/events{/privacy}", "received_events_url": "https://api.github.com/users/joefernandez/received_events", "type": "User", "site_admin": false }
[ { "login": "joefernandez", "id": 931947, "node_id": "MDQ6VXNlcjkzMTk0Nw==", "avatar_url": "https://avatars.githubusercontent.com/u/931947?v=4", "gravatar_id": "", "url": "https://api.github.com/users/joefernandez", "html_url": "https://github.com/joefernandez", "followers_url": "https://api.github.com/users/joefernandez/followers", "following_url": "https://api.github.com/users/joefernandez/following{/other_user}", "gists_url": "https://api.github.com/users/joefernandez/gists{/gist_id}", "starred_url": "https://api.github.com/users/joefernandez/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/joefernandez/subscriptions", "organizations_url": "https://api.github.com/users/joefernandez/orgs", "repos_url": "https://api.github.com/users/joefernandez/repos", "events_url": "https://api.github.com/users/joefernandez/events{/privacy}", "received_events_url": "https://api.github.com/users/joefernandez/received_events", "type": "User", "site_admin": false }, { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[]
2023-10-26T23:37:26
2023-11-03T22:00:46
null
NONE
null
null
null
The latest version of Tensorflow does not support GPU on Windows Native. However, the [zh-cn translation](https://www.tensorflow.org/install/pip?hl=zh-cn) says nothing about it. The translation has now been outdated and misleading. When I tried to contribute to the [l10n](/tensorflow/docs-l10n/), I only found a "[DO_NOT_TRANSLATE](/tensorflow/docs-l10n/blob/master/site/zh-cn/install/DO_NOT_TRANSLATE)" file, and the [README](/tensorflow/docs-l10n#do-not-translate) says, "tensorflow.org does not translate time-sensitive sections like the installation instructions." If the installation instructions will not be translated any more, please remove the translation.
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62245/reactions", "total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62245/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62244
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62244/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62244/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62244/events
https://github.com/tensorflow/tensorflow/issues/62244
1,964,412,579
I_kwDOArmXAs51Fo6j
62,244
non_max_suppression_padded is very slow and doesn't appear to be using a cuda or GPU implementation
{ "login": "EdIzaguirre", "id": 55713891, "node_id": "MDQ6VXNlcjU1NzEzODkx", "avatar_url": "https://avatars.githubusercontent.com/u/55713891?v=4", "gravatar_id": "", "url": "https://api.github.com/users/EdIzaguirre", "html_url": "https://github.com/EdIzaguirre", "followers_url": "https://api.github.com/users/EdIzaguirre/followers", "following_url": "https://api.github.com/users/EdIzaguirre/following{/other_user}", "gists_url": "https://api.github.com/users/EdIzaguirre/gists{/gist_id}", "starred_url": "https://api.github.com/users/EdIzaguirre/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/EdIzaguirre/subscriptions", "organizations_url": "https://api.github.com/users/EdIzaguirre/orgs", "repos_url": "https://api.github.com/users/EdIzaguirre/repos", "events_url": "https://api.github.com/users/EdIzaguirre/events{/privacy}", "received_events_url": "https://api.github.com/users/EdIzaguirre/received_events", "type": "User", "site_admin": false }
[ { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 1463677878, "node_id": "MDU6TGFiZWwxNDYzNjc3ODc4", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:performance", "name": "type:performance", "color": "159b2e", "default": false, "description": "Performance Issue" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
open
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[]
2023-10-26T21:43:55
2023-12-06T21:11:38
null
NONE
null
null
null
### Issue type Performance ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14 ### Custom code Yes ### OS platform and distribution _No response_ ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? Trying to use tf.image.non_max_suppression_padded results in very slow inference. This appears to be due to a lack of C++/CUDA implementation. Check out [this link](https://colab.research.google.com/drive/1Ost8zmFJJrtgDCPOIaiMatFFTNlDUr4N?usp=sharing) for an example. The KerasCV NonMaxSuppression layer uses tf.image.non_max_suppression_padded, which appears to call non_max_suppression_padded_v2 ([link](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/python/ops/image_ops_impl.py#L5387-L5477)). Looking into the code for non_max_suppression_padded_v2, it appears to use a Python implementation, rather than a C++/CUDA implementation. Is there a reason for this? Has the implementation not been done? You can see a discussion of this issue in the KerasCV repo ([link](https://github.com/keras-team/keras-cv/issues/2014)). ### Standalone code to reproduce the issue ```shell # Running example can be found here: https://colab.research.google.com/drive/1Ost8zmFJJrtgDCPOIaiMatFFTNlDUr4N?usp=sharing ! pip install --upgrade -q git+https://github.com/keras-team/keras-cv import logging import tensorflow as tf import os import numpy as np import keras_core as keras import keras_cv print(tf.__version__) image_path = tf.keras.utils.get_file(origin="https://placekitten.com/g/200/300") def preprocess_image(file_path): inference_resizing = keras_cv.layers.Resizing( 640, 640, bounding_box_format="xywh", pad_to_aspect_ratio=True) image = keras.utils.load_img(file_path) image = np.array(image) return inference_resizing([image]) inputs = preprocess_image(image_path) model = keras_cv.models.RetinaNet.from_preset( "retinanet_resnet50_pascalvoc", bounding_box_format="xywh") # Slow (single class NMS) # model.prediction_decoder = keras_cv.layers.NonMaxSuppression( # bounding_box_format="xywh", # from_logits=True, # iou_threshold=0.5, # confidence_threshold=0.5, # ) # Fast (multiclass NMS) model.prediction_decoder = keras_cv.layers.MultiClassNonMaxSuppression( bounding_box_format="xywh", from_logits=True, iou_threshold=0.5, confidence_threshold=0.5, ) y_pred = model.predict(inputs) ``` ### Relevant log output _No response_
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62244/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62244/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62243
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62243/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62243/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62243/events
https://github.com/tensorflow/tensorflow/pull/62243
1,964,090,611
PR_kwDOArmXAs5d5aEV
62,243
[XLA:CPU] [oneDNN] Adding support for MatMul + BiasAdd fusion with oneDNN custom call rewrite
{ "login": "mahmoud-abuzaina", "id": 24963061, "node_id": "MDQ6VXNlcjI0OTYzMDYx", "avatar_url": "https://avatars.githubusercontent.com/u/24963061?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mahmoud-abuzaina", "html_url": "https://github.com/mahmoud-abuzaina", "followers_url": "https://api.github.com/users/mahmoud-abuzaina/followers", "following_url": "https://api.github.com/users/mahmoud-abuzaina/following{/other_user}", "gists_url": "https://api.github.com/users/mahmoud-abuzaina/gists{/gist_id}", "starred_url": "https://api.github.com/users/mahmoud-abuzaina/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mahmoud-abuzaina/subscriptions", "organizations_url": "https://api.github.com/users/mahmoud-abuzaina/orgs", "repos_url": "https://api.github.com/users/mahmoud-abuzaina/repos", "events_url": "https://api.github.com/users/mahmoud-abuzaina/events{/privacy}", "received_events_url": "https://api.github.com/users/mahmoud-abuzaina/received_events", "type": "User", "site_admin": false }
[ { "id": 1133285679, "node_id": "MDU6TGFiZWwxMTMzMjg1Njc5", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:xla", "name": "comp:xla", "color": "0052cc", "default": false, "description": "XLA" }, { "id": 1173072136, "node_id": "MDU6TGFiZWwxMTczMDcyMTM2", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/size:XL", "name": "size:XL", "color": "adafea", "default": false, "description": "CL Change Size:Extra Large" } ]
closed
false
{ "login": "penpornk", "id": 38085909, "node_id": "MDQ6VXNlcjM4MDg1OTA5", "avatar_url": "https://avatars.githubusercontent.com/u/38085909?v=4", "gravatar_id": "", "url": "https://api.github.com/users/penpornk", "html_url": "https://github.com/penpornk", "followers_url": "https://api.github.com/users/penpornk/followers", "following_url": "https://api.github.com/users/penpornk/following{/other_user}", "gists_url": "https://api.github.com/users/penpornk/gists{/gist_id}", "starred_url": "https://api.github.com/users/penpornk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/penpornk/subscriptions", "organizations_url": "https://api.github.com/users/penpornk/orgs", "repos_url": "https://api.github.com/users/penpornk/repos", "events_url": "https://api.github.com/users/penpornk/events{/privacy}", "received_events_url": "https://api.github.com/users/penpornk/received_events", "type": "User", "site_admin": false }
[ { "login": "penpornk", "id": 38085909, "node_id": "MDQ6VXNlcjM4MDg1OTA5", "avatar_url": "https://avatars.githubusercontent.com/u/38085909?v=4", "gravatar_id": "", "url": "https://api.github.com/users/penpornk", "html_url": "https://github.com/penpornk", "followers_url": "https://api.github.com/users/penpornk/followers", "following_url": "https://api.github.com/users/penpornk/following{/other_user}", "gists_url": "https://api.github.com/users/penpornk/gists{/gist_id}", "starred_url": "https://api.github.com/users/penpornk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/penpornk/subscriptions", "organizations_url": "https://api.github.com/users/penpornk/orgs", "repos_url": "https://api.github.com/users/penpornk/repos", "events_url": "https://api.github.com/users/penpornk/events{/privacy}", "received_events_url": "https://api.github.com/users/penpornk/received_events", "type": "User", "site_admin": false }, { "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false } ]
null
[ "Added @penpornk as reviewer based on her expertise.", "Hi @penpornk, Can you please review this PR ? Thank you!", "Replaced by https://github.com/openxla/xla/pull/7484." ]
2023-10-26T18:11:56
2023-12-05T15:45:40
2023-12-05T15:45:37
CONTRIBUTOR
null
false
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/pulls/62243", "html_url": "https://github.com/tensorflow/tensorflow/pull/62243", "diff_url": "https://github.com/tensorflow/tensorflow/pull/62243.diff", "patch_url": "https://github.com/tensorflow/tensorflow/pull/62243.patch", "merged_at": null }
This PR enables OneDNN library call for the matched XLA HLO MatMul + BiasAdd patterns through custom_call instruction. In particular, this PR: 1. Renames oneDNN matmul rewriter pass and moves it after layout assignment pass. 2. Enables transposed input support for oneDNN matmul 3. Enables MatMul + BiasAdd pattern matching with oneDNN rewrite 4. Adds multiple tests with different variations of MatMul + BiasAdd pattern
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62243/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62243/timeline
null
null
true
https://api.github.com/repos/tensorflow/tensorflow/issues/62242
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62242/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62242/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62242/events
https://github.com/tensorflow/tensorflow/pull/62242
1,963,992,145
PR_kwDOArmXAs5d5Eg2
62,242
Update the hello word example link in build_convert.md
{ "login": "pjpratik", "id": 118897289, "node_id": "U_kgDOBxY6iQ", "avatar_url": "https://avatars.githubusercontent.com/u/118897289?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pjpratik", "html_url": "https://github.com/pjpratik", "followers_url": "https://api.github.com/users/pjpratik/followers", "following_url": "https://api.github.com/users/pjpratik/following{/other_user}", "gists_url": "https://api.github.com/users/pjpratik/gists{/gist_id}", "starred_url": "https://api.github.com/users/pjpratik/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pjpratik/subscriptions", "organizations_url": "https://api.github.com/users/pjpratik/orgs", "repos_url": "https://api.github.com/users/pjpratik/repos", "events_url": "https://api.github.com/users/pjpratik/events{/privacy}", "received_events_url": "https://api.github.com/users/pjpratik/received_events", "type": "User", "site_admin": false }
[ { "id": 390482148, "node_id": "MDU6TGFiZWwzOTA0ODIxNDg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/awaiting%20review", "name": "awaiting review", "color": "bc3869", "default": false, "description": "Pull request awaiting review" }, { "id": 750616506, "node_id": "MDU6TGFiZWw3NTA2MTY1MDY=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:lite", "name": "comp:lite", "color": "0052cc", "default": false, "description": "TF Lite related issues" }, { "id": 987666414, "node_id": "MDU6TGFiZWw5ODc2NjY0MTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/ready%20to%20pull", "name": "ready to pull", "color": "2cd643", "default": false, "description": "PR ready for merge process" }, { "id": 1169364259, "node_id": "MDU6TGFiZWwxMTY5MzY0MjU5", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/size:XS", "name": "size:XS", "color": "adafea", "default": false, "description": "CL Change Size: Extra Small" } ]
closed
false
{ "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false }
[ { "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @Ferev, Can you please review this PR ? Thank you!", "Hi @Ferev, Can you please review this PR ? Thank you!" ]
2023-10-26T17:03:15
2023-12-06T15:20:09
2023-12-06T15:20:08
CONTRIBUTOR
null
false
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/pulls/62242", "html_url": "https://github.com/tensorflow/tensorflow/pull/62242", "diff_url": "https://github.com/tensorflow/tensorflow/pull/62242.diff", "patch_url": "https://github.com/tensorflow/tensorflow/pull/62242.patch", "merged_at": "2023-12-06T15:20:08" }
The `evalute_test.cc` has been renamed to `hello_world_test.cc` with the commit https://github.com/tensorflow/tflite-micro/commit/51b11ee5258c3644d3716b8bc27e424b2cf9fdfa hence creating a broken link.
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62242/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62242/timeline
null
null
true
https://api.github.com/repos/tensorflow/tensorflow/issues/62241
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62241/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62241/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62241/events
https://github.com/tensorflow/tensorflow/issues/62241
1,963,188,776
I_kwDOArmXAs51A-Io
62,241
[RISCV64] can't link soft-float modules with double-float modules
{ "login": "qinhj", "id": 13825859, "node_id": "MDQ6VXNlcjEzODI1ODU5", "avatar_url": "https://avatars.githubusercontent.com/u/13825859?v=4", "gravatar_id": "", "url": "https://api.github.com/users/qinhj", "html_url": "https://github.com/qinhj", "followers_url": "https://api.github.com/users/qinhj/followers", "following_url": "https://api.github.com/users/qinhj/following{/other_user}", "gists_url": "https://api.github.com/users/qinhj/gists{/gist_id}", "starred_url": "https://api.github.com/users/qinhj/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qinhj/subscriptions", "organizations_url": "https://api.github.com/users/qinhj/orgs", "repos_url": "https://api.github.com/users/qinhj/repos", "events_url": "https://api.github.com/users/qinhj/events{/privacy}", "received_events_url": "https://api.github.com/users/qinhj/received_events", "type": "User", "site_admin": false }
[ { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473173351, "node_id": "MDU6TGFiZWw0NzMxNzMzNTE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:build/install", "name": "type:build/install", "color": "159b2e", "default": false, "description": "Build and install issues" }, { "id": 1205615612, "node_id": "MDU6TGFiZWwxMjA1NjE1NjEy", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/subtype:%20ubuntu/linux", "name": "subtype: ubuntu/linux", "color": "b619ea", "default": false, "description": "Ubuntu/Linux Build/Installation Issues" }, { "id": 5508003926, "node_id": "LA_kwDOArmXAs8AAAABSE14Vg", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF%202.13", "name": "TF 2.13", "color": "B13ACB", "default": false, "description": "For issues related to Tensorflow 2.13" } ]
open
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "@qinhj This issue occurs as the soft-float and double-float ABIs are incompatible. Due to this incompatibility between ABIs ,if you try to link soft-float modules with double-float modules, the linker will not be able to resolve the symbols between the two modules. That will cause this error. Please try to compile all the modules with the same floating point ABIs to avoid this issue. Thank you!", "> @qinhj This issue occurs as the soft-float and double-float ABIs are incompatible. Due to this incompatibility between ABIs ,if you try to link soft-float modules with double-float modules, the linker will not be able to resolve the symbols between the two modules. That will cause this error. Please try to compile all the modules with the same floating point ABIs to avoid this issue. Thank you!\r\n\r\nThanks for your reply.\r\nI have already found the root cause before open this issue and had a quick solution.\r\n\r\nMy questions are:\r\n1. Is there any other way to fix this issue?\r\nI didn't find any way to pass the abi info to llvm from saved_model_cli.py and saved_model_aot_compile.py(maybe the \"target_features\" options?) Or did I miss sth with test target //tensorflow/python/... ?\r\n2. How to fix: Executing genrule //tensorflow/python/tools:aot_compiled_x_matmul_y_small_gen failed\r\n3. How to fix: errors encountered while analyzing target xxx\r\n\r\nMay be you can have a glance at [here](https://github.com/tensorflow/tensorflow/issues/62241#:~:text=After%20I%20fixed,to%2Dsup.patch)", "@qinhj Thank you for your response here!\r\nPlease have a look at these workarounds as follows;\r\n1. Yes, you can pass the ABI info to llvm from saved_model_cli.py and saved_model_aot_compile.py using the `target_features` option. The target_features option allows you to specify the floating-point ABI that is used to compile the saved model.\r\n2. Make sure that the AOT-compiled XMatMulYSmall genrule is supported on your platform. You can check this by running the following command:\r\n```\r\npython -m tensorflow.python.tools.aot_genrule_compiler --list_genrules\r\n```\r\n3. Make sure that the target xxx is defined correctly. You can check this by running the following command:\r\n```\r\nbazel query 'kind(rule, xxx)'\r\n```\r\n\r\nThank you!", "> @qinhj Thank you for your response here! Please have a look at these workarounds as follows;\r\n> \r\n> 1. Yes, you can pass the ABI info to llvm from saved_model_cli.py and saved_model_aot_compile.py using the `target_features` option. The target_features option allows you to specify the floating-point ABI that is used to compile the saved model.\r\n> 2. Make sure that the AOT-compiled XMatMulYSmall genrule is supported on your platform. You can check this by running the following command:\r\n> \r\n> ```\r\n> python -m tensorflow.python.tools.aot_genrule_compiler --list_genrules\r\n> ```\r\n> \r\n> 3. Make sure that the target xxx is defined correctly. You can check this by running the following command:\r\n> \r\n> ```\r\n> bazel query 'kind(rule, xxx)'\r\n> ```\r\n> \r\n> Thank you!\r\n\r\n@sushreebarsa Thanks a lot.\r\n\r\nI have tried your workarounds (based on v2.13.1):\r\n\r\n1. According to the description of \"target_features\", one can pass features like \"+avx2\", \"+neon\" to the llvm target feature, but it seems that it doesn't work with \"-mabi=lp64d\", \"+mabi=lp64d\" or \"lp64d\". So, which feature string shall I use, to pass the floating-point ABI to the llvm? Can you show me the example?\r\n```txt\r\n'lp64d' is not a recognized feature for this target (ignoring feature)\r\n```\r\n2. No module named tensorflow.python.tools.aot_genrule_compiler\r\n3. Tried with target '//tensorflow/python/kernel_tests/math_ops:batch_matmul_op_test_cpu' and the target seems defined well:\r\n```bash\r\nbazel --output_user_root=$(pwd)/workspace query 'kind(rule,//tensorflow/python/kernel_tests/math_ops:batch_matmul_op_test_cpu)'\r\n```\r\n```txt\r\nStarting local Bazel server and connecting to it...\r\n... still trying to connect to local Bazel server (195) after 10 seconds ...\r\n//tensorflow/python/kernel_tests/math_ops:batch_matmul_op_test_cpu\r\nLoading: 1 packages loaded\r\n```" ]
2023-10-26T10:19:46
2023-12-06T00:22:00
null
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version tf2.13.1 ### Custom code No ### OS platform and distribution Linux Ubuntu 23.04 (riscv64) ### Mobile device None ### Python version 3.11.4 ### Bazel version v5.4.0 && v6.3.2 ### GCC/compiler version gcc (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0 ### CUDA/cuDNN version without cuda support ### GPU model and memory _No response_ ### Current behavior? After I fixed some issues(see the attached patches) during building tensorflow from source(v2.13.1) , I met an unexpected error: **Can't link soft-float modules with double-float modules** during bazel test target //tensorflow/python/tools:aot_compiled_test(see relevant log output for more details). It seems that the root cause of this issue is the default abi return by [RISCVISAInfo::computeDefaultABI](https://github.com/llvm/llvm-project/blob/dc275fd03254d67d29cc70a5a0569acf24d2280d/llvm/lib/Support/RISCVISAInfo.cpp#L1167) in [llvm/lib/Support/RISCVISAInfo.cpp](https://github.com/llvm/llvm-project/blob/dc275fd03254d67d29cc70a5a0569acf24d2280d/llvm/lib/Support/RISCVISAInfo.cpp) is "lp64" (i.e. soft float, 0x0), while the libraries(e.g. libm.so, libstdc++.so, etc.) in the riscv64 env has Flags "0x5": $ readelf -h bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_plus_y.o ELF Header: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: REL (Relocatable file) Machine: RISC-V Version: 0x1 Entry point address: 0x0 Start of program headers: 0 (bytes into file) Start of section headers: 808 (bytes into file) **Flags: 0x0** **<= here** Size of this header: 64 (bytes) Size of program headers: 0 (bytes) Number of program headers: 0 Size of section headers: 64 (bytes) Number of section headers: 9 Section header string table index: 1 $ readelf -h /usr/lib/riscv64-linux-gnu/libm.so.6 # libc.so.6, libstdc++.so.6.0.32 ELF Header: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: DYN (Shared object file) Machine: RISC-V Version: 0x1 Entry point address: 0x0 Start of program headers: 64 (bytes into file) Start of section headers: 447232 (bytes into file) **Flags: 0x5, RVC, double-float ABI** **<= here!** Size of this header: 64 (bytes) Size of program headers: 56 (bytes) Number of program headers: 7 Size of section headers: 64 (bytes) Number of section headers: 28 Section header string table index: 27 According to the [lldb/include/lldb/Utility/ArchSpec.h](https://github.com/llvm/llvm-project/blob/dc275fd03254d67d29cc70a5a0569acf24d2280d/lldb/include/lldb/Utility/ArchSpec.h): enum RISCVeflags { eRISCV_rvc = 0x00000001, /// RVC, +c eRISCV_float_abi_soft = 0x00000000, /// soft float eRISCV_float_abi_single = 0x00000002, /// single precision floating point, +f eRISCV_float_abi_double = 0x00000004, /// double precision floating point, +d eRISCV_float_abi_quad = 0x00000006, /// quad precision floating point, +q eRISCV_float_abi_mask = 0x00000006, eRISCV_rve = 0x00000008, /// RVE, +e eRISCV_tso = 0x00000010, /// RVTSO (total store ordering) }; It seems that `0x5` == eRISCV_float_abi_double +(??) eRISCV_rvc (i.e. RVC, double-float) and `0x0` == eRISCV_float_abi_soft(i.e. soft-float) A quick solution: hard coded the ABIName(as "lp64d") in the llvm target options, which required by createTargetMachine, e.g. [debug_xla_cpu_compiler.patch](https://github.com/tensorflow/tensorflow/files/13176243/debug_xla_cpu_compiler.patch) Anyway, I have 3 questions: 1. **_Is there any other way to fix this issue?_** I didn't find any way to pass the abi info to llvm from saved_model_cli.py and saved_model_aot_compile.py(maybe the "target_features" options?) Or did I miss sth with test target //tensorflow/python/... ? 2. How to fix: Executing genrule //tensorflow/python/tools:aot_compiled_x_matmul_y_small_gen failed 3. How to fix: errors encountered while analyzing target xxx Some necessary patches to build tensorflow with riscv64 platform: [0001-patch-third_parth-llvm-add-new-llvm-config-defines-t.patch](https://github.com/tensorflow/tensorflow/files/13176244/0001-patch-third_parth-llvm-add-new-llvm-config-defines-t.patch) [0002-patch-compiler-xla-add-new-select-for-cc_library-dep.patch](https://github.com/tensorflow/tensorflow/files/13176246/0002-patch-compiler-xla-add-new-select-for-cc_library-dep.patch) [0003-patch-compiler-aot-add-new-llvm-target-triple-to-sup.patch](https://github.com/tensorflow/tensorflow/files/13176248/0003-patch-compiler-aot-add-new-llvm-target-triple-to-sup.patch) ### Standalone code to reproduce the issue ```shell Reproduction Steps: # 1. Prepare a riscv64 env, e.g. riscv64/ubuntu:23.04 with qemu $ wget https://github.com/multiarch/qemu-user-static/releases/download/v7.2.0-1/qemu-riscv64-static $ docker run -itd --name xxx --net=host --privileged --platform riscv64 -v $(pwd)/qemu-riscv64-static:/usr/bin/qemu-riscv64-static -v $HOME:/home/$USER -w /home/$USER riscv64/ubuntu:23.04 /bin/bash $ docker exec -it xxx /bin/bash # 2. Build bazel from source with version >= 5.0.0 (since I didn't find a prebuilt version for riscv64) # Note: Although bazel has supported riscv64 platform since v5.0.0, this is a typo in `tools/jdk/BUILD.tools`(fixed since v6.0.0). (Here, I've built and tested bazel with both v5.4.0 and v6.3.2) $ export PATH=${PATH_TO_MY_BAZEL}:$PATH # add my bazel path to PATH # 3. Apply the above patches for tensorflow v2.13.1 source code # 4. Build tensorflow from source v2.13.1 $ python3 configure.py # without cuda/rocm/... support(i.e. cpu only) $ vi .bazelrc # add/update some necessary configuration, e.g. build --copt=-march=rv64gcv #native build --cxxopt=-march=rv64gcv #native build --host_copt=-march=rv64gcv #native build --host_cxxopt=-march=rv64gcv #native build --copt=-mabi=lp64d build --cxxopt=-mabi=lp64d build --host_copt=-mabi=lp64d build --host_cxxopt=-mabi=lp64d $ riscv64_opt="--config=opt --config=noaws --config=nogcp --config=nohdfs --config=nonccl" $ riscv64_opt="${riscv64_opt} --verbose_failures --define=tensorflow_mkldnn_contraction_kernel=0" $ riscv64_opt="${riscv64_opt} --sandbox_debug --local_ram_resources=20480 --repo_env=TF_PYTHON_VERSION=3.11" $ riscv64_tgt="//tensorflow:libtensorflow.so //tensorflow:libtensorflow_framework.so //tensorflow/tools/pip_package:build_pip_package" $ bazel --output_user_root=$(pwd)/workspace build -s -k ${riscv64_opt} ${riscv64_tgt} & ... INFO: Build completed successfully, xxx total actions # 5. Test kernel(s) $ flags="--verbose_failures --define=tensorflow_mkldnn_contraction_kernel=0 --experimental_scale_timeouts=100 --http_timeout_scaling=100 --config=opt -k -s" $ bazel --output_user_root=$(pwd)/workspace test ${flags} //tensorflow/python/... & # Then, one may meet this issue on riscv64 platform. ``` ### Relevant log output ```shell (py3.11.4) # flags="--verbose_failures --define=tensorflow_mkldnn_contraction_kernel=0 --experimental_scale_timeouts=100 --http_timeout_scaling=100 --config=opt -k" (py3.11.4) # bazel --output_user_root=$(pwd)/workspace test -s ${flags} //tensorflow/python/... & [1] 3687358 INFO: Reading 'startup' options from /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.bazelrc: --host_jvm_args=-Xmx30G, --host_jvm_args=-Xms30G, --host_jvm_args=-XX:MaxNewSize=3g, --host_jvm_args=-XX:-UseAdaptiveSizePolicy, --host_jvm_args=-XX:+UseConcMarkSweepGC, --host_jvm_args=-XX:TargetSurvivorRatio=70, --host_jvm_args=-XX:SurvivorRatio=6, --host_jvm_args=-XX:+UseCMSInitiatingOccupancyOnly, --host_jvm_args=-XX:CMSInitiatingOccupancyFraction=75 INFO: Options provided by the client: Inherited 'common' options: --isatty=1 --terminal_columns=173 INFO: Reading rc options for 'test' from /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.bazelrc: Inherited 'common' options: --experimental_repo_remote_exec INFO: Reading rc options for 'test' from /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.bazelrc: Inherited 'build' options: --jobs=32 --noexperimental_check_output_files --nostamp --noexperimental_check_output_files --copt=-march=rv64gcv --host_copt=-march=rv64gcv --define framework_shared_object=true --define tsl_protobuf_header_only=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --enable_platform_specific_config --define=with_xla_support=true --config=short_logs --config=v2 --define=no_aws_support=true --define=no_hdfs_support=true --experimental_cc_shared_library --experimental_link_static_libraries_once=false --incompatible_enforce_config_setting_visibility INFO: Reading rc options for 'test' from /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.tf_configure.bazelrc: Inherited 'build' options: --action_env PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 --action_env PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages --python_path=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 INFO: Reading rc options for 'test' from /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.bazelrc: Inherited 'build' options: --deleted_packages=tensorflow/compiler/mlir/tfrt,tensorflow/compiler/mlir/tfrt/benchmarks,tensorflow/compiler/mlir/tfrt/jit/python_binding,tensorflow/compiler/mlir/tfrt/jit/transforms,tensorflow/compiler/mlir/tfrt/python_tests,tensorflow/compiler/mlir/tfrt/tests,tensorflow/compiler/mlir/tfrt/tests/ir,tensorflow/compiler/mlir/tfrt/tests/analysis,tensorflow/compiler/mlir/tfrt/tests/jit,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_tfrt,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_jitrt,tensorflow/compiler/mlir/tfrt/tests/tf_to_corert,tensorflow/compiler/mlir/tfrt/tests/tf_to_tfrt_data,tensorflow/compiler/mlir/tfrt/tests/saved_model,tensorflow/compiler/mlir/tfrt/transforms/lhlo_gpu_to_tfrt_gpu,tensorflow/core/runtime_fallback,tensorflow/core/runtime_fallback/conversion,tensorflow/core/runtime_fallback/kernel,tensorflow/core/runtime_fallback/opdefs,tensorflow/core/runtime_fallback/runtime,tensorflow/core/runtime_fallback/util,tensorflow/core/tfrt/eager,tensorflow/core/tfrt/eager/backends/cpu,tensorflow/core/tfrt/eager/backends/gpu,tensorflow/core/tfrt/eager/core_runtime,tensorflow/core/tfrt/eager/cpp_tests/core_runtime,tensorflow/core/tfrt/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/graph_executor,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils,tensorflow/core/tfrt/utils/debug INFO: Reading rc options for 'test' from /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.tf_configure.bazelrc: 'test' options: --flaky_test_attempts=3 --test_size_filters=small,medium INFO: Found applicable config definition build:short_logs in file /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.bazelrc: --output_filter=DONT_MATCH_ANYTHING INFO: Found applicable config definition build:v2 in file /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1 INFO: Found applicable config definition test:v2 in file /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.tf_configure.bazelrc: --test_tag_filters=-benchmark-test,-no_oss,-oss_excluded,-gpu,-oss_serial,-v1only --build_tag_filters=-benchmark-test,-no_oss,-oss_excluded,-gpu,-v1only INFO: Found applicable config definition build:opt in file /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.tf_configure.bazelrc: --copt=-Wno-sign-compare --host_copt=-Wno-sign-compare INFO: Found applicable config definition build:linux in file /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.bazelrc: --define=build_with_onednn_v2=false --host_copt=-w --copt=-Wno-all --copt=-Wno-extra --copt=-Wno-deprecated --copt=-Wno-deprecated-declarations --copt=-Wno-ignored-attributes --copt=-Wno-array-bounds --copt=-Wunused-result --copt=-Werror=unused-result --copt=-Wswitch --copt=-Werror=switch --copt=-Wno-error=unused-but-set-variable --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --define=PROTOBUF_INCLUDE_PATH=$(PREFIX)/include --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --config=dynamic_kernels --experimental_guard_against_concurrent_changes INFO: Found applicable config definition build:dynamic_kernels in file /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_KERNELS Loading: 0 packages loaded WARNING: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/framework/BUILD:222:11: target '//tensorflow/python/framework:for_generated_wrappers' is deprecated: Depending on this target can cause build dependency cycles. Depend on the fine-grained sub-targets instead. WARNING: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/framework/BUILD:246:11: target '//tensorflow/python/framework:for_generated_wrappers_v2' is deprecated: Depending on this target can cause build dependency cycles. Depend on the fine-grained sub-targets instead. WARNING: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/eager/BUILD:548:11: target '//tensorflow/python/eager:framework_for_generated_wrappers' is deprecated: Depending on this target can cause build dependency cycles. Depend on the fine-grained sub-targets instead. WARNING: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/ops/distributions/BUILD:9:18: target '//tensorflow/python/ops/distributions:distributions' is deprecated: TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.distributions will not receive new features, and will be removed by early 2019. You should update all usage of `tf.distributions` to `tfp.distributions`. ERROR: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/external/bazel_tools/tools/jdk/BUILD:29:19: While resolving toolchains for target @bazel_tools//tools/jdk:current_java_runtime: no matching toolchains found for types @bazel_tools//tools/jdk:runtime_toolchain_type ERROR: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/external/bazel_tools/tools/jdk/BUILD:479:27: While resolving toolchains for target @bazel_tools//tools/jdk:remote_jdk11: no matching toolchains found for types @bazel_tools//tools/jdk:runtime_toolchain_type WARNING: errors encountered while analyzing target '//tensorflow/python/client:events_writer_test': it will not be built WARNING: errors encountered while analyzing target '//tensorflow/python/kernel_tests/sparse_ops:sparse_reorder_op_test': it will not be built WARNING: errors encountered while analyzing target '//tensorflow/python:nn_fused_batchnorm_test_gpu': it will not be built WARNING: errors encountered while analyzing target '//tensorflow/python/kernel_tests/math_ops:batch_matmul_op_test_cpu': it will not be built WARNING: errors encountered while analyzing target '//tensorflow/python/compiler/tensorrt/test:quantization_test_gpu': it will not be built WARNING: errors encountered while analyzing target '//tensorflow/python/debug/wrappers:dumping_wrapper_test': it will not be built WARNING: errors encountered while analyzing target '//tensorflow/python/kernel_tests/linalg:slicing_test_cpu': it will not be built WARNING: errors encountered while analyzing target '//tensorflow/python/kernel_tests/random:stateful_random_ops_test_cpu': it will not be built WARNING: errors encountered while analyzing target '//tensorflow/python/autograph/operators:exceptions_test': it will not be built ... WARNING: errors encountered while analyzing target '//tensorflow/python/tpu/tests:tpu_embedding_v2_hd_invalid_input_test': it will not be built WARNING: errors encountered while analyzing target '//tensorflow/python/kernel_tests/array_ops:where_op_test_gpu': it will not be built WARNING: errors encountered while analyzing target '//tensorflow/python/kernel_tests/array_ops:depthtospace_op_test_cpu': it will not be built INFO: Analysis succeeded for only 2047 of 3638 top-level targets INFO: Analyzed 3638 targets (658 packages loaded, 46926 targets configured). INFO: Found 2047 targets and 0 test targets... INFO: Deleting stale sandbox base /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/sandbox SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_x_matmul_y_small_gen [action 'Executing genrule //tensorflow/python/tools:aot_compiled_x_matmul_y_small_gen', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform] (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/tensorflow/python/tools/saved_model_cli aot_compile_cpu --dir "$(dirname bazel-out/riscv64-opt/bin/tensorflow/python/tools/x_matmul_y_small/saved_model.pb)" --output_prefix bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_small --cpp_class XMatmulYSmall --variables_to_feed '\'''\'' --signature_def_key serving_default --multithreading False --target_triple riscv64-unknown-linux-gnu --tag_set serve ') # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_x_matmul_y_large_gen [action 'Executing genrule //tensorflow/python/tools:aot_compiled_x_matmul_y_large_gen', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform] (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/tensorflow/python/tools/saved_model_cli aot_compile_cpu --dir "$(dirname bazel-out/riscv64-opt/bin/tensorflow/python/tools/x_matmul_y_large/saved_model.pb)" --output_prefix bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large --cpp_class XMatmulYLarge --variables_to_feed '\'''\'' --signature_def_key serving_default --multithreading False --target_triple riscv64-unknown-linux-gnu --tag_set serve ') # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_x_matmul_y_large_multithreaded_gen [action 'Executing genrule //tensorflow/python/tools:aot_compiled_x_matmul_y_large_multithreaded_gen', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform] (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/tensorflow/python/tools/saved_model_cli aot_compile_cpu --dir "$(dirname bazel-out/riscv64-opt/bin/tensorflow/python/tools/x_matmul_y_large/saved_model.pb)" --output_prefix bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large_multithreaded --cpp_class XMatmulYLargeMultithreaded --variables_to_feed '\'''\'' --signature_def_key serving_default --multithreading True --target_triple riscv64-unknown-linux-gnu --tag_set serve ') # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_vars_and_arithmetic_gen [action 'Executing genrule //tensorflow/python/tools:aot_compiled_vars_and_arithmetic_gen', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform] (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/tensorflow/python/tools/saved_model_cli aot_compile_cpu --dir "$(dirname tensorflow/cc/saved_model/testdata/VarsAndArithmeticObjectGraph/saved_model.pb)" --output_prefix bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic --cpp_class VarsAndArithmetic --variables_to_feed variable_x --signature_def_key serving_default --multithreading False --target_triple riscv64-unknown-linux-gnu --tag_set serve ') # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_x_plus_y_gen [action 'Executing genrule //tensorflow/python/tools:aot_compiled_x_plus_y_gen', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform] (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/tensorflow/python/tools/saved_model_cli aot_compile_cpu --dir "$(dirname tensorflow/cc/saved_model/testdata/x_plus_y_v2_debuginfo/saved_model.pb)" --output_prefix bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_plus_y --cpp_class XPlusY --variables_to_feed '\'''\'' --signature_def_key serving_default --multithreading False --target_triple riscv64-unknown-linux-gnu --tag_set serve ') # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_vars_and_arithmetic_frozen_gen [action 'Executing genrule //tensorflow/python/tools:aot_compiled_vars_and_arithmetic_frozen_gen', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform] (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/tensorflow/python/tools/saved_model_cli aot_compile_cpu --dir "$(dirname tensorflow/cc/saved_model/testdata/VarsAndArithmeticObjectGraph/saved_model.pb)" --output_prefix bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic_frozen --cpp_class VarsAndArithmeticFrozen --variables_to_feed '\'''\'' --signature_def_key serving_default --multithreading False --target_triple riscv64-unknown-linux-gnu --tag_set serve ') # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform ERROR: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/tools/BUILD:435:24: Executing genrule //tensorflow/python/tools:aot_compiled_x_matmul_y_small_gen failed: (Aborted): bash failed: error executing command (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/tensorflow/python/tools/saved_model_cli aot_compile_cpu --dir "$(dirname bazel-out/riscv64-opt/bin/tensorflow/python/tools/x_matmul_y_small/saved_model.pb)" --output_prefix bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_small --cpp_class XMatmulYSmall --variables_to_feed '\'''\'' --signature_def_key serving_default --multithreading False --target_triple riscv64-unknown-linux-gnu --tag_set serve ') # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard installation. WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard installation. WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard installation. WARNING:root:Limited tf.summary API due to missing TensorBoard installation. 2023-10-22 10:52:26.636364: I tensorflow/core/grappler/devices.cc:75] Number of eligible GPUs (core count >= 8, compute capability >= 0.0): 0 (Note: TensorFlow was not compiled with CUDA or ROCm support) 2023-10-22 10:52:26.638418: I tensorflow/core/grappler/clusters/single_machine.cc:357] Starting new session INFO:tensorflow:Restoring parameters from bazel-out/riscv64-opt/bin/tensorflow/python/tools/x_matmul_y_small/variables/variables I1022 10:52:27.044752 274888417312 saver.py:1413] Restoring parameters from bazel-out/riscv64-opt/bin/tensorflow/python/tools/x_matmul_y_small/variables/variables 2023-10-22 10:52:27.052453: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:375] MLIR V1 optimization pass is not enabled WARNING:tensorflow:From /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/tools/saved_model_aot_compile.py:284: convert_variables_to_constants (from tensorflow.python.framework.convert_to_constants) is deprecated and will be removed in a future version. Instructions for updating: This API was designed for TensorFlow v1. See https://www.tensorflow.org/guide/migrate for instructions on how to migrate your code to TensorFlow v2. W1022 10:52:27.161892 274888417312 deprecation.py:364] From /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/tools/saved_model_aot_compile.py:284: convert_variables_to_constants (from tensorflow.python.framework.convert_to_constants) is deprecated and will be removed in a future version. Instructions for updating: This API was designed for TensorFlow v1. See https://www.tensorflow.org/guide/migrate for instructions on how to migrate your code to TensorFlow v2. WARNING:tensorflow:From /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/framework/convert_to_constants.py:946: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version. Instructions for updating: This API was designed for TensorFlow v1. See https://www.tensorflow.org/guide/migrate for instructions on how to migrate your code to TensorFlow v2. W1022 10:52:27.162361 274888417312 deprecation.py:364] From /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/framework/convert_to_constants.py:946: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version. Instructions for updating: This API was designed for TensorFlow v1. See https://www.tensorflow.org/guide/migrate for instructions on how to migrate your code to TensorFlow v2. INFO:tensorflow:Writing graph def to: /tmp/saved_model_cliqg04pgi5/frozen_graph.pb I1022 10:52:27.166092 274888417312 saved_model_aot_compile.py:300] Writing graph def to: /tmp/saved_model_cliqg04pgi5/frozen_graph.pb INFO:tensorflow:Writing config_pbtxt to: /tmp/saved_model_cliqg04pgi5/config.pbtxt I1022 10:52:27.170504 274888417312 saved_model_aot_compile.py:305] Writing config_pbtxt to: /tmp/saved_model_cliqg04pgi5/config.pbtxt INFO:tensorflow:Generating XLA AOT artifacts in: bazel-out/riscv64-opt/bin/tensorflow/python/tools I1022 10:52:27.172687 274888417312 saved_model_aot_compile.py:390] Generating XLA AOT artifacts in: bazel-out/riscv64-opt/bin/tensorflow/python/tools 2023-10-22 10:52:27.383094: F tensorflow/compiler/xla/service/cpu/tiled_dot_emitter.cc:714] Check failed: max_vectorization_width() > 0 && absl::has_single_bit(static_cast<uint64_t>(max_vectorization_width())) Fatal Python error: Aborted Current thread 0x0000004000a06020 (most recent call first): File "/home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/tools/saved_model_aot_compile.py", line 398 in aot_compile_cpu_meta_graph_def File "/home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/tools/saved_model_cli.py", line 1109 in aot_compile_cpu File "/home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/tools/saved_model_cli.py", line 1307 in smcli_main File "/home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/absl_py/absl/app.py", line 258 in _run_main File "/home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/absl_py/absl/app.py", line 312 in run File "/home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/tools/saved_model_cli.py", line 1309 in main File "/home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/tools/saved_model_cli.py", line 1313 in <module> Extension modules: numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, google.protobuf.pyext._message, tensorflow.python.framework.fast_tensor_util (total: 15) SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_x_matmul_y_large [action 'Linking tensorflow/python/tools/libaot_compiled_x_matmul_y_large.so', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform] (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PWD=/proc/self/cwd \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_x_matmul_y_large.so-2.params) # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform ERROR: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/tools/BUILD:416:24: Linking tensorflow/python/tools/libaot_compiled_x_matmul_y_large.so failed: (Exit 1): gcc failed: error executing command (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PWD=/proc/self/cwd \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_x_matmul_y_large.so-2.params) # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform /usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large.o: can't link soft-float modules with double-float modules /usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large.o /usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large_metadata.o: can't link soft-float modules with double-float modules /usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large_metadata.o collect2: error: ld returned 1 exit status SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_vars_and_arithmetic [action 'Linking tensorflow/python/tools/libaot_compiled_vars_and_arithmetic.so', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform] (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PWD=/proc/self/cwd \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_vars_and_arithmetic.so-2.params) # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_x_matmul_y_large_multithreaded [action 'Linking tensorflow/python/tools/libaot_compiled_x_matmul_y_large_multithreaded.so', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform] (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PWD=/proc/self/cwd \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_x_matmul_y_large_multithreaded.so-2.params) # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform ERROR: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/tools/BUILD:464:24: Linking tensorflow/python/tools/libaot_compiled_vars_and_arithmetic.so failed: (Exit 1): gcc failed: error executing command (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PWD=/proc/self/cwd \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_vars_and_arithmetic.so-2.params) # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform /usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic.o: can't link soft-float modules with double-float modules /usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic.o /usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic_metadata.o: can't link soft-float modules with double-float modules /usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic_metadata.o collect2: error: ld returned 1 exit status ERROR: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/tools/BUILD:425:24: Linking tensorflow/python/tools/libaot_compiled_x_matmul_y_large_multithreaded.so failed: (Exit 1): gcc failed: error executing command (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PWD=/proc/self/cwd \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_x_matmul_y_large_multithreaded.so-2.params) # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform /usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large_multithreaded.o: can't link soft-float modules with double-float modules /usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large_multithreaded.o /usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large_multithreaded_metadata.o: can't link soft-float modules with double-float modules /usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large_multithreaded_metadata.o collect2: error: ld returned 1 exit status SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_vars_and_arithmetic_frozen [action 'Linking tensorflow/python/tools/libaot_compiled_vars_and_arithmetic_frozen.so', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform] (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PWD=/proc/self/cwd \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_vars_and_arithmetic_frozen.so-2.params) # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform ERROR: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/tools/BUILD:454:24: Linking tensorflow/python/tools/libaot_compiled_vars_and_arithmetic_frozen.so failed: (Exit 1): gcc failed: error executing command (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PWD=/proc/self/cwd \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_vars_and_arithmetic_frozen.so-2.params) # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform /usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic_frozen.o: can't link soft-float modules with double-float modules /usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic_frozen.o /usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic_frozen_metadata.o: can't link soft-float modules with double-float modules /usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic_frozen_metadata.o collect2: error: ld returned 1 exit status SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_x_plus_y [action 'Linking tensorflow/python/tools/libaot_compiled_x_plus_y.so', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform] (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PWD=/proc/self/cwd \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_x_plus_y.so-2.params) # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform ERROR: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/tools/BUILD:444:24: Linking tensorflow/python/tools/libaot_compiled_x_plus_y.so failed: (Exit 1): gcc failed: error executing command (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \ exec env - \ PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PWD=/proc/self/cwd \ PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \ PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \ TF2_BEHAVIOR=1 \ /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_x_plus_y.so-2.params) # Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011 # Execution platform: @local_execution_config_platform//:platform /usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_plus_y.o: can't link soft-float modules with double-float modules /usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_plus_y.o /usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_plus_y_metadata.o: can't link soft-float modules with double-float modules /usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_plus_y_metadata.o collect2: error: ld returned 1 exit status INFO: Elapsed time: 6001.859s, Critical Path: 4360.34s INFO: 12 processes: 7 internal, 5 local. FAILED: Build did NOT complete successfully FAILED: Build did NOT complete successfully ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62241/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62241/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62240
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62240/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62240/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62240/events
https://github.com/tensorflow/tensorflow/issues/62240
1,963,155,104
I_kwDOArmXAs51A16g
62,240
Interpreter run crash
{ "login": "lyz1005", "id": 16696143, "node_id": "MDQ6VXNlcjE2Njk2MTQz", "avatar_url": "https://avatars.githubusercontent.com/u/16696143?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lyz1005", "html_url": "https://github.com/lyz1005", "followers_url": "https://api.github.com/users/lyz1005/followers", "following_url": "https://api.github.com/users/lyz1005/following{/other_user}", "gists_url": "https://api.github.com/users/lyz1005/gists{/gist_id}", "starred_url": "https://api.github.com/users/lyz1005/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lyz1005/subscriptions", "organizations_url": "https://api.github.com/users/lyz1005/orgs", "repos_url": "https://api.github.com/users/lyz1005/repos", "events_url": "https://api.github.com/users/lyz1005/events{/privacy}", "received_events_url": "https://api.github.com/users/lyz1005/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 750616506, "node_id": "MDU6TGFiZWw3NTA2MTY1MDY=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:lite", "name": "comp:lite", "color": "0052cc", "default": false, "description": "TF Lite related issues" }, { "id": 4989164230, "node_id": "LA_kwDOArmXAs8AAAABKWCaxg", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/Android", "name": "Android", "color": "e99695", "default": false, "description": "" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "pkgoogle", "id": 132095473, "node_id": "U_kgDOB9-d8Q", "avatar_url": "https://avatars.githubusercontent.com/u/132095473?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pkgoogle", "html_url": "https://github.com/pkgoogle", "followers_url": "https://api.github.com/users/pkgoogle/followers", "following_url": "https://api.github.com/users/pkgoogle/following{/other_user}", "gists_url": "https://api.github.com/users/pkgoogle/gists{/gist_id}", "starred_url": "https://api.github.com/users/pkgoogle/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pkgoogle/subscriptions", "organizations_url": "https://api.github.com/users/pkgoogle/orgs", "repos_url": "https://api.github.com/users/pkgoogle/repos", "events_url": "https://api.github.com/users/pkgoogle/events{/privacy}", "received_events_url": "https://api.github.com/users/pkgoogle/received_events", "type": "User", "site_admin": false }
[ { "login": "pkgoogle", "id": 132095473, "node_id": "U_kgDOB9-d8Q", "avatar_url": "https://avatars.githubusercontent.com/u/132095473?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pkgoogle", "html_url": "https://github.com/pkgoogle", "followers_url": "https://api.github.com/users/pkgoogle/followers", "following_url": "https://api.github.com/users/pkgoogle/following{/other_user}", "gists_url": "https://api.github.com/users/pkgoogle/gists{/gist_id}", "starred_url": "https://api.github.com/users/pkgoogle/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pkgoogle/subscriptions", "organizations_url": "https://api.github.com/users/pkgoogle/orgs", "repos_url": "https://api.github.com/users/pkgoogle/repos", "events_url": "https://api.github.com/users/pkgoogle/events{/privacy}", "received_events_url": "https://api.github.com/users/pkgoogle/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @lyz1005, are imgData & imgOut both ByteBuffers? TFLite takes the ByteBuffer's capacity as the ByteBuffer's size, so ensure that imgOut has the correct capacity for your model's output. Can you share your model file so that we may reproduce? If you can share a toy project (export to zip in android studio) which includes the model and more context around your code that would also be ideal as well. Also your output does not seem to log/show the crash, are you sure you don't have more relevant logs?", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62240\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62240\">No</a>\n" ]
2023-10-26T10:01:10
2023-12-16T01:48:33
2023-12-16T01:48:29
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code No ### OS platform and distribution _No response_ ### Mobile device Android 14 ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 8Gen3 ### GPU model and memory SM8650 ### Current behavior? *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 10-26 11:48:06.897823 6722 7142 D _V_EPM : Build fingerprint: 'vivo/PD2307/PD2307:14/UP1A.231005.007/compiler10260115:user/release-keys' 10-26 11:48:06.897823 6722 7142 D _V_EPM : Revision: '0' 10-26 11:48:06.897823 6722 7142 D _V_EPM : ABI: 'arm64' 10-26 11:48:06.897823 6722 7142 D _V_EPM : Timestamp: 2023-10-26 11:48:06.614691059+0800 10-26 11:48:06.897823 6722 7142 D _V_EPM : Process uptime: 2644s 10-26 11:48:06.897823 6722 7142 D _V_EPM : Cmdline: com.jingdong.app.mall 10-26 11:48:06.897823 6722 7142 D _V_EPM : pid: 20955, tid: 12166, name: ImageClassifyTh >>> com.jingdong.app.mall <<< 10-26 11:48:06.897823 6722 7142 D _V_EPM : uid: 10300 10-26 11:48:06.897823 6722 7142 D _V_EPM : tagged_addr_ctrl: 0000000********1 (PR_TAGGED_ADDR_ENABLE) 10-26 11:48:06.897823 6722 7142 D _V_EPM : pac_enabled_keys: 0000000********f (PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY, PR_PAC_APDBKEY) 10-26 11:48:06.897823 6722 7142 D _V_EPM : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x000000709f80e000 10-26 11:48:06.897823 6722 7142 D _V_EPM : x0 000000709f697f80 x1 000000709f80e000 x2 0000000000031000 x3 0000000********0 10-26 11:48:06.897823 6722 7142 D _V_EPM : x4 000000709f83f000 x5 000000709f6c8f80 x6 0000000000031000 x7 0000000000000020 10-26 11:48:06.897823 6722 7142 D _V_EPM : x8 000000709f80e000 x9 000000709f697f80 x10 0000000********0 x11 0000000000000022 10-26 11:48:06.897823 6722 7142 D _V_EPM : x12 0000007143d4b848 x13 0000007143d4b888 x14 ffffffffffe89f80 x15 00000000ebad6a89 10-26 11:48:06.897823 6722 7142 D _V_EPM : x16 0000007134e95b90 x17 00000073d8af2480 x18 0000006691b84000 x19 0000000000031000 10-26 11:48:06.897823 6722 7142 D _V_EPM : x20 0000000********0 x21 0000000********0 x22 000000703dffafe0 x23 0000007188a35850 10-26 11:48:06.897823 6722 7142 D _V_EPM : x24 000000703dffc000 x25 0000000000031000 x26 0000000********0 x27 0000000015ad2658 10-26 11:48:06.897823 6722 7142 D _V_EPM : x28 0000000********0 x29 000000703dffaee0 10-26 11:48:06.897823 6722 7142 D _V_EPM : lr 0000007134e8d8a4 sp 000000703dffae90 pc 00000073d8af2560 pst 00000000a0001000 10-26 11:48:06.897823 6722 7142 D _V_EPM : 32 total frames 10-26 11:48:06.897823 6722 7142 D _V_EPM : backtrace: 10-26 11:48:06.897823 6722 7142 D _V_EPM : #00 pc 000000000009d560 /apex/com.android.runtime/lib64/bionic/libc.so (__memcpy_aarch64_simd+224) (BuildId: 4425ba3ccfed552700ceb9be545d3599) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #01 pc 00000000000378a0 /apex/com.android.art/lib64/libjavacore.so (Memory_memmove(_JNIEnv*, _jclass*, _jobject*, int, _jobject*, int, long)+136) (BuildId: 669c662a8342cf22a2088ad204ebbc9d) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #02 pc 0000000000011ebc /system/framework/arm64/boot-core-libart.oat (art_jni_trampoline+156) (BuildId: b4f8ea6f20c11de7002804f101a922d4b869a7a3) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #03 pc 00000000001799fc /system/framework/arm64/boot.oat (java.nio.ByteBuffer.put+380) (BuildId: 8b4e4d5982e6b09d6b17d75175d3f3ad9f6c82aa) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #04 pc 00000000002922b8 /system/framework/arm64/boot.oat (java.nio.DirectByteBuffer.put+152) (BuildId: 8b4e4d5982e6b09d6b17d75175d3f3ad9f6c82aa) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #05 pc 000000000020a330 /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #06 pc 0000000000097f48 <anonymous:709977e000> (org.tensorflow.lite.TensorImpl.A+68) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #07 pc 000000000020a2d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #08 pc 0000000000097e9e <anonymous:709977e000> (org.tensorflow.lite.TensorImpl.z+62) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #09 pc 000000000020a2d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #10 pc 00000000000969cc <anonymous:709977e000> (org.tensorflow.lite.NativeInterpreterWrapper.D+96) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #11 pc 000000000020a2d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #12 pc 0000000000095992 <anonymous:709977e000> (org.tensorflow.lite.g.d+10) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #13 pc 000000000020a2d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #14 pc 0000000000095d10 <anonymous:709977e000> (org.tensorflow.lite.b.d+0) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #15 pc 000000000020a2d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #16 pc 0000000000095970 <anonymous:709977e000> (org.tensorflow.lite.g.k+36) 10-26 11:48:06.897823 6722 7142 D _V_EPM : #17 pc 000000000020a2d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d) <023> 10-26 11:48:06.897853 6722 7142 D _V_EPM : #18 pc 0000000000095cf8 <anonymous:709977e000> (org.tensorflow.lite.b.k+0) 10-26 11:48:06.897853 6722 7142 D _V_EPM : #19 pc 000000000020a2d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d) 10-26 11:48:06.897853 6722 7142 D _V_EPM : #20 pc 00000000000941b8 <anonymous:709977e000> (.ImageClassifierQuantizedMobileNet.runInference+16) 10-26 11:48:06.897853 6722 7142 D _V_EPM : #21 pc 000000000020a2d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d) 10-26 11:48:06.897853 6722 7142 D _V_EPM : #22 pc 000000000009362e <anonymous:709977e000> 10-26 11:48:06.897853 6722 7142 D _V_EPM : #23 pc 0000000000570afc /system/framework/arm64/boot-framework.oat (android.os.Handler.dispatchMessage+76) (BuildId: d95a7b95c2066d5ae8a5341e3963447bedc9cebc) 10-26 11:48:06.897853 6722 7142 D _V_EPM : #24 pc 0000000000573c18 /system/framework/arm64/boot-framework.oat (android.os.Looper.loopOnce+1080) (BuildId: d95a7b95c2066d5ae8a5341e3963447bedc9cebc) 10-26 11:48:06.897853 6722 7142 D _V_EPM : #25 pc 000000000057374c /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+572) (BuildId: d95a7b95c2066d5ae8a5341e3963447bedc9cebc) 10-26 11:48:06.897853 6722 7142 D _V_EPM : #26 pc 0000000000572a24 /system/framework/arm64/boot-framework.oat (android.os.HandlerThread.run+596) (BuildId: d95a7b95c2066d5ae8a5341e3963447bedc9cebc) 10-26 11:48:06.897853 6722 7142 D _V_EPM : #27 pc 00000000002109a4 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d) 10-26 11:48:06.897853 6722 7142 D _V_EPM : #28 pc 0000000000254770 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+176) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d) 10-26 11:48:06.897853 6722 7142 D _V_EPM : #29 pc 000000000067ebb4 /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1408) (BuildId: 192434dd8e28ed1b32dd8b30083fce3d) 10-26 11:48:06.897853 6722 7142 D _V_EPM : #30 pc 000000000010cbd8 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+228) (BuildId: 4425ba3ccfed552700ceb9be545d3599) 10-26 11:48:06.897853 6722 7142 D _V_EPM : #31 pc 00000000000a64a4 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: 4425ba3ccfed552700ceb9be545d3599) <024> ### Standalone code to reproduce the issue ```shell 在Android14 设备,CPU 8Gen3 GPU SM8650 会出现,其他设备没有出现crash Interpreter.Options tfliteOptions = new Interpreter.Options(); tfliteOptions.setNumThreads(3); MappedByteBuffer tfliteModel = loadModelFile(context); Interpreter tflite = new Interpreter(tfliteModel, tfliteOptions); imgOut.clear(); imgOut.rewind(); tflite.run(imgData, imgOut); ``` ### Relevant log output _No response_
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62240/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62240/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62239
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62239/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62239/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62239/events
https://github.com/tensorflow/tensorflow/issues/62239
1,962,904,246
I_kwDOArmXAs50_4q2
62,239
Different Behavior of tf.raw_ops.Cos+tf.raw_ops.exp with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "kenfranko", "id": 56562020, "node_id": "MDQ6VXNlcjU2NTYyMDIw", "avatar_url": "https://avatars.githubusercontent.com/u/56562020?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kenfranko", "html_url": "https://github.com/kenfranko", "followers_url": "https://api.github.com/users/kenfranko/followers", "following_url": "https://api.github.com/users/kenfranko/following{/other_user}", "gists_url": "https://api.github.com/users/kenfranko/gists{/gist_id}", "starred_url": "https://api.github.com/users/kenfranko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kenfranko/subscriptions", "organizations_url": "https://api.github.com/users/kenfranko/orgs", "repos_url": "https://api.github.com/users/kenfranko/repos", "events_url": "https://api.github.com/users/kenfranko/events{/privacy}", "received_events_url": "https://api.github.com/users/kenfranko/received_events", "type": "User", "site_admin": false }
[ { "login": "kenfranko", "id": 56562020, "node_id": "MDQ6VXNlcjU2NTYyMDIw", "avatar_url": "https://avatars.githubusercontent.com/u/56562020?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kenfranko", "html_url": "https://github.com/kenfranko", "followers_url": "https://api.github.com/users/kenfranko/followers", "following_url": "https://api.github.com/users/kenfranko/following{/other_user}", "gists_url": "https://api.github.com/users/kenfranko/gists{/gist_id}", "starred_url": "https://api.github.com/users/kenfranko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kenfranko/subscriptions", "organizations_url": "https://api.github.com/users/kenfranko/orgs", "repos_url": "https://api.github.com/users/kenfranko/repos", "events_url": "https://api.github.com/users/kenfranko/events{/privacy}", "received_events_url": "https://api.github.com/users/kenfranko/received_events", "type": "User", "site_admin": false }, { "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false } ]
null
[ "I was able to reproduce the issue on tensorflow v2.14 and tf-nightly. Kindly find the gist of the [here](https://colab.research.google.com/gist/tilakrayal/20253cc4336cb315b1beff698664b218/untitled1422.ipynb).", "@zoux1a,\r\nThis is likely due to fusion, where the intermediate result may be computed and kept in float32 in the case of jit-compilation, whereas without fusion it would cast to bfloat16 between the ops and produce a less precise answer. Still, both are correct. Thank you!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62239\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62239\">No</a>\n" ]
2023-10-26T07:39:11
2023-12-09T01:48:25
2023-12-09T01:48:22
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.Cos+tf.raw_ops.Exp** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **CPU** device. ### Standalone code to reproduce the issue ```shell i can reproduce this issue on colab:https://colab.research.google.com/drive/1YomYtislBnBgIO3E1PD2Shj3faR5BNVV?usp=sharing ``` ### Relevant log output ```shell Traceback (most recent call last): File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 54, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 9, 8, 1, 8, 3, 2) dtype=float64) = ' 0.0, 0.0, 0.0, ... b'y (shape=(10, 9, 8, 1, 8, 3, 2) dtype=float64) = ' 0.0, 0.0, 0.0, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62239/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62239/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62238
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62238/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62238/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62238/events
https://github.com/tensorflow/tensorflow/issues/62238
1,962,886,084
I_kwDOArmXAs50_0PE
62,238
Different Behavior of tf.raw_ops.Sin+tf.raw_ops.Asinh with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 1133285679, "node_id": "MDU6TGFiZWwxMTMzMjg1Njc5", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:xla", "name": "comp:xla", "color": "0052cc", "default": false, "description": "XLA" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @zoux1a ,\r\n\r\nI have replicated the behaviour with jit_compile=True. With jit_compile=False and also by commenting out the code `tf.config.run_functions_eagerly(False)` the problem not persists. Attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/00c3e97bc115ab98e23a616aea8cfd19/62238_r1.ipynb) for reference.\r\n\r\nWill check and update.Similar to #62206\r\n", "**Note:** The problem occurs when input Tensors pass through `raw_ops.sin `and `raw_ops.Asinh`. With individual Ops there is no issue. [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/00c3e97bc115ab98e23a616aea8cfd19/62238_r1.ipynb)\r\n\r\n", "Hi @zoux1a ,\r\n\r\nAs per the [source](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/tf2xla/g3doc/gpu_supported_ops.md) the Ops `Sin` and `Asinh` are supported for T={complex64,double,float} only. Could you please test with supported dtypes only.\r\n\r\nThanks!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62238\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62238\">No</a>\n" ]
2023-10-26T07:27:13
2023-11-17T01:49:11
2023-11-17T01:49:06
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the tf.raw_ops.Sin+tf.raw_ops.Asinh operation is invoked within a tf.function with JIT compilation enabled (jit_compile=True), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a CPU device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback def replace_special_values(tensor): # Convert tensor to tf.float32 if it's not a supported dtype supported_dtypes = [tf.float16, tf.float32, tf.float64, tf.bfloat16] if tensor.dtype not in supported_dtypes: original_dtype = tensor.dtype tensor = tf.cast(tensor, tf.float32) else : original_dtype = None # Replace NaNs with zeros tensor = tf.where(tf.math.is_nan(tensor), tf.zeros_like(tensor), tensor) # Replace positive infinities with a large number (e.g., 1e30) tensor = tf.where(tf.math.is_inf(tensor), 100, tensor) # Replace negative infinities with a small number (e.g., -1e30) tensor = tf.where(tf.math.is_inf(tensor) & tf.math.less(tensor, 0), -100, tensor) # Convert tensor back to its original dtype if original_dtype is not None : tensor = tf.cast(tensor, original_dtype) return tensor class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.Sin(x=x, ) x = tf.raw_ops.Asinh(x=x, ) return x m = Network() dic = {'ele': (900108.2563231019-417958.5363911558j), 'size': [], 'dtype': tf.complex128} tensor = tf.constant(dic['ele'], dtype=tf.as_dtype(dic['dtype'])) inp = { "x": tensor, } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) no_op_res = replace_special_values(no_op_res) op_res = replace_special_values(op_res) tf.debugging.assert_near(no_op_res, op_res, atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell Traceback (most recent call last): File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 53, in <module> tf.debugging.assert_near(no_op_res, op_res, atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=() dtype=complex128) = ' (100+0j) b'y (shape=() dtype=complex128) = ' 0j ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62238/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62238/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62237
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62237/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62237/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62237/events
https://github.com/tensorflow/tensorflow/issues/62237
1,962,868,243
I_kwDOArmXAs50_v4T
62,237
Different Behavior of tf.raw_ops.Zeta+raw_ops.Cosh with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi, @zoux1a!\r\n\r\nI was able to replicate the issue reported [here](https://colab.research.google.com/gist/sushreebarsa/6005eacee2679e38843210e7ccf66778/62237.ipynb). Thank you!", "Hi @zoux1a ,\r\n\r\nI noticed an issue here.\r\n\r\nInside the `__call__` function you are generating the value for tensor, which in each calls generates different random values because XLA currently ignores TF seeds to random operations which makes the output different for obvious reason. Please refer [known](https://www.tensorflow.org/xla/known_issues#random_number_generation_ignores_tf_seed) issues from XLA section.\r\n\r\nHence I have taken the random input to outside the XLA scope and done the code changes and executed the code 10 runs and it executed successfully. Since the input is `float32` which is default for XLA the execution is success for your `atol=0.001` and ` rtol=0.001` \r\n\r\nPlease refer attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/cf4239f02683b21a82de4bba4e6ac756/62237_final.ipynb).", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62237\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62237\">No</a>\n" ]
2023-10-26T07:16:18
2023-12-30T01:48:25
2023-12-30T01:48:12
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the tf.raw_ops.Zeta+tf.raw_ops.Cosh operation is invoked within a tf.function with JIT compilation enabled (jit_compile=True), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a CPU device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback def replace_special_values(tensor): # Convert tensor to tf.float32 if it's not a supported dtype supported_dtypes = [tf.float16, tf.float32, tf.float64, tf.bfloat16] if tensor.dtype not in supported_dtypes: original_dtype = tensor.dtype tensor = tf.cast(tensor, tf.float32) else : original_dtype = None # Replace NaNs with zeros tensor = tf.where(tf.math.is_nan(tensor), tf.zeros_like(tensor), tensor) # Replace positive infinities with a large number (e.g., 1e30) tensor = tf.where(tf.math.is_inf(tensor), 100, tensor) # Replace negative infinities with a small number (e.g., -1e30) tensor = tf.where(tf.math.is_inf(tensor) & tf.math.less(tensor, 0), -100, tensor) # Convert tensor back to its original dtype if original_dtype is not None : tensor = tf.cast(tensor, original_dtype) return tensor class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): tensor = tf.random.normal([10, 10, 6, 1], dtype=tf.float32) x = tf.raw_ops.Zeta(q=x, x=tensor) x = tf.raw_ops.Cosh(x=x, ) return x is_valid = True inf = float('inf') m = Network() tensor = tf.random.normal([6, 10, 10, 1, 8], dtype=tf.float32) inp = { "x": tensor, } with tf.device('/CPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/CPU:0'): op_res = m(**inp) no_op_res = replace_special_values(no_op_res) op_res = replace_special_values(op_res) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 54, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(6, 10, 10, 6, 8) dtype=float64) = ' 0.0, 0.0, 0.0, ... b'y (shape=(6, 10, 10, 6, 8) dtype=float64) = ' 0.0, 0.0, 0.0, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62237/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62237/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62236
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62236/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62236/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62236/events
https://github.com/tensorflow/tensorflow/issues/62236
1,962,836,039
I_kwDOArmXAs50_oBH
62,236
Different Behavior of tf.raw_ops.Cosh with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
open
false
{ "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false }
[ { "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @zoux1a ,\r\n\r\nThis is related to #62212.\r\n\r\nThis is happening with complex inputs and outputs are generating Inf values which have a bug in assertion. The fix is proposed in eigen repo which is linked in above ticket.\r\n", "@zoux1a,\r\nThe above PR which was raised in the eigen repo was merged, So could you please try to use the latest tf-nightly version where the issue was resolved or not.\r\nhttps://gitlab.com/libeigen/eigen/-/merge_requests/1431\r\n Thank you!" ]
2023-10-26T06:55:50
2024-06-12T11:16:44
null
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the tf.raw_ops.Cosh operation is invoked within a tf.function with JIT compilation enabled (jit_compile=True), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a GPU device. ### Standalone code to reproduce the issue ```shell I can reproduce this issue on colab: https://colab.research.google.com/drive/1BvF1httSk5-QalMrtafvsj7QKKULwRa7?usp=sharing ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 28, in <module> tf.debugging.assert_near(no_op_res, op_res, atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 9, 8) dtype=complex128) = ' (inf+0.7853981633974483j), (-inf+0.7853981633974483j), (-inf+0.7853981633974483j), ... b'y (shape=(10, 9, 8) dtype=complex128) = ' (inf+0.7853981633974483j), (nan+nanj), (nan+nanj), ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62236/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62236/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62235
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62235/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62235/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62235/events
https://github.com/tensorflow/tensorflow/issues/62235
1,962,799,143
I_kwDOArmXAs50_fAn
62,235
Different Behavior of tf.raw_ops.Acos+tf.raw_ops.Xlogy with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "I was able to reproduce the issue on tensorflow v2.14 and tf-nightly. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/25172d93dd8d9981d8e84547a0046cfd/untitled1420.ipynb).", "Hi,\r\n\r\nThe difference in behavior can not be considered as an error, since it might be happening due to fusion operation in JIT compilation this ultimately result in less precise answer. Thank you!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62235\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62235\">No</a>\n" ]
2023-10-26T06:31:28
2023-12-22T01:48:52
2023-12-22T01:48:50
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the **tf.raw_ops.Acos+tf.raw_ops.Xlogy** operation is invoked within a tf.function with JIT compilation enabled (**jit_compile=True**), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a **CPU** device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): real_part = tf.random.normal([1, 10, 1, 1, 8], dtype=tf.float64) imag_part = tf.random.normal([1, 10, 1, 1, 8], dtype=tf.float64) tensor = tf.complex(real_part, imag_part) tensor = tf.cast(tensor, dtype=tf.complex128) x = tf.raw_ops.Acos(x=x, ) x = tf.raw_ops.Xlogy(y=x, x=tensor) return x m = Network() real_part = tf.random.normal([10, 9, 8], dtype=tf.float64) imag_part = tf.random.normal([10, 9, 8], dtype=tf.float64) tensor = tf.complex(real_part, imag_part) tensor = tf.cast(tensor, dtype=tf.complex128) inp = { "x": tensor, } with tf.device('/CPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/CPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 34, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(1, 10, 10, 9, 8) dtype=float64) = ' -0.05185302330670599, -0.15348608132964178, -0.1848064102102949, ... b'y (shape=(1, 10, 10, 9, 8) dtype=float64) = ' -0.7967820214034921, -0.1360080982477385, 0.42889388296575726, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62235/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62235/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62234
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62234/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62234/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62234/events
https://github.com/tensorflow/tensorflow/issues/62234
1,962,776,658
I_kwDOArmXAs50_ZhS
62,234
Keras.fit stuck/error in TensorFlow 2.13/2.14 (TPU is fine, inference on GPU is fine, 2.11 GPU is fine)
{ "login": "edwardyehuang", "id": 3354448, "node_id": "MDQ6VXNlcjMzNTQ0NDg=", "avatar_url": "https://avatars.githubusercontent.com/u/3354448?v=4", "gravatar_id": "", "url": "https://api.github.com/users/edwardyehuang", "html_url": "https://github.com/edwardyehuang", "followers_url": "https://api.github.com/users/edwardyehuang/followers", "following_url": "https://api.github.com/users/edwardyehuang/following{/other_user}", "gists_url": "https://api.github.com/users/edwardyehuang/gists{/gist_id}", "starred_url": "https://api.github.com/users/edwardyehuang/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/edwardyehuang/subscriptions", "organizations_url": "https://api.github.com/users/edwardyehuang/orgs", "repos_url": "https://api.github.com/users/edwardyehuang/repos", "events_url": "https://api.github.com/users/edwardyehuang/events{/privacy}", "received_events_url": "https://api.github.com/users/edwardyehuang/received_events", "type": "User", "site_admin": false }
[ { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 1097546578, "node_id": "MDU6TGFiZWwxMDk3NTQ2NTc4", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:keras", "name": "comp:keras", "color": "0052cc", "default": false, "description": "Keras related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @edwardyehuang ,\r\n\r\nCould you please confirm whether keras imported as stand alone package or from tf.keras? Also please submit some reproducible code snippet along with environment details.\r\n\r\nThanks!", "> Hi @edwardyehuang ,\r\n> \r\n> Could you please confirm whether keras imported as stand alone package or from tf.keras? Also please submit some reproducible code snippet along with environment details.\r\n> \r\n> Thanks!\r\n\r\n1) tf.keras\r\n2) It is hard to produce a code snippet because I am unsure what can cause this issue. I will continue to test more environments and see if I can figure out the root cause or limit it to a narrow range (after that, a code snippet is possible). I will update my progress on this issue.", "@SuryanarayanaY Any place to download earlier versions of the tf-nightly wheel? The [pip repo](https://pypi.org/project/tf-nightly/) only contains the post 2.14 package. Currently, I do not have time to build from sources.", "It looks like the commit that caused this issue is between 2.12 and 2.13rc0", "@SuryanarayanaY \r\nUpdate:\r\nAfter I use\r\n ```\r\ntf.distribute.experimental.MultiWorkerMirroredStrategy(\r\n communication= tf.distribute.experimental.CollectiveCommunication.RING\r\n)\r\n```\r\nto replace \r\n```\r\ntf.distribute.MirroredStrategy\r\n```\r\n 2.13 and 2.14 training on GPU is no longer stuck.\r\n\r\nIt seems some commits caused issues in NCCL (maybe also XLA).", "Related issues : https://github.com/tensorflow/tensorflow/issues/41539", "Pull requests may cause this issue: #60001 #59424 @SuryanarayanaY ", "> It looks like the commit that caused this issue is between 2.12 and 2.13rc0\r\n\r\nSame issue here. I have 2 GPU. It works on 2.12 but fails on 2.13/2.14", "I found two related settings.\r\n 1. use strategy: \r\n\r\n tf.distribute.experimental.MultiWorkerMirroredStrategy(\r\n communication= tf.distribute.experimental.CollectiveCommunication.RING\r\n) \r\n\r\n2. add jit_compile=False to tf.keras.optimizers.Adam or use tf.keras.optimizers.legacy.Adam\r\n\r\n\r\n\r\n\r\nUgly solutions. But it works.\r\n", "> I found two related settings.\r\n> \r\n> 1. use strategy:\r\n> \r\n> tf.distribute.experimental.MultiWorkerMirroredStrategy( communication= tf.distribute.experimental.CollectiveCommunication.RING )\r\n> \r\n> 2. add jit_compile=False to tf.keras.optimizers.Adam or use tf.keras.optimizers.legacy.Adam\r\n> \r\n> Ugly solutions. But it works.\r\n\r\nSeems like #59424 cause this issue", "@cheshire @reedwm Is it possible to revert 59424 in the next release of TensorFlow (e.g. 2.15 RC-1) ?", "@edwardyehuang do you have a way for us to reproduce this issue? Have you verified that #59424 is causing the issue? We cannot address this without some way to reproduce it. CC @jurahul", "@reedwm See issue https://github.com/tensorflow/tensorflow/issues/61314", "I have the same issue; I use tf 2.14 with Ubuntu 22.04 and Python 3.9 as well, but am using a GeForce RTX 3090, running a conda environment, installed tf 2.14 with pip and am using jupyter notebooks in VSCode. Sometimes the issue occurs when I train a model, but other times the issue occurs when I initialize a model - setting \r\n\r\n\r\n```python\r\ntf.distribute.experimental.MultiWorkerMirroredStrategy(\r\n communication= tf.distribute.experimental.CollectiveCommunication.RING\r\n)\r\n``` \r\n\r\ndoes not work in my case (though I believe it removes the \"Cannot start spawn child process\" error); adding \"jit_compile=false\" doesn't seem to work well either.\r\n\r\nI do have some steps to reproduce (assuming the command nvidia-smi \"shows\" a gpu); i.e. I have a notebook with code that one can run given the setup and the error should again occur, given one downloads the kaggle datasets that the notebook \"trains\" a model on.\r\n\r\n1. conda deactivate (remove base environment)\r\n2. conda create --name tfgittesting python=3.9\r\n3. pip install --upgrade pip\r\n4. pip install tensorflow[and-cuda]\r\n5. pip install ipython ipykernel\r\n6. pip install matplotlib\r\n7. pip install pandas\r\n8. Download the [Fashion MNIST dataset.](https://www.kaggle.com/datasets/zalando-research/fashionmnist?select=fashion-mnist_train.csv)\r\n9. Download [this txt file](https://github.com/tensorflow/tensorflow/files/13325968/fashionmnisttest.txt) and replace txt with ipynb to make it a notebook.\r\n10. Replace the words \"Fashion MNIST test dataset\" and \"Fashion MNIST train dataset\" with the paths to the test and train datasets, respectively.\r\n11. Run the notebook; add the \"mirrored strategy code\" and the \"jit_compile=false code\" at some locations.\r\n", "*Could someone else test the code to see if the error can be reproduced?", "@reedwm @SuryanarayanaY ^", "@reedwm Is there any update on this issue? The issue is causing TensorFlow XLA and multi-gpu to become unusable for versions >= 2.13.", "This could be caused by switch to PJRT interface from TF, which has broken a number of multi-GPU workflows internally as well. \r\n\r\n@swachhandl @kenfranko for pointers.", "It is unlikely that this is due to the switch to PJRT - it hasn't been rolled out for GPU on OSS yet. ", "I just tested the conda-forge-packed TensorFlow GPU 2.14 (https://github.com/conda-forge/tensorflow-feedstock , note that the 2.15 is not working), and it is working; it may be easier for you to locate the error in the pip package and a docker image.", "The issue was resolved by upgrading the NVIDIA and CUDA drivers to the latest version.\r\nThe reason that the conda version can work is because it is compiled with a lower CUDA version.\r\n\r\nHowever, it also means that before TensorFlow 2.16, the driver version check had BUG, but it is fine for now as TensorFlow 2.16 forces the NVIDIA driver >= 545", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62234\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62234\">No</a>\n" ]
2023-10-26T06:13:36
2024-03-14T10:37:18
2024-03-14T10:36:20
CONTRIBUTOR
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? Yes ### Source source ### TensorFlow version tf 2.14 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04 ### Mobile device _No response_ ### Python version 3.9 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory Titan RTX * 2 or 4090 * 4 ### Current behavior? Below are the situations in different environments: 1. TPU + TensorFlow 2.10: OK 2. TPU + TensorFlow 2.11: OK 3. TPU + TensorFlow 2.14: OK 4. GPU (Titan RTX * 2) + TensorFlow 2.10 (conda): OK 5. GPU (Titan RTX * 2) + TensorFlow 2.11 (conda): OK 6. GPU (Titan RTX * 2) + TensorFlow 2.11 (docker): OK 7. GPU (Titan RTX * 2) + TensorFlow 2.12 (docker): OK 8. GPU (Titan RTX * 2) + TensorFlow 2.13 (conda): OK 9. GPU (Titan RTX * 2) + TensorFlow 2.13 (docker): Prediction OK. keras.fit stuck at `Loaded cuDNN version 8600` 10. GPU (Titan RTX * 2) + TensorFlow 2.14 (pip): Prediction OK. keras.fit stuck at `Start cannot spawn child process: No such file or directory` after `Loaded cuDNN version 8600` 11. GPU (Titan RTX * 2) + TensorFlow 2.14 (docker): Prediction OK. keras.fit stuck at `Loaded cuDNN version 8600` 12. GPU (4090 * 4) + TensorFlow 2.11 (conda): OK 13. GPU (4090 * 4) + TensorFlow 2.14 (docker): Prediction OK. keras.fit stuck at `Loaded cuDNN version 8600` 14. GPU (4090 * 4) + TensorFlow 2.14 (pip): Prediction OK. keras.fit stuck at `Start cannot spawn child process: No such file or directory` after `Loaded cuDNN version 8600` I am currently testing more environments and see if I can narrow down the search space of problematic TensorFlow commits. ### Standalone code to reproduce the issue ```shell See behavior ``` ### Relevant log output _No response_
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62234/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62234/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62233
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62233/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62233/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62233/events
https://github.com/tensorflow/tensorflow/issues/62233
1,962,765,628
I_kwDOArmXAs50_W08
62,233
Different Behavior of tf.raw_ops.RightShift with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false }
[ { "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi, @zoux1a !\r\n I tried to replicate the issue with JIT compilation enabled (jit_compile=True) and (jit_compile=False), but didn't face the error reported. Please find the attached [gist](https://colab.research.google.com/gist/sushreebarsa/2b7681ef3f22e9ffcf4d874452ecf437/untitled900.ipynb#scrollTo=WrcG14n_aWq8) here. Thank you!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62233\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62233\">No</a>\n" ]
2023-10-26T06:03:44
2023-11-16T01:49:17
2023-11-16T01:49:15
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the tf.raw_ops.RightShift operation is invoked within a tf.function with JIT compilation enabled (jit_compile=True), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a GPU device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): random_tensor = tf.random.uniform([],minval=0,maxval=255,dtype=tf.int32) int8_tensor = tf.dtypes.cast(random_tensor, tf.int8) x = tf.raw_ops.RightShift(y=x, x=int8_tensor) return x m = Network() random_tensor = tf.random.uniform([4,1],minval=0,maxval=255,dtype=tf.int32) int8_tensor = tf.dtypes.cast(random_tensor, tf.int8) inp = { "x": int8_tensor, } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 30, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(4, 1) dtype=float64) = ' -24.0, -1.0, -1.0, ... b'y (shape=(4, 1) dtype=float64) = ' 9.0, 0.0, 0.0, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62233/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62233/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62232
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62232/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62232/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62232/events
https://github.com/tensorflow/tensorflow/pull/62232
1,962,147,219
PR_kwDOArmXAs5dywGH
62,232
Bump werkzeug from 3.0.0 to 3.0.1
{ "login": "dependabot[bot]", "id": 49699333, "node_id": "MDM6Qm90NDk2OTkzMzM=", "avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dependabot%5Bbot%5D", "html_url": "https://github.com/apps/dependabot", "followers_url": "https://api.github.com/users/dependabot%5Bbot%5D/followers", "following_url": "https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}", "starred_url": "https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dependabot%5Bbot%5D/subscriptions", "organizations_url": "https://api.github.com/users/dependabot%5Bbot%5D/orgs", "repos_url": "https://api.github.com/users/dependabot%5Bbot%5D/repos", "events_url": "https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}", "received_events_url": "https://api.github.com/users/dependabot%5Bbot%5D/received_events", "type": "Bot", "site_admin": false }
[ { "id": 1169364458, "node_id": "MDU6TGFiZWwxMTY5MzY0NDU4", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/size:S", "name": "size:S", "color": "adafea", "default": false, "description": "CL Change Size: Small" }, { "id": 2421643380, "node_id": "MDU6TGFiZWwyNDIxNjQzMzgw", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/dependencies", "name": "dependencies", "color": "0366d6", "default": false, "description": "Pull requests that update a dependency file" }, { "id": 2622893001, "node_id": "MDU6TGFiZWwyNjIyODkzMDAx", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/python", "name": "python", "color": "2b67c6", "default": false, "description": "Pull requests that update Python code" } ]
closed
false
{ "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false }
[ { "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false } ]
null
[ "Looks like werkzeug is up-to-date now, so this is no longer needed." ]
2023-10-25T20:07:34
2023-10-31T18:37:15
2023-10-31T18:37:07
CONTRIBUTOR
null
false
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/pulls/62232", "html_url": "https://github.com/tensorflow/tensorflow/pull/62232", "diff_url": "https://github.com/tensorflow/tensorflow/pull/62232.diff", "patch_url": "https://github.com/tensorflow/tensorflow/pull/62232.patch", "merged_at": null }
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.0.0 to 3.0.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pallets/werkzeug/releases">werkzeug's releases</a>.</em></p> <blockquote> <h2>3.0.1</h2> <p>This is a security release for the 3.0.x feature branch.</p> <ul> <li>Changes: <a href="https://werkzeug.palletsprojects.com/en/3.0.x/changes/#version-3-0-1">https://werkzeug.palletsprojects.com/en/3.0.x/changes/#version-3-0-1</a></li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pallets/werkzeug/blob/main/CHANGES.rst">werkzeug's changelog</a>.</em></p> <blockquote> <h2>Version 3.0.1</h2> <p>Released 2023-10-24</p> <ul> <li>Fix slow multipart parsing for large parts potentially enabling DoS attacks. :cwe:<code>CWE-407</code></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pallets/werkzeug/commit/ce4eff5902d4a6b41a20ecc6e4029741284a87fd"><code>ce4eff5</code></a> Release version 3.0.1</li> <li><a href="https://github.com/pallets/werkzeug/commit/b1916c0c083e0be1c9d887ee2f3d696922bfc5c1"><code>b1916c0</code></a> Fix: slow multipart parsing for huge files with few CR/LF characters</li> <li><a href="https://github.com/pallets/werkzeug/commit/726eaa28593d859548da3477859c914732f012ef"><code>726eaa2</code></a> Release version 3.0.0</li> <li>See full diff in <a href="https://github.com/pallets/werkzeug/compare/3.0.0...3.0.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=werkzeug&package-manager=pip&previous-version=3.0.0&new-version=3.0.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/tensorflow/tensorflow/network/alerts). </details>
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62232/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62232/timeline
null
null
true
https://api.github.com/repos/tensorflow/tensorflow/issues/62231
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62231/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62231/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62231/events
https://github.com/tensorflow/tensorflow/issues/62231
1,962,141,012
I_kwDOArmXAs508-VU
62,231
tf.saved_model.save gives error with concrete function
{ "login": "shashwatj07", "id": 52609734, "node_id": "MDQ6VXNlcjUyNjA5NzM0", "avatar_url": "https://avatars.githubusercontent.com/u/52609734?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shashwatj07", "html_url": "https://github.com/shashwatj07", "followers_url": "https://api.github.com/users/shashwatj07/followers", "following_url": "https://api.github.com/users/shashwatj07/following{/other_user}", "gists_url": "https://api.github.com/users/shashwatj07/gists{/gist_id}", "starred_url": "https://api.github.com/users/shashwatj07/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shashwatj07/subscriptions", "organizations_url": "https://api.github.com/users/shashwatj07/orgs", "repos_url": "https://api.github.com/users/shashwatj07/repos", "events_url": "https://api.github.com/users/shashwatj07/events{/privacy}", "received_events_url": "https://api.github.com/users/shashwatj07/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1105108936, "node_id": "MDU6TGFiZWwxMTA1MTA4OTM2", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:model", "name": "comp:model", "color": "0052cc", "default": false, "description": "Model related issues" }, { "id": 2691123225, "node_id": "MDU6TGFiZWwyNjkxMTIzMjI1", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:tf.function", "name": "comp:tf.function", "color": "0052cc", "default": false, "description": "tf.function related issues" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @shashwatj07 ,\r\n\r\nI have replicated the reported error. Attaching [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/59315c17842502f5f9d89d1ab67793e9/62231.ipynb) here for reference. Will look into the issue and keep you posted.\r\n\r\nThanks!", "Thanks! @SuryanarayanaY \r\nIs there any updated documentation I could see to use AOT XLA Compilation?", "Hi @shashwatj07 ,\r\n\r\nApologies for the delay. As per the documentation of tf.saved_model.save the first argument \"obj\" should be a trackable object such as tf.Module or tf.train.Checkpoint or tf.keras.Model etc. In your code its just a function which might not be trackable object. Hence the problem.\r\n\r\nI have rewritten the code to make it as trackable object and its works fine. Please refer modified code and its execution in the attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/83e378262931c9616231c91affce94d8/62231_r1.ipynb) here .\r\n\r\nThanks!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62231\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62231\">No</a>\n" ]
2023-10-25T20:03:40
2024-02-13T01:47:20
2024-02-13T01:47:14
NONE
null
null
null
### Issue type Support ### Have you reproduced the bug with TensorFlow Nightly? Yes ### Source source ### TensorFlow version v2.11.0-rc2-17-gd5b57ca93e5 ### Custom code Yes ### OS platform and distribution CentOS 7 (Core) ### Mobile device _No response_ ### Python version 3.10.13 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.2.2/8.1.0.77 ### GPU model and memory NVIDIA RTX A4500 20470MiB - 4x ### Current behavior? I am trying to use TensorFlow XLA AOT Compilation. I see the error below when running the code below. I could reproduce the issue with tf-nightly as well. ### Standalone code to reproduce the issue ```shell """ Save the code below as create_model.py Script that creates a dummy graph as a SavedModel named "my_model" in the same directory. Run as: > TF_XLA_FLAGS="--tf_xla_auto_jit=2 --tf_xla_cpu_global_jit" python create_model.py """ import tensorflow as tf @tf.function(jit_compile=True) def my_model(x): """ Dummy model that does nothing expect for reducing axis 1 via sum. """ return tf.reduce_sum(x, axis=1) if __name__ == "__main__": import os this_dir = os.path.dirname(os.path.abspath(__file__)) model_dir = os.path.join(this_dir, "my_model") # save the model with a concrete signature tf.saved_model.save(my_model, model_dir, signatures={ "default": my_model.get_concrete_function(tf.TensorSpec(shape=[2, 5], dtype=tf.float32)) }) ``` ### Relevant log output ```shell Traceback (most recent call last): File "/home/sj74/xla_analysis/create_model.py", line 28, in <module> tf.saved_model.save(my_model, model_dir, signatures={ File "/home/sj74/anaconda3/envs/xla_analysis3/lib/python3.10/site-packages/tensorflow/python/saved_model/save.py", line 1231, in save save_and_return_nodes(obj, export_dir, signatures, options) File "/home/sj74/anaconda3/envs/xla_analysis3/lib/python3.10/site-packages/tensorflow/python/saved_model/save.py", line 1267, in save_and_return_nodes _build_meta_graph(obj, signatures, options, meta_graph_def)) File "/home/sj74/anaconda3/envs/xla_analysis3/lib/python3.10/site-packages/tensorflow/python/saved_model/save.py", line 1440, in _build_meta_graph return _build_meta_graph_impl(obj, signatures, options, meta_graph_def) File "/home/sj74/anaconda3/envs/xla_analysis3/lib/python3.10/site-packages/tensorflow/python/saved_model/save.py", line 1404, in _build_meta_graph_impl object_graph_proto = _serialize_object_graph(saveable_view, File "/home/sj74/anaconda3/envs/xla_analysis3/lib/python3.10/site-packages/tensorflow/python/saved_model/save.py", line 972, in _serialize_object_graph _write_object_proto(obj, obj_proto, asset_file_def_index, File "/home/sj74/anaconda3/envs/xla_analysis3/lib/python3.10/site-packages/tensorflow/python/saved_model/save.py", line 987, in _write_object_proto function_serialization.serialize_function( File "/home/sj74/anaconda3/envs/xla_analysis3/lib/python3.10/site-packages/tensorflow/python/saved_model/function_serialization.py", line 103, in serialize_function proto.concrete_functions.append(concrete_function.name) AttributeError: '_SignatureMap' object has no attribute 'name' ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62231/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62231/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62230
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62230/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62230/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62230/events
https://github.com/tensorflow/tensorflow/pull/62230
1,962,013,736
PR_kwDOArmXAs5dyTOs
62,230
Update accelerator_util.py
{ "login": "gautam1858", "id": 4949778, "node_id": "MDQ6VXNlcjQ5NDk3Nzg=", "avatar_url": "https://avatars.githubusercontent.com/u/4949778?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gautam1858", "html_url": "https://github.com/gautam1858", "followers_url": "https://api.github.com/users/gautam1858/followers", "following_url": "https://api.github.com/users/gautam1858/following{/other_user}", "gists_url": "https://api.github.com/users/gautam1858/gists{/gist_id}", "starred_url": "https://api.github.com/users/gautam1858/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gautam1858/subscriptions", "organizations_url": "https://api.github.com/users/gautam1858/orgs", "repos_url": "https://api.github.com/users/gautam1858/repos", "events_url": "https://api.github.com/users/gautam1858/events{/privacy}", "received_events_url": "https://api.github.com/users/gautam1858/received_events", "type": "User", "site_admin": false }
[ { "id": 1169365682, "node_id": "MDU6TGFiZWwxMTY5MzY1Njgy", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/size:L", "name": "size:L", "color": "adafea", "default": false, "description": "CL Change Size: Large" }, { "id": 1593512946, "node_id": "MDU6TGFiZWwxNTkzNTEyOTQ2", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/invalid", "name": "invalid", "color": "db6f57", "default": true, "description": "Hacktoberfest spam PR" } ]
closed
true
{ "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false }
[ { "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false } ]
null
[ "I think this PR is far away from being ready to be merged.\r\n\r\nIt is not clear of the merits of the changes, and the description is inconsistent with the actual changes;\r\nfor example all of the docstrings have been removed while the description claimed improvements in the docstring. \r\n", "Please don't use \"add file\"/\"update file\"/\"fix file\"/etc. commit messages. These are hard to reason about when looking at the history of the file/repository. Instead, please write explanatory git commit messages.\r\n\r\nThe commit message is also the title of the PR if the PR has only one commit. It is thus twice important to have commit messages that are relevant, as PRs would be easier to understand and easier to analyze in search results.\r\n\r\nFor how to write good quality git commit messages, please consult https://cbea.ms/git-commit/ \r\n\r\nWe will automaticall close PRs by you if you don't take these suggestions into account" ]
2023-10-25T18:41:41
2023-11-01T01:14:40
2023-10-28T20:19:37
CONTRIBUTOR
spam
false
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/pulls/62230", "html_url": "https://github.com/tensorflow/tensorflow/pull/62230", "diff_url": "https://github.com/tensorflow/tensorflow/pull/62230.diff", "patch_url": "https://github.com/tensorflow/tensorflow/pull/62230.patch", "merged_at": null }
1. Introduced an AcceleratorType class to define accelerator types for better clarity. 2. Created an AcceleratorSystem class to encapsulate the accelerator system's functionality. 3. Removed global variables and used instance variables within the AcceleratorSystem class. 4. Simplified the code structure and made it more organized. 5. Removed unnecessary repetitive checks and error handling. 6. Improved docstrings and comments for better understanding. 7. Reorganized the code for improved readability.
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62230/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62230/timeline
null
null
true
https://api.github.com/repos/tensorflow/tensorflow/issues/62229
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62229/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62229/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62229/events
https://github.com/tensorflow/tensorflow/issues/62229
1,961,346,550
I_kwDOArmXAs5058X2
62,229
Loading MoViNet saved_model in tensorflow 2.7 throws FileNotFoundError: Op type not registered 'DisableCopyOnRead' in binary running
{ "login": "hammad-ali1", "id": 72652305, "node_id": "MDQ6VXNlcjcyNjUyMzA1", "avatar_url": "https://avatars.githubusercontent.com/u/72652305?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hammad-ali1", "html_url": "https://github.com/hammad-ali1", "followers_url": "https://api.github.com/users/hammad-ali1/followers", "following_url": "https://api.github.com/users/hammad-ali1/following{/other_user}", "gists_url": "https://api.github.com/users/hammad-ali1/gists{/gist_id}", "starred_url": "https://api.github.com/users/hammad-ali1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hammad-ali1/subscriptions", "organizations_url": "https://api.github.com/users/hammad-ali1/orgs", "repos_url": "https://api.github.com/users/hammad-ali1/repos", "events_url": "https://api.github.com/users/hammad-ali1/events{/privacy}", "received_events_url": "https://api.github.com/users/hammad-ali1/received_events", "type": "User", "site_admin": false }
[ { "id": 473184161, "node_id": "MDU6TGFiZWw0NzMxODQxNjE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:support", "name": "type:support", "color": "159b2e", "default": false, "description": "Support issues" }, { "id": 1105108936, "node_id": "MDU6TGFiZWwxMTA1MTA4OTM2", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:model", "name": "comp:model", "color": "0052cc", "default": false, "description": "Model related issues" }, { "id": 3531398540, "node_id": "LA_kwDOArmXAs7SfN2M", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF%202.7", "name": "TF 2.7", "color": "77237D", "default": false, "description": "Issues related to TF 2.7.0" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "@yuanliangzhe @yeqingli Can you guys please give me any pointers on how to build and export the MoViNet model in tensorflow 2.7 without relying on tf-models-official package. Or alternatively, load an already exported saved_model in tf 2.7. Note that, the tflite version of the model loads fine. It is the saved_model format that's causing the issue.", "The issue was resolved by building the model in tensorflow version 2.9. When tf-models-official package was installed it updated the tensorflow version to 2.14. Somehow, MoViNet model built in this version was not able to load in tf2.7. \r\nI downgraded tensorflow to the least possible version that was compatible with tf-models-official and then build the model using saved weights. After which I exported the model in saved_model format and it worked with tf2.7.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62229\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62229\">No</a>\n" ]
2023-10-25T12:48:03
2023-11-18T15:37:42
2023-11-18T15:37:14
NONE
null
null
null
### Issue type Support ### Have you reproduced the bug with TensorFlow Nightly? Yes ### Source binary ### TensorFlow version tf 2.7 ### Custom code Yes ### OS platform and distribution Linux Ubuntu 18.04 ### Mobile device _No response_ ### Python version 3.6 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory Jetson Nano Maxwell Architecture GPU - 4GB ### Current behavior? I am trying to load an exported MoViNet saved model in tensorflow version 2.7. The model loads fine in tensorflow version 2.10. However, I need to run the model on Nvidia's Jetson nano which does not support tensorflow version greater than 2.7. Loading the model in tf 2.7 gives me the error `Op type not registered 'DisableCopyOnRead'`. This issue might be due to version compatibility since I exported the model using tensorflow 2.10 and tf-models-official. For exporting model I used : [this notebook's code](https://github.com/tensorflow/models/blob/master/official/projects/movinet/movinet_streaming_model_training_and_inference.ipynb). I tried to export the model using tf 2.7 but tf-models-official does not work with tf<2.10. Are there any workarounds by converting the model in some other format so that I can run it on my Jetson Nano's tensorflow version 2.7. Any help would be greatly appreciated. Much thanks. ### Standalone code to reproduce the issue ```shell import tensorflow as tf model = tf.saved_model.load("path/to/saved_model") ``` ### Relevant log output ```shell KeyError Traceback (most recent call last) [c:\Users\Hammad\anaconda3\envs\temp\lib\site-packages\tensorflow\python\framework\ops.py](file:///C:/Users/Hammad/anaconda3/envs/temp/lib/site-packages/tensorflow/python/framework/ops.py) in _get_op_def(self, type) 4097 try: -> 4098 return self._op_def_cache[type] 4099 except KeyError: KeyError: 'DisableCopyOnRead' During handling of the above exception, another exception occurred: NotFoundError Traceback (most recent call last) [c:\Users\Hammad\anaconda3\envs\temp\lib\site-packages\tensorflow\python\saved_model\load.py](file:///C:/Users/Hammad/anaconda3/envs/temp/lib/site-packages/tensorflow/python/saved_model/load.py) in load_internal(export_dir, tags, options, loader_cls, filters) 938 loader = loader_cls(object_graph_proto, saved_model_proto, export_dir, --> 939 ckpt_options, options, filters) 940 except errors.NotFoundError as err: [c:\Users\Hammad\anaconda3\envs\temp\lib\site-packages\tensorflow\python\saved_model\load.py](file:///C:/Users/Hammad/anaconda3/envs/temp/lib/site-packages/tensorflow/python/saved_model/load.py) in __init__(self, object_graph_proto, saved_model_proto, export_dir, ckpt_options, save_options, filters) 138 function_deserialization.load_function_def_library( --> 139 meta_graph.graph_def.library, wrapper_function=_WrapperFunction)) 140 self._checkpoint_options = ckpt_options [c:\Users\Hammad\anaconda3\envs\temp\lib\site-packages\tensorflow\python\saved_model\function_deserialization.py](file:///C:/Users/Hammad/anaconda3/envs/temp/lib/site-packages/tensorflow/python/saved_model/function_deserialization.py) in load_function_def_library(library, load_shared_name_suffix, wrapper_function) 387 with graph.as_default(): --> 388 func_graph = function_def_lib.function_def_to_graph(copy) ... 943 "from the computational device. Consider setting the " 944 "`experimental_io_device` option in `tf.saved_model.LoadOptions` " FileNotFoundError: Op type not registered 'DisableCopyOnRead' in binary running on LAPTOP-V4DO1PQN. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed. You may be trying to load on a different device from the computational device. Consider setting the `experimental_io_device` option in `tf.saved_model.LoadOptions` to the io_device such as '/job:localhost'. ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62229/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62229/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62228
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62228/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62228/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62228/events
https://github.com/tensorflow/tensorflow/issues/62228
1,961,277,295
I_kwDOArmXAs505rdv
62,228
TFLITE does not compile with CMake in Visual Studio 2019
{ "login": "MVoloshin", "id": 11507146, "node_id": "MDQ6VXNlcjExNTA3MTQ2", "avatar_url": "https://avatars.githubusercontent.com/u/11507146?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MVoloshin", "html_url": "https://github.com/MVoloshin", "followers_url": "https://api.github.com/users/MVoloshin/followers", "following_url": "https://api.github.com/users/MVoloshin/following{/other_user}", "gists_url": "https://api.github.com/users/MVoloshin/gists{/gist_id}", "starred_url": "https://api.github.com/users/MVoloshin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MVoloshin/subscriptions", "organizations_url": "https://api.github.com/users/MVoloshin/orgs", "repos_url": "https://api.github.com/users/MVoloshin/repos", "events_url": "https://api.github.com/users/MVoloshin/events{/privacy}", "received_events_url": "https://api.github.com/users/MVoloshin/received_events", "type": "User", "site_admin": false }
[ { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 473173351, "node_id": "MDU6TGFiZWw0NzMxNzMzNTE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:build/install", "name": "type:build/install", "color": "159b2e", "default": false, "description": "Build and install issues" }, { "id": 750616506, "node_id": "MDU6TGFiZWw3NTA2MTY1MDY=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:lite", "name": "comp:lite", "color": "0052cc", "default": false, "description": "TF Lite related issues" }, { "id": 1188421838, "node_id": "MDU6TGFiZWwxMTg4NDIxODM4", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/subtype:windows", "name": "subtype:windows", "color": "b619ea", "default": false, "description": "Windows Build/Installation Issues" } ]
open
false
{ "login": "terryheo", "id": 2908505, "node_id": "MDQ6VXNlcjI5MDg1MDU=", "avatar_url": "https://avatars.githubusercontent.com/u/2908505?v=4", "gravatar_id": "", "url": "https://api.github.com/users/terryheo", "html_url": "https://github.com/terryheo", "followers_url": "https://api.github.com/users/terryheo/followers", "following_url": "https://api.github.com/users/terryheo/following{/other_user}", "gists_url": "https://api.github.com/users/terryheo/gists{/gist_id}", "starred_url": "https://api.github.com/users/terryheo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/terryheo/subscriptions", "organizations_url": "https://api.github.com/users/terryheo/orgs", "repos_url": "https://api.github.com/users/terryheo/repos", "events_url": "https://api.github.com/users/terryheo/events{/privacy}", "received_events_url": "https://api.github.com/users/terryheo/received_events", "type": "User", "site_admin": false }
[ { "login": "terryheo", "id": 2908505, "node_id": "MDQ6VXNlcjI5MDg1MDU=", "avatar_url": "https://avatars.githubusercontent.com/u/2908505?v=4", "gravatar_id": "", "url": "https://api.github.com/users/terryheo", "html_url": "https://github.com/terryheo", "followers_url": "https://api.github.com/users/terryheo/followers", "following_url": "https://api.github.com/users/terryheo/following{/other_user}", "gists_url": "https://api.github.com/users/terryheo/gists{/gist_id}", "starred_url": "https://api.github.com/users/terryheo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/terryheo/subscriptions", "organizations_url": "https://api.github.com/users/terryheo/orgs", "repos_url": "https://api.github.com/users/terryheo/repos", "events_url": "https://api.github.com/users/terryheo/events{/privacy}", "received_events_url": "https://api.github.com/users/terryheo/received_events", "type": "User", "site_admin": false }, { "login": "pkgoogle", "id": 132095473, "node_id": "U_kgDOB9-d8Q", "avatar_url": "https://avatars.githubusercontent.com/u/132095473?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pkgoogle", "html_url": "https://github.com/pkgoogle", "followers_url": "https://api.github.com/users/pkgoogle/followers", "following_url": "https://api.github.com/users/pkgoogle/following{/other_user}", "gists_url": "https://api.github.com/users/pkgoogle/gists{/gist_id}", "starred_url": "https://api.github.com/users/pkgoogle/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pkgoogle/subscriptions", "organizations_url": "https://api.github.com/users/pkgoogle/orgs", "repos_url": "https://api.github.com/users/pkgoogle/repos", "events_url": "https://api.github.com/users/pkgoogle/events{/privacy}", "received_events_url": "https://api.github.com/users/pkgoogle/received_events", "type": "User", "site_admin": false } ]
null
[ "Just hit same issue.\r\n\r\nYou can try injecting the pre-processor defn straight through by putting it in the cxx flags default value...\r\n\r\ncmake -E env CXXFLAGS=\"/DTFLITE_MMAP_DISABLED\" cmake ..", "> Just hit same issue.\r\n> \r\n> You can try injecting the pre-processor defn straight through by putting it in the cxx flags default value...\r\n> \r\n> cmake -E env CXXFLAGS=\"/DTFLITE_MMAP_DISABLED\" cmake ..\r\n\r\nHello! Thank you very much. I hope this case will be handled automatically once the bug is fixed)", "Hi @terryheo, can you please take a look? Thanks." ]
2023-10-25T12:16:10
2023-11-02T18:23:37
null
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? Yes ### Source source ### TensorFlow version tf-master ### Custom code Yes ### OS platform and distribution Windows 7 SP1 x64 ### Mobile device _No response_ ### Python version 3.11 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory NVIDIA GeForce 1660 SUPER 6 GB ### Current behavior? Cannot find #include <sys/mman.h> in "tensorflow/lite/kernels/internal/optimized/fully_connected_4bit.h" Expected successful build. P.S. There's TFLITE_MMAP_DISABLED condition in this file, but I didn't find it in CMakeLists.txt or anywhere else (except Bazel config files that are not used while building with CMake). ### Standalone code to reproduce the issue ```shell 1. Open latest VS 2019 on 64-bit Windows 7 (maybe newer versions too). 2. Download tensorflow-master as zip, unpack. 3. Open tensoflow/lite as CMake project. 4. Right click on root CMakeLists.txt and choose "Build". ``` ### Relevant log output ```shell Cannot find #include <sys/mman.h> in "tensorflow/lite/kernels/internal/optimized/fully_connected_4bit.h" ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62228/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62228/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62227
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62227/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62227/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62227/events
https://github.com/tensorflow/tensorflow/issues/62227
1,961,080,813
I_kwDOArmXAs5047ft
62,227
TensorflowLite C API not linking with TensorflowLite_Flex delegate (Automatically or manually)
{ "login": "SagaraBattousai", "id": 13040520, "node_id": "MDQ6VXNlcjEzMDQwNTIw", "avatar_url": "https://avatars.githubusercontent.com/u/13040520?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SagaraBattousai", "html_url": "https://github.com/SagaraBattousai", "followers_url": "https://api.github.com/users/SagaraBattousai/followers", "following_url": "https://api.github.com/users/SagaraBattousai/following{/other_user}", "gists_url": "https://api.github.com/users/SagaraBattousai/gists{/gist_id}", "starred_url": "https://api.github.com/users/SagaraBattousai/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SagaraBattousai/subscriptions", "organizations_url": "https://api.github.com/users/SagaraBattousai/orgs", "repos_url": "https://api.github.com/users/SagaraBattousai/repos", "events_url": "https://api.github.com/users/SagaraBattousai/events{/privacy}", "received_events_url": "https://api.github.com/users/SagaraBattousai/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 750616506, "node_id": "MDU6TGFiZWw3NTA2MTY1MDY=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:lite", "name": "comp:lite", "color": "0052cc", "default": false, "description": "TF Lite related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false }
[ { "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false } ]
null
[ "@SagaraBattousai Could you please make sure that Flex delegate was built correctly, you may use the following command to check it;\r\n```\r\nbazel build -c opt --config=monolithic tensorflow/lite/delegates/flex:tensorflowlite_flex\r\n```\r\nPlease let us know? Thank you!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62227\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62227\">No</a>\n", "```C++\r\n#include <fstream>\r\n#include <iostream>\r\n#include <string>\r\n#include <unordered_map>\r\n#include <vector> \r\n#include \"tensorflow/lite/interpreter.h\"\r\n#include \"tensorflow/lite/kernels/register.h\"\r\n#include \"tensorflow/lite/model.h\"\r\n#include \"tensorflow/lite/optional_debug_tools.h\"\r\n#include \"tensorflow/lite/core/c/c_api.h\"\r\n#include \"tensorflow/lite/core/c/c_api_experimental.h\"\r\n#include \"tensorflow/lite/core/c/builtin_op_data.h\" \r\n#include \"tensorflow/lite/core/c/c_api_opaque.h\"\r\n#include \"tensorflow/lite/core/c/c_api_types.h\"\r\n#include \"tensorflow/lite/core/c/common.h\"\r\n\r\n#include <Windows.h>\r\n#define TFLITE_MINIMAL_CHECK(x) \\\r\n if (!(x)) { \\\r\n fprintf(stderr, \"Error at %s:%d\\n\", __FILE__, __LINE__); \\\r\n exit(1); \\\r\n }\r\n TfLiteModel* model = TfLiteModelCreateFromFile(model_path.c_str());\r\n TFLITE_MINIMAL_CHECK(model != nullptr);\r\n\r\n TfLiteInterpreterOptions* options = TfLiteInterpreterOptionsCreate();\r\n TfLiteInterpreter* interpreter = TfLiteInterpreterCreate(model, options);\r\n TFLITE_MINIMAL_CHECK(interpreter != nullptr);\r\n TfLiteInterpreterOptionsDelete(options);\r\n auto hdll = LoadLibrary(\"tensorflowlite_flex.dll\");\r\n \r\n auto TF_AcquireFlexDelegate = reinterpret_cast<tflite::Interpreter::TfLiteDelegatePtr(*)()>(GetProcAddress(hdll, \"TF_AcquireFlexDelegate\"));\r\n if (TF_AcquireFlexDelegate == NULL) {\r\n std::cout << \"TF_AcquireFlexDelegate couldn't be run\" << std::endl;\r\n }\r\n \r\n auto delegate = TF_AcquireFlexDelegate();\r\n auto TfLiteStatus = TfLiteInterpreterModifyGraphWithDelegate(interpreter, delegate.get());\r\n if(TfLiteStatus==0)\r\n std::cout << \"ModifyGraphWithDelegate Ok\" << std::endl;\r\n```\r\nI have utilized the C API provided in c_api_experimental.h to link the TensorflowLite Flex delegate." ]
2023-10-25T10:37:53
2024-03-31T08:31:16
2023-11-15T01:49:15
NONE
null
null
null
### System information - **Have I written custom code (as opposed to using a stock example script provided in TensorFlow)**: - **OS Platform and Distribution**: Windows 11 - **Mobile device**: Additionally happens on Android 14 Pixel 7a - **TensorFlowLite installed from (source or binary)**: C API build with CMake and Tensorflowlite_flex built with bazel - **TensorFlow version (use command below)**: 2.14 - **Bazel version (if compiling from source)**: Bazelisk version: v1.18.0 - **GCC/Compiler version (if compiling from source)**: Visual Studio 17.7.4 - **CUDA/cuDNN version**: N/A - **GPU model and memory**: N/A - **Exact command to reproduce**: N/A Using Cmake To build and link the TensorflowLite C API Works perfectly with any tflite model signature not using Flex operators. However, after linking the C API with tensorflowlite_flex, using the following as part of a CMakeLists.txt: ```cmake if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") set_target_properties(tensorflowlite_c PROPERTIES IMPORTED_LOCATION_DEBUG "${TFLITE_ROOT}/lib/windows/Debug/tensorflowlite_c.dll" IMPORTED_IMPLIB_DEBUG "${TFLITE_ROOT}/lib/windows/Debug/tensorflowlite_c.lib" IMPORTED_LOCATION_RELEASE "${TFLITE_ROOT}/lib/windows/Release/tensorflowlite_c.dll" IMPORTED_IMPLIB_RELEASE "${TFLITE_ROOT}/lib/windows/Release/tensorflowlite_c.lib" ) set_target_properties(tensorflowlite_flex PROPERTIES IMPORTED_LOCATION "${TFLITE_ROOT}/lib/windows/tensorflowlite_flex.dll" IMPORTED_IMPLIB "${TFLITE_ROOT}/lib/windows/tensorflowlite_flex.dll.if.lib" ) target_link_libraries(tensorflowlite_c INTERFACE tensorflowlite_flex) endif() ``` , the running process outputs: ERROR: Select TensorFlow op(s), included in the given model, is(are) not supported by this interpreter. Make sure you apply/link the Flex delegate before inference. My final approach was to use (what I guessed) was the auto linking code that exists in the C++ code (namely: ```cpp auto hdll = LoadLibrary("tensorflowlite_flex.dll"); auto flex_fp = reinterpret_cast<TfLiteDelegatePtr(*)()>( GetProcAddress(hdll, "TF_AcquireFlexDelegate")); if (flex_fp == NULL) { throw std::runtime_error("flex_fp couldn't be run"); } flex_ = flex_fp(); // flex_ is a member (not shown here) // This line gets the message: INFO: Created TensorFlow Lite delegate for select TF ops. TfLiteInterpreterOptionsAddDelegate(options_.get(), flex_.get()); // *THIS* is the important line ``` ). If the final line is commented out we get the nice INFO message that the delegate has been created but end up with the same warning message. Alternatively, if the last line is included we get an invalid memory access exception. I am going to switch to the C++ API for tensorflow lite and see if that works as I am under a tight deadline but any help would be much appreciated as the stable ABI for the C API is far better for my PhD. Additionally, I built "tensorflow/lite/delegates/flex:delegate" with bazelisk (bazel v1.18.0) but (after waiting an extremely long time for it to compile) I cannot track down what it built and did not change anything. (Note, some small changes to CMakeFiles were required to build tensorflowlite_c.dll and the exact binary I have used can be obtained from [here](https://github.com/SagaraBattousai/tflite-clib-builder/releases/download/v1.0.1/tensorflowlite_c-winx64-Android.zip) )
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62227/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62227/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62226
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62226/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62226/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62226/events
https://github.com/tensorflow/tensorflow/issues/62226
1,961,016,137
I_kwDOArmXAs504rtJ
62,226
crop bounding boxes
{ "login": "maciejskorski", "id": 31315784, "node_id": "MDQ6VXNlcjMxMzE1Nzg0", "avatar_url": "https://avatars.githubusercontent.com/u/31315784?v=4", "gravatar_id": "", "url": "https://api.github.com/users/maciejskorski", "html_url": "https://github.com/maciejskorski", "followers_url": "https://api.github.com/users/maciejskorski/followers", "following_url": "https://api.github.com/users/maciejskorski/following{/other_user}", "gists_url": "https://api.github.com/users/maciejskorski/gists{/gist_id}", "starred_url": "https://api.github.com/users/maciejskorski/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/maciejskorski/subscriptions", "organizations_url": "https://api.github.com/users/maciejskorski/orgs", "repos_url": "https://api.github.com/users/maciejskorski/repos", "events_url": "https://api.github.com/users/maciejskorski/events{/privacy}", "received_events_url": "https://api.github.com/users/maciejskorski/received_events", "type": "User", "site_admin": false }
[ { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473173272, "node_id": "MDU6TGFiZWw0NzMxNzMyNzI=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:feature", "name": "type:feature", "color": "159b2e", "default": false, "description": "Feature requests" }, { "id": 1097545817, "node_id": "MDU6TGFiZWwxMDk3NTQ1ODE3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:apis", "name": "comp:apis", "color": "0052cc", "default": false, "description": "Highlevel API related issues" } ]
open
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[]
2023-10-25T10:02:44
2023-11-29T21:27:27
null
NONE
null
null
null
### Issue type Feature Request ### Have you reproduced the bug with TensorFlow Nightly? Yes ### Source source ### TensorFlow version 2.12.0 ### Custom code Yes ### OS platform and distribution Linux ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behaviour? I think that TF may be missing a **utility to crop several bounding boxes**. It should be **vectorized for better performance**, as cropping one-by-one is known to be slow. I have not found it in API (but maybe is out there?). The use case is clear – extracting patches of annotated images for object detection. The util function should take a tensor of boxes `(n_boxes,4)` and a window/patch `(4,)` and crop all the boxes to a given window. Note that we want to **crop boxes, not an image**. So, starting from this: ![image](https://github.com/tensorflow/tensorflow/assets/31315784/1224a91d-325a-4f9f-bd45-f248be8715ce) We want to achieve this: ![image](https://github.com/tensorflow/tensorflow/assets/31315784/94e3596c-2f94-45ee-bddf-1c84725a1da3) In terms of other implementations, this one from MatLab: https://www.mathworks.com/help/vision/ref/bboxcrop.html ### Standalone code to reproduce the issue ```shell Here is a proposal, essentially used to generate the image above, what is important that the code is vectorized. def crop_bounding_boxes(boxes,window): """Crop bounding boxes to the speficied window. Args: boxes: A tensor of shape `[n_boxes,4]` describing bounding boxes. Each box is in pixel units and in the format `x_min,y_min,x_max,y_max` window A tensor of shape `[4]` describing the window. The window is in pixel units and in the format `x_min,y_min,x_max,y_max` Returns: _type_: _description_ """ """ Args: boxes The annotation boxes are assumed to be in pixels and in the format `x_min,y_min,x_max,y_max`. """ # assume boxes and patch are given as (x1,y1,x2,y2) # compute intersections of rectangles tf_ops = [tf.maximum,tf.maximum,tf.minimum,tf.minimum] cropped_boxes = [op(window[pos],boxes[:,pos]) for (pos,op) in enumerate(tf_ops)] cropped_boxes = tf.stack(cropped_boxes,axis=-1) mask = tf.logical_and( tf.less(cropped_boxes[:,0],cropped_boxes[:,2]), tf.less(cropped_boxes[:,1],cropped_boxes[:,3]) ) cropped_boxes = tf.boolean_mask(cropped_boxes,mask) # move the coordinates origin to (x1,y1) corner = tf.concat([window[:2],window[:2]],axis=0) corner = tf.broadcast_to(corner, cropped_boxes.shape) cropped_boxes = cropped_boxes - corner return cropped_boxes See also this [SO discussion](https://stackoverflow.com/questions/59722712/crop-multiple-bounding-boxes-from-image-with-list-of-bounding-boxes/77358447#77358447) and this [Kaggle notebook](https://www.kaggle.com/code/mskorski/efficient-bounding-boxes-cropping/) ``` ### Relevant log output _No response_
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62226/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62226/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62225
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62225/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62225/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62225/events
https://github.com/tensorflow/tensorflow/issues/62225
1,960,962,062
I_kwDOArmXAs504egO
62,225
tensorflow new(sz=18446744073709551615) got std::bad_alloc
{ "login": "haolujun", "id": 10751631, "node_id": "MDQ6VXNlcjEwNzUxNjMx", "avatar_url": "https://avatars.githubusercontent.com/u/10751631?v=4", "gravatar_id": "", "url": "https://api.github.com/users/haolujun", "html_url": "https://github.com/haolujun", "followers_url": "https://api.github.com/users/haolujun/followers", "following_url": "https://api.github.com/users/haolujun/following{/other_user}", "gists_url": "https://api.github.com/users/haolujun/gists{/gist_id}", "starred_url": "https://api.github.com/users/haolujun/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/haolujun/subscriptions", "organizations_url": "https://api.github.com/users/haolujun/orgs", "repos_url": "https://api.github.com/users/haolujun/repos", "events_url": "https://api.github.com/users/haolujun/events{/privacy}", "received_events_url": "https://api.github.com/users/haolujun/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1445545631, "node_id": "MDU6TGFiZWwxNDQ1NTQ1NjMx", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF%201.14", "name": "TF 1.14", "color": "5319e7", "default": false, "description": "for issues seen with TF 1.14" } ]
closed
false
{ "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false }
[ { "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false } ]
null
[ "@haolujun,\r\nWe see that you are using tf version 1.14, 1.x is not actively supported, please update to 2.x and let us know if you are facing the same issue.\r\n\r\nAlso please try to install the tensorflow latest stable version from the official [document](https://www.tensorflow.org/install) and refer to the[migration](https://www.tensorflow.org/guide/migrate) doc to know more on this. Thank you! ", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62225\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62225\">No</a>\n" ]
2023-10-25T09:33:40
2023-11-10T01:48:12
2023-11-10T01:48:09
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version tf 1.14.0 ### Custom code No ### OS platform and distribution _No response_ ### Mobile device _No response_ ### Python version 3.7.2 ### Bazel version unknown ### GCC/compiler version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609 ### CUDA/cuDNN version no ### GPU model and memory _No response_ ### Current behavior? throw std::bad_malloc ### Standalone code to reproduce the issue ```shell no std::bad_malloc, no new(sz=18446744073709551615) ``` ### Relevant log output ```shell #0 __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 #1 0x00007f7f6df7be42 in __GI___pthread_mutex_lock (mutex=0x7f7f6eb43970 <_rtld_global+2352>) at ../nptl/pthread_mutex_lock.c:115 #2 0x00007f7f6dceb0df in __GI___dl_iterate_phdr (callback=0x7f7f45dc4df0, data=0x7f7e28ff92a0) at dl-iteratephdr.c:41 #3 0x00007f7f45dc616e in _Unwind_Find_FDE () from /lib/x86_64-linux-gnu/libgcc_s.so.1 #4 0x00007f7f45dc2b63 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1 #5 0x00007f7f45dc3d80 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1 #6 0x00007f7f45dc422e in _Unwind_RaiseException () from /lib/x86_64-linux-gnu/libgcc_s.so.1 #7 0x00007f7f4605833c in __cxxabiv1::__cxa_throw (obj=0x7f7e258670a0, tinfo=0x7f7f4633c770 <typeinfo for std::bad_alloc>, dest=0x7f7f46056550 <std::bad_alloc::~bad_alloc()>) at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:82 #8 0x00007f7f4605886c in operator new (sz=18446744073709551615) at ../../../../libstdc++-v3/libsupc++/new_op.cc:54 #9 0x00007f7f5170f2b9 in Eigen::internal::aligned_malloc(unsigned long) () from /usr/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so #10 0x00007f7f526fa18e in void* Eigen::internal::TensorContractionBlockMemAllocator<float, float>::allocateSlices<Eigen::ThreadPoolDevice const>(Eigen::ThreadPoolDevice const&, long, long, long, long, long, long, std::vector<float*, std::allocator<float*> >*, std::vector<float*, std::allocator<float*> >*) () from /usr/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so #11 0x00007f7f52911ec5 in void* Eigen::internal::TensorContractionKernel<float, float, float, long, Eigen::internal::blas_data_mapper<float, long, 0, 0>, Eigen::internal::TensorContractionInputMapper<float, long, 1, Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<float const, 2, 1, long>, 16, Eigen::MakePointer> const, Eigen::ThreadPoolDevice>, Eigen::array<long, 1ul>, Eigen::array<long, 1ul>, 16, true, false, 0, Eigen::MakePointer>, Eigen::internal::TensorContractionInputMapper<float, long, 0, Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<float const, 2, 1, long>, 16, Eigen::MakePointer> const, Eigen::ThreadPoolDevice>, Eigen::array<long, 1ul>, Eigen::array<long, 1ul>, 16, true, false, 0, Eigen::MakePointer> >::allocateSlices<Eigen::ThreadPoolDevice const>(Eigen::ThreadPoolDevice const&, int, int, int, std::vector<Eigen::internal::ColMajorBlock<float, long>, std::allocator<Eigen::internal::ColMajorBlock<float, long> > >*, std::vector<Eigen::internal::ColMajorBlock<float, long>, std::allocator<Eigen::internal::ColMajorBlock<float, long> > >*) () from /usr/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so #12 0x00007f7f5293cf30 in void Eigen::TensorEvaluator<Eigen::TensorContractionOp<Eigen::array<Eigen::IndexPair<long>, 1ul> const, Eigen::TensorMap<Eigen::Tensor<float const, 2, 1, long>, 16, Eigen::MakePointer> const, Eigen::TensorMap<Eigen::Tensor<float const, 2, 1, long>, 16, Eigen::MakePointer> const, Eigen::NoOpOutputKernel const> const, Eigen::ThreadPoolDevice>::evalProduct<0>(float*) const () from /usr/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so #13 0x00007f7f5293f1cb in Eigen::internal::TensorExecutor<Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<float, 2, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorContractionOp<Eigen::array<Eigen::IndexPair<long>, 1ul> const, Eigen::TensorMap<Eigen::Tensor<float const, 2, 1, long>, 16, Eigen::MakePointer> const, Eigen::TensorMap<Eigen::Tensor<float const, 2, 1, long>, 16, Eigen::MakePointer> const, Eigen::NoOpOutputKernel const> const> const, Eigen::ThreadPoolDevice, true, false>::run(Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<float, 2, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorContractionOp<Eigen::array<Eigen::IndexPair<long>, 1ul> const, Eigen::TensorMap<Eigen::Tensor<float const, 2, 1, long>, 16, Eigen::MakePointer> const, Eigen::TensorMap<Eigen::Tensor<float const, 2, 1, long>, 16, Eigen::MakePointer> const, Eigen::NoOpOutputKernel const> const> const&, Eigen::ThreadPoolDevice const&) () from /usr/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so #14 0x00007f7f529a2c7e in tensorflow::MatMulOp<Eigen::ThreadPoolDevice, float, false>::Compute(tensorflow::OpKernelContext*) () from /usr/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so #15 0x00007f7f4dee0146 in tensorflow::(anonymous namespace)::ExecutorState::Process(tensorflow::(anonymous namespace)::ExecutorState::TaggedNode, long long) () from /usr/lib/python3.7/site-packages/tensorflow/python/../libtensorflow_framework.so.1 #16 0x00007f7f4ded05a5 in std::_Function_handler<void (), std::_Bind<std::_Mem_fn<void (tensorflow::(anonymous namespace)::ExecutorState::*)(tensorflow::(anonymous namespace)::ExecutorState::TaggedNode, long long)> (tensorflow::(anonymous namespace)::ExecutorState*, tensorflow::(anonymous namespace)::ExecutorState::TaggedNode, long long)> >::_M_invoke(std::_Any_data const&) () from /usr/lib/python3.7/site-packages/tensorflow/python/../libtensorflow_framework.so.1 #17 0x00007f7f4df76cfe in Eigen::ThreadPoolTempl<tensorflow::thread::EigenEnvironment>::WorkerLoop(int) () from /usr/lib/python3.7/site-packages/tensorflow/python/../libtensorflow_framework.so.1 #18 0x00007f7f4df73b98 in std::_Function_handler<void (), tensorflow::thread::EigenEnvironment::CreateThread(std::function<void ()>)::{lambda()#1}>::_M_invoke(std::_Any_data const&) () from /usr/lib/python3.7/site-packages/tensorflow/python/../libtensorflow_framework.so.1 #19 0x00007f7f460828b3 in std::execute_native_thread_routine_compat (__p=<optimized out>) at ../../../../../libstdc++-v3/src/c++11/thread.cc:110 #20 0x00007f7f6df796ba in start_thread (arg=0x7f7e28ffb700) at pthread_create.c:333 #21 0x00007f7f6dcaf4dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62225/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62225/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62224
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62224/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62224/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62224/events
https://github.com/tensorflow/tensorflow/issues/62224
1,960,920,101
I_kwDOArmXAs504UQl
62,224
how to self-hosting docs of old version
{ "login": "freeminder89", "id": 7079596, "node_id": "MDQ6VXNlcjcwNzk1OTY=", "avatar_url": "https://avatars.githubusercontent.com/u/7079596?v=4", "gravatar_id": "", "url": "https://api.github.com/users/freeminder89", "html_url": "https://github.com/freeminder89", "followers_url": "https://api.github.com/users/freeminder89/followers", "following_url": "https://api.github.com/users/freeminder89/following{/other_user}", "gists_url": "https://api.github.com/users/freeminder89/gists{/gist_id}", "starred_url": "https://api.github.com/users/freeminder89/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/freeminder89/subscriptions", "organizations_url": "https://api.github.com/users/freeminder89/orgs", "repos_url": "https://api.github.com/users/freeminder89/repos", "events_url": "https://api.github.com/users/freeminder89/events{/privacy}", "received_events_url": "https://api.github.com/users/freeminder89/received_events", "type": "User", "site_admin": false }
[ { "id": 473184161, "node_id": "MDU6TGFiZWw0NzMxODQxNjE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:support", "name": "type:support", "color": "159b2e", "default": false, "description": "Support issues" }, { "id": 1162044565, "node_id": "MDU6TGFiZWwxMTYyMDQ0NTY1", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF%201.12", "name": "TF 1.12", "color": "c2e0c6", "default": false, "description": "Issues related to TF 1.12" }, { "id": 2012480497, "node_id": "MDU6TGFiZWwyMDEyNDgwNDk3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:docs-feature", "name": "type:docs-feature", "color": "159b2e", "default": false, "description": "Doc issues for new feature, or clarifications about functionality" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @freeminder89 ,\r\n\r\nTensorflow maintains its API documentation in tensorflow.org itself for all older versions. You can have a look of those [here](https://www.tensorflow.org/versions).", "@SuryanarayanaY \r\nold version doc link goes to https://github.com/tensorflow/docs/tree/r1.12/site/en/api_docs\r\nall markdown files, I want to convert these md files to html, then serving them as a website\r\n\r\n1. markdown files view in github, the link in one doc ref to another always misses the .md suffix\r\n2. lack of latex support", "@freeminder89 , AFAIK, tensorflow.org hosts only API docs of older versions. I doubt about other resources. \r\n\r\nCC: @MarkDaoust , Would you please confirm whether there is a way? \r\n\r\nThanks!", "Yes, there are some problems with those old doc tags. \r\nBut these aren't high-enough priority to fix now.\r\n\r\nI to wouldn't be to hard, on your own fork to write a script to add the missing .md suffixes to the links.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62224\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62224\">No</a>\n" ]
2023-10-25T09:11:01
2023-10-27T19:27:37
2023-10-27T19:27:35
NONE
null
null
null
### Issue type Support ### Have you reproduced the bug with TensorFlow Nightly? No ### Source binary ### TensorFlow version 1.12 ### Custom code No ### OS platform and distribution _No response_ ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? need to host old version doc as a website ### Standalone code to reproduce the issue ```shell no code ``` ### Relevant log output _No response_
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62224/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62224/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62223
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62223/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62223/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62223/events
https://github.com/tensorflow/tensorflow/issues/62223
1,960,859,833
I_kwDOArmXAs504Fi5
62,223
Different Behavior of tf.raw_ops.Cos+tf.raw_ops.LeakyRelu with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @zoux1a ,\r\n\r\nI have replicated the behaviour with jit_compile=True. With jit_compile=False and also by commenting out the code tf.config.run_functions_eagerly(False) the problem does not persist. Attached [gist](https://colab.research.google.com/gist/sushreebarsa/4ea5571eb6f9f8b3ec85661da80ecfbf/untitled899.ipynb#scrollTo=cft5lNrsVcI2) for reference. \r\nThank you!", "However, we think the different behaviors between eager mode and jit_compiled should be corrected in the future. Will it be fixed?", "Hi @zoux1a ,\r\n\r\nFor the Op Cos, XLA-GPU support for `dtype=bfloat16` is not available. Please refer the [source](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/tf2xla/g3doc/gpu_supported_ops.md) here. Maybe this is the reason for this behaviour.", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62223\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62223\">No</a>\n", "Hi @GwiHwan-Go ,\r\n\r\nI have tested the code with Tf2.14v and the difference is related to precision only which happens due to XLA internal fusions and conversions and XLA uses FP32 precision by default.\r\n\r\nTo check that , I have printed the `reduce_sum` of results which are same for both which is `7456` for an experiment. This indicates the results are same but only precision differences with XLA which is expected.\r\n\r\nPlease refer attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/70570ced7f76175dcaecc2f363236010/62223_final.ipynb).\r\n\r\nThanks!" ]
2023-10-25T08:38:44
2023-12-13T16:10:12
2023-11-26T01:49:36
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the tf.raw_ops.Cos+tf.raw_ops.LeakyRelu operation is invoked within a tf.function with JIT compilation enabled (jit_compile=True), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a GPU device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.Cos(x=x, ) x = tf.raw_ops.LeakyRelu(features=x, alpha=9.456766920329814) return x m = Network() inp = { "x": tf.random.normal([10,9,8,1,8,3,2], dtype=tf.bfloat16), } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 29, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 9, 8, 1, 8, 3, 2) dtype=float64) = ' 0.83984375, 0.96484375, -2.6875, ... b'y (shape=(10, 9, 8, 1, 8, 3, 2) dtype=float64) = ' 0.83984375, 0.96484375, -2.6875, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62223/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62223/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62222
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62222/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62222/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62222/events
https://github.com/tensorflow/tensorflow/issues/62222
1,960,818,136
I_kwDOArmXAs5037XY
62,222
Different Behavior of tf.raw_ops.Cos+tf.raw_ops.Asin with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @zoux1a ,\r\n\r\nI have replicated the reported behaviour with colab using TF v2.14, 2.15, and TF-nightly. Please find the [gist](https://colab.research.google.com/gist/Venkat6871/13a22e87001605bcd1ab51c8d6547366/62222_tf-2-14-2-15-nightly-v.ipynb) here for reference.\r\n\r\nThank you!", "Hi @zoux1a ,\r\n\r\nThe difference is results with `jit_compile=True` is due to the fact that with XLA there would be internal casting to `float32`, whereas without XLA it would be in `bfloat16` itself and hence there will be difference in precision of the output.\r\n\r\nIt's only precisional differences but not an error. The assertion is success with `atol=0.001 and rtol=0.1 `\r\n\r\nHowever if you change the inputs dtype to `float32` or `float16`, then assertion is success with `atol=0.001 and rtol=0.001 ` also.\r\n\r\nPlease refer to attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/88c932f256cb95d170ecd3528cc68f4e/62222_gpu_r2.ipynb) for same. \r\n\r\nThanks\r\n\r\n\r\n\r\n\r\n\r\n", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62222\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62222\">No</a>\n" ]
2023-10-25T08:17:09
2023-12-21T01:48:54
2023-12-21T01:48:51
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the tf.raw_ops.Cos+tf.raw_ops.Asin operation is invoked within a tf.function with JIT compilation enabled (jit_compile=True), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a GPU device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.Cos(x=x, ) x = tf.raw_ops.Asin(x=x, ) return x m = Network() inp = { "x": tf.random.uniform([10,9], dtype=tf.bfloat16), } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 27, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 9) dtype=float64) = ' 1.484375, 0.93359375, 0.7734375, ... b'y (shape=(10, 9) dtype=float64) = ' 1.484375, 0.9375, 0.7734375, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62222/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62222/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62221
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62221/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62221/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62221/events
https://github.com/tensorflow/tensorflow/issues/62221
1,960,789,466
I_kwDOArmXAs5030Xa
62,221
Different Behavior of tf.raw_ops.Sin+tf.raw_ops.Acos with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "kenfranko", "id": 56562020, "node_id": "MDQ6VXNlcjU2NTYyMDIw", "avatar_url": "https://avatars.githubusercontent.com/u/56562020?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kenfranko", "html_url": "https://github.com/kenfranko", "followers_url": "https://api.github.com/users/kenfranko/followers", "following_url": "https://api.github.com/users/kenfranko/following{/other_user}", "gists_url": "https://api.github.com/users/kenfranko/gists{/gist_id}", "starred_url": "https://api.github.com/users/kenfranko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kenfranko/subscriptions", "organizations_url": "https://api.github.com/users/kenfranko/orgs", "repos_url": "https://api.github.com/users/kenfranko/repos", "events_url": "https://api.github.com/users/kenfranko/events{/privacy}", "received_events_url": "https://api.github.com/users/kenfranko/received_events", "type": "User", "site_admin": false }
[ { "login": "kenfranko", "id": 56562020, "node_id": "MDQ6VXNlcjU2NTYyMDIw", "avatar_url": "https://avatars.githubusercontent.com/u/56562020?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kenfranko", "html_url": "https://github.com/kenfranko", "followers_url": "https://api.github.com/users/kenfranko/followers", "following_url": "https://api.github.com/users/kenfranko/following{/other_user}", "gists_url": "https://api.github.com/users/kenfranko/gists{/gist_id}", "starred_url": "https://api.github.com/users/kenfranko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kenfranko/subscriptions", "organizations_url": "https://api.github.com/users/kenfranko/orgs", "repos_url": "https://api.github.com/users/kenfranko/repos", "events_url": "https://api.github.com/users/kenfranko/events{/privacy}", "received_events_url": "https://api.github.com/users/kenfranko/received_events", "type": "User", "site_admin": false }, { "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false } ]
null
[ "I was able to reproduce the issue on tensorflow v2.14 and tf-nightly. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/668d97535a6a275d30801becf08cced9/untitled1419.ipynb). ", "This is likely due to fusion, where the intermediate result may be computed and kept in float32 in the case of jit-compilation, whereas without fusion it would cast to bfloat16 between the ops and produce a less precise answer. Still, both are correct. Thank you!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62221\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62221\">No</a>\n" ]
2023-10-25T08:00:07
2023-12-09T01:48:27
2023-12-09T01:48:24
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the tf.raw_ops.Sin+raw_ops.Acos operation is invoked within a tf.function with JIT compilation enabled (jit_compile=True), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a GPU device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.Sin(x=x, ) x = tf.raw_ops.Acos(x=x, ) return x m = Network() inp = { "x": tf.random.uniform([10,9], dtype=tf.bfloat16), } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 27, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 9) dtype=float64) = ' 1.4453125, 0.88671875, 1.03125, ... b'y (shape=(10, 9) dtype=float64) = ' 1.4453125, 0.8828125, 1.03125, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62221/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62221/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62220
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62220/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62220/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62220/events
https://github.com/tensorflow/tensorflow/issues/62220
1,960,695,256
I_kwDOArmXAs503dXY
62,220
Different Behavior of tf.raw_ops.Asinh with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 1133285679, "node_id": "MDU6TGFiZWwxMTMzMjg1Njc5", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:xla", "name": "comp:xla", "color": "0052cc", "default": false, "description": "XLA" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
open
false
{ "login": "kenfranko", "id": 56562020, "node_id": "MDQ6VXNlcjU2NTYyMDIw", "avatar_url": "https://avatars.githubusercontent.com/u/56562020?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kenfranko", "html_url": "https://github.com/kenfranko", "followers_url": "https://api.github.com/users/kenfranko/followers", "following_url": "https://api.github.com/users/kenfranko/following{/other_user}", "gists_url": "https://api.github.com/users/kenfranko/gists{/gist_id}", "starred_url": "https://api.github.com/users/kenfranko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kenfranko/subscriptions", "organizations_url": "https://api.github.com/users/kenfranko/orgs", "repos_url": "https://api.github.com/users/kenfranko/repos", "events_url": "https://api.github.com/users/kenfranko/events{/privacy}", "received_events_url": "https://api.github.com/users/kenfranko/received_events", "type": "User", "site_admin": false }
[ { "login": "kenfranko", "id": 56562020, "node_id": "MDQ6VXNlcjU2NTYyMDIw", "avatar_url": "https://avatars.githubusercontent.com/u/56562020?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kenfranko", "html_url": "https://github.com/kenfranko", "followers_url": "https://api.github.com/users/kenfranko/followers", "following_url": "https://api.github.com/users/kenfranko/following{/other_user}", "gists_url": "https://api.github.com/users/kenfranko/gists{/gist_id}", "starred_url": "https://api.github.com/users/kenfranko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kenfranko/subscriptions", "organizations_url": "https://api.github.com/users/kenfranko/orgs", "repos_url": "https://api.github.com/users/kenfranko/repos", "events_url": "https://api.github.com/users/kenfranko/events{/privacy}", "received_events_url": "https://api.github.com/users/kenfranko/received_events", "type": "User", "site_admin": false }, { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @zoux1a , I have replicated the reported behaviour.The difference is quite large here. Attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/428a70171b773471a1fe09ec2d933485/62220.ipynb) for reference.\r\n\r\nNeeds to check the reason for this behaviour. Thanks!" ]
2023-10-25T07:04:01
2023-10-26T17:42:19
null
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the tf.raw_ops.Asinh operation is invoked within a tf.function with JIT compilation enabled (jit_compile=True), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a GPU device. ### Standalone code to reproduce the issue ```shell I can reproduce this issue on the colab: https://colab.research.google.com/drive/1q6CDDRX-F0wCLvitMgfXTY92k72MFb2Z?usp=sharing ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 46, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 9, 8) dtype=float64) = ' 14.555534362792969, -12.858231544494629, -13.878985404968262, ... b'y (shape=(10, 9, 8) dtype=float64) = ' 14.555534362792969, -3.812309503555298, -4.158883094787598, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62220/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62220/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62219
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62219/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62219/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62219/events
https://github.com/tensorflow/tensorflow/issues/62219
1,960,673,992
I_kwDOArmXAs503YLI
62,219
Different Behavior of tf.raw_ops.Ndtri with jit_compile=True
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @zoux1a ,\r\n\r\nI have replicated the behaviour with jit_compile=True and jit_compile=False. Attached [gist](https://colab.research.google.com/gist/sushreebarsa/9ea1ceded74222f4f215b736bbeaea2c/62219.ipynb#scrollTo=p-CaW0DpSLVm) for reference. Thank you!", "It produces the result with `jit_compile=True` as `inf` and `jit_compile=False` as `nan`, it does not look like a bug, since in both the cases it takes the different code path and numerical computation. ", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62219\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62219\">No</a>\n" ]
2023-10-25T06:50:18
2023-11-26T01:49:44
2023-11-26T01:49:38
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? When the tf.raw_ops.Ndtri operation is invoked within a tf.function with JIT compilation enabled (jit_compile=True), it produces different results compared to the same operation called without JIT compilation. This inconsistency is observed when the code is executed on a GPU device. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.Ndtri(x=x, ) return x m = Network() inp = { "x": tf.random.normal(shape=[10, 9, 8], dtype=tf.float32) } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 77, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 9, 8) dtype=float64) = ' inf, -inf, inf, ... b'y (shape=(10, 9, 8) dtype=float64) = ' nan, nan, nan, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62219/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62219/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62218
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62218/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62218/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62218/events
https://github.com/tensorflow/tensorflow/issues/62218
1,960,526,163
I_kwDOArmXAs5020FT
62,218
TypeError: tensor_equals() missing 1 required positional argument: 'other' #47390
{ "login": "MrWangg1992", "id": 31319863, "node_id": "MDQ6VXNlcjMxMzE5ODYz", "avatar_url": "https://avatars.githubusercontent.com/u/31319863?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MrWangg1992", "html_url": "https://github.com/MrWangg1992", "followers_url": "https://api.github.com/users/MrWangg1992/followers", "following_url": "https://api.github.com/users/MrWangg1992/following{/other_user}", "gists_url": "https://api.github.com/users/MrWangg1992/gists{/gist_id}", "starred_url": "https://api.github.com/users/MrWangg1992/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MrWangg1992/subscriptions", "organizations_url": "https://api.github.com/users/MrWangg1992/orgs", "repos_url": "https://api.github.com/users/MrWangg1992/repos", "events_url": "https://api.github.com/users/MrWangg1992/events{/privacy}", "received_events_url": "https://api.github.com/users/MrWangg1992/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1946362326, "node_id": "MDU6TGFiZWwxOTQ2MzYyMzI2", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF%202.3", "name": "TF 2.3", "color": "1d76db", "default": false, "description": "Issues related to TF 2.3" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @MrWangg1992 ,\r\n\r\nCould you please provide the imports for aliases like K and other imports as well to reproduce the reported error ?", "Also try with latest versions since Tf2.3 is quiet older.", "> Hi @MrWangg1992 ,\r\n> \r\n> Could you please provide the imports for aliases like K and other imports as well to reproduce the reported error ?\r\n\r\nSure I think this should be all, our current project is based on either 2.3 or 2.4. For the latest version, it may take too much effort to rebuild\r\n```\r\nfrom tensorflow.keras.layers import *\r\nfrom tensorflow.keras.regularizers import l2\r\nimport tensorflow as tf\r\nfrom tensorflow.keras import backend as K\r\nimport numpy as np\r\nimport tensorflow.keras.layers as layers\r\nimport math\r\n\r\nfrom tensorflow.keras.models import model_from_json\r\nimport os, shutil, uuid\r\n\r\n\r\n```", "Hi @MrWangg1992 ,\r\n\r\nI am sorry to say that TF2.4v are not supported now. I request you to upgrade to latest version.\r\n\r\nFrom the error stack , the function `tensor_not_equals()` should be passed with 2 arguments `self` and `other`. But during program call `tensor_not_equals()` received only one argument hence causing the error. It might be bug or may be it arising from the custom_objedct serialization.\r\n\r\nCould you please try with latest Tf versions and if issue still persists please submit a colab gist of same.\r\n\r\nThanks!\r\n\r\n\r\n\r\n", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62218\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62218\">No</a>\n" ]
2023-10-25T04:44:53
2023-11-26T01:49:47
2023-11-26T01:49:39
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? Yes ### Source source ### TensorFlow version 2.3 ### Custom code Yes ``` class CoordinateChannel(Layer): """ Adds Coordinate Channels to the input tensor. # Arguments rank: An integer, the rank of the input data-uniform, e.g. "2" for 2D convolution. use_radius: Boolean flag to determine whether the radius coordinate should be added for 2D rank inputs or not. data_format: A string, one of `"channels_last"` or `"channels_first"`. The ordering of the dimensions in the inputs. `"channels_last"` corresponds to inputs with shape `(batch, ..., channels)` while `"channels_first"` corresponds to inputs with shape `(batch, channels, ...)`. It defaults to the `image_data_format` value found in your Keras config file at `~/.keras/keras.json`. If you never set it, then it will be "channels_last". # Input shape ND tensor with shape: `(samples, channels, *)` if `data_format` is `"channels_first"` or ND tensor with shape: `(samples, *, channels)` if `data_format` is `"channels_last"`. # Output shape ND tensor with shape: `(samples, channels + 2, *)` if `data_format` is `"channels_first"` or 5D tensor with shape: `(samples, *, channels + 2)` if `data_format` is `"channels_last"`. # References: - [An Intriguing Failing of Convolutional Neural Networks and the CoordConv Solution](https://arxiv.org/abs/1807.03247) """ def __init__(self, rank, use_radius=False, data_format=None, **kwargs): super(CoordinateChannel, self).__init__(**kwargs) if data_format not in [None, 'channels_first', 'channels_last']: raise ValueError('`data_format` must be either "channels_last", "channels_first" ' 'or None.') self.rank = rank self.use_radius = use_radius self.data_format = K.image_data_format() if data_format is None else data_format self.axis = 1 if K.image_data_format() == 'channels_first' else -1 self.input_spec = InputSpec(min_ndim=2) self.supports_masking = True def build(self, input_shape): assert len(input_shape) >= 2 input_dim = input_shape[self.axis] self.input_spec = InputSpec(min_ndim=self.rank + 2, axes={self.axis: input_dim}) self.built = True def call(self, inputs, training=None, mask=None): input_shape = K.shape(inputs) if self.rank == 1: input_shape = [input_shape[i] for i in range(3)] batch_shape, dim, channels = input_shape xx_range = K.tile(K.expand_dims(K.arange(0, dim, dtype='float32'), axis=0), K.stack([batch_shape, 1])) xx_range = K.expand_dims(xx_range, axis=-1) xx_channels = K.cast(xx_range, K.floatx()) xx_channels = xx_channels / K.cast(dim - 1, K.floatx()) xx_channels = (xx_channels * 2) - 1. outputs = K.concatenate([inputs, xx_channels], axis=-1) if self.rank == 2: if self.data_format == 'channels_first': inputs = K.permute_dimensions(inputs, [0, 2, 3, 1]) input_shape = K.shape(inputs) input_shape = [input_shape[i] for i in range(4)] batch_shape, dim1, dim2, channels = input_shape xx_ones = tf.ones(K.stack([batch_shape, dim2]), dtype='float32') xx_ones = K.expand_dims(xx_ones, axis=-1) xx_range = K.tile(K.expand_dims(K.arange(0, dim1, dtype='float32'), axis=0), K.stack([batch_shape, 1])) xx_range = K.expand_dims(xx_range, axis=1) xx_channels = K.batch_dot(xx_ones, xx_range, axes=[2, 1]) xx_channels = K.expand_dims(xx_channels, axis=-1) xx_channels = K.permute_dimensions(xx_channels, [0, 2, 1, 3]) yy_ones = tf.ones(K.stack([batch_shape, dim1]), dtype='float32') yy_ones = K.expand_dims(yy_ones, axis=1) yy_range = K.tile(K.expand_dims(K.arange(0, dim2, dtype='float32'), axis=0), K.stack([batch_shape, 1])) yy_range = K.expand_dims(yy_range, axis=-1) yy_channels = K.batch_dot(yy_range, yy_ones, axes=[2, 1]) yy_channels = K.expand_dims(yy_channels, axis=-1) yy_channels = K.permute_dimensions(yy_channels, [0, 2, 1, 3]) xx_channels = K.cast(xx_channels, K.floatx()) xx_channels = xx_channels / K.cast(dim1 - 1, K.floatx()) xx_channels = (xx_channels * 2) - 1. yy_channels = K.cast(yy_channels, K.floatx()) yy_channels = yy_channels / K.cast(dim2 - 1, K.floatx()) yy_channels = (yy_channels * 2) - 1. # import pdb;pdb.set_trace() outputs = K.concatenate([inputs, xx_channels, yy_channels], axis=-1) # outputs = K.concatenate([inputs, tf.cast(xx_channels, dtype=tf.float16), tf.cast(yy_channels, dtype=tf.float16)], axis=-1) if self.use_radius: rr = K.sqrt(K.square(xx_channels - 0.5) + K.square(yy_channels - 0.5)) outputs = K.concatenate([outputs, rr], axis=-1) if self.data_format == 'channels_first': outputs = K.permute_dimensions(outputs, [0, 3, 1, 2]) if self.rank == 3: if self.data_format == 'channels_first': inputs = K.permute_dimensions(inputs, [0, 2, 3, 4, 1]) input_shape = K.shape(inputs) input_shape = [input_shape[i] for i in range(5)] batch_shape, dim1, dim2, dim3, channels = input_shape xx_ones = tf.ones(K.stack([batch_shape, dim3]), dtype='float32') xx_ones = K.expand_dims(xx_ones, axis=-1) xx_range = K.tile(K.expand_dims(K.arange(0, dim2, dtype='float32'), axis=0), K.stack([batch_shape, 1])) xx_range = K.expand_dims(xx_range, axis=1) xx_channels = K.batch_dot(xx_ones, xx_range, axes=[2, 1]) xx_channels = K.expand_dims(xx_channels, axis=-1) xx_channels = K.permute_dimensions(xx_channels, [0, 2, 1, 3]) xx_channels = K.expand_dims(xx_channels, axis=1) xx_channels = K.tile(xx_channels, [1, dim1, 1, 1, 1]) yy_ones = tf.ones(K.stack([batch_shape, dim2]), dtype='float32') yy_ones = K.expand_dims(yy_ones, axis=1) yy_range = K.tile(K.expand_dims(K.arange(0, dim3, dtype='float32'), axis=0), K.stack([batch_shape, 1])) yy_range = K.expand_dims(yy_range, axis=-1) yy_channels = K.batch_dot(yy_range, yy_ones, axes=[2, 1]) yy_channels = K.expand_dims(yy_channels, axis=-1) yy_channels = K.permute_dimensions(yy_channels, [0, 2, 1, 3]) yy_channels = K.expand_dims(yy_channels, axis=1) yy_channels = K.tile(yy_channels, [1, dim1, 1, 1, 1]) zz_range = K.tile(K.expand_dims(K.arange(0, dim1, dtype='float32'), axis=0), K.stack([batch_shape, 1])) zz_range = K.expand_dims(zz_range, axis=-1) zz_range = K.expand_dims(zz_range, axis=-1) zz_channels = K.tile(zz_range, [1, 1, dim2, dim3]) zz_channels = K.expand_dims(zz_channels, axis=-1) xx_channels = K.cast(xx_channels, K.floatx()) xx_channels = xx_channels / K.cast(dim2 - 1, K.floatx()) xx_channels = xx_channels * 2 - 1. yy_channels = K.cast(yy_channels, K.floatx()) yy_channels = yy_channels / K.cast(dim3 - 1, K.floatx()) yy_channels = yy_channels * 2 - 1. zz_channels = K.cast(zz_channels, K.floatx()) zz_channels = zz_channels / K.cast(dim1 - 1, K.floatx()) zz_channels = zz_channels * 2 - 1. outputs = K.concatenate([inputs, zz_channels, xx_channels, yy_channels], axis=-1) if self.data_format == 'channels_first': outputs = K.permute_dimensions(outputs, [0, 4, 1, 2, 3]) return outputs def compute_output_shape(self, input_shape): assert input_shape and len(input_shape) >= 2 assert input_shape[self.axis] if self.use_radius and self.rank == 2: channel_count = 3 else: channel_count = self.rank output_shape = list(input_shape) output_shape[self.axis] = input_shape[self.axis] + channel_count return tuple(output_shape) def get_config(self): config = { 'rank': self.rank, 'use_radius': self.use_radius, 'data_format': self.data_format } base_config = super(CoordinateChannel, self).get_config() return dict(list(base_config.items()) + list(config.items())) class TransformerDecoderLayer(layers.Layer): def __init__(self, d_model, num_heads, dim_feedforward, regularizer_rate=0, dropout=0.1, vocab_size=2): super(TransformerDecoderLayer, self).__init__() self.last_attn_scores = None self.regularizer_rate = regularizer_rate self.kernel_regularizer = l2(regularizer_rate) self.self_attn = layers.MultiHeadAttention(num_heads=num_heads, key_dim=d_model, dropout=dropout) self.multihead_attn = layers.MultiHeadAttention(num_heads=num_heads, key_dim=d_model, dropout=dropout) self.linear1 = layers.Dense(dim_feedforward, activation='relu', kernel_regularizer=self.kernel_regularizer) self.dropout = layers.Dropout(dropout) self.linear2 = layers.Dense(d_model, kernel_regularizer=self.kernel_regularizer) self.norm1 = layers.LayerNormalization(epsilon=1e-6) self.norm2 = layers.LayerNormalization(epsilon=1e-6) self.norm3 = layers.LayerNormalization(epsilon=1e-6) self.dropout1 = layers.Dropout(dropout) self.dropout2 = layers.Dropout(dropout) self.dropout3 = layers.Dropout(dropout) self.d_model = d_model self.vocab_size = vocab_size self.drop_out_rate = dropout def get_config(self): config = { 'd_model': self.d_model, 'num_heads': self.d_model//32, 'dim_feedforward': self.d_model*4, 'dropout': self.drop_out_rate, 'vocab_size': self.vocab_size, 'regularizer_rate': self.regularizer_rate, } return config def call(self, tgt, memory, tgt_mask=None, memory_mask=None, tgt_key_padding_mask=None, memory_key_padding_mask=None): tgt = PositionalEmbedding(self.vocab_size, self.d_model, tgt.shape[1]).call(tgt) look_ahead_mask = self.create_look_ahead_mask(tgt.shape[1]) look_ahead_mask = look_ahead_mask[tf.newaxis, :, :] tgt2 = self.self_attn(query=tgt, value=tgt, key=tgt, attention_mask=look_ahead_mask)[0] tgt = tgt + self.dropout1(tgt2) tgt = self.norm1(tgt) multihead_attn_output = self.multihead_attn(query=tgt, value=memory, key=memory, return_attention_scores=True) tgt2 = multihead_attn_output[0][0] attn_scores = multihead_attn_output[1][0] tgt = tgt + self.dropout2(tgt2) tgt = self.norm2(tgt) self.last_attn_scores = attn_scores tgt2 = self.linear2(self.dropout(self.linear1(tgt))) tgt = tgt + self.dropout3(tgt2) tgt = self.norm3(tgt) return tgt def create_look_ahead_mask(self, size): mask = 1 - tf.linalg.band_part(tf.ones((size, size)), -1, 0) return mask # (seq_len, seq_len) def add_regularizers(model, regularizer, custom_objects=None): ''' :param regularizer: The regularizer you want to add :param model: The model you want to add regularizer. Make sure you freeze layer before pass in otherwise it will add regularizer to all layers :return: The model after regularizers added. ''' from tensorflow.keras.models import model_from_json import os, shutil, uuid random_number = uuid.uuid4() folder = './tmp-{random_number}'.format(random_number=random_number) tmp_filename = 'tmp.ckpt' tmp_file_path = os.path.join(folder, tmp_filename) os.makedirs(folder, exist_ok=True) model.save_weights(tmp_file_path) for layer in model.layers: for attr in ['kernel_regularizer', 'bias_regularizer', 'depthwise_regularizer', 'pointwise_regularizer']: if hasattr(layer, attr) and layer.trainable: if attr == 'bias_regularizer' and not layer.use_bias: continue setattr(layer, attr, regularizer) out = model_from_json(model.to_json(), custom_objects=custom_objects) out.load_weights(tmp_file_path) shutil.rmtree(folder) return out ``` Trying to use add_regularizers to model with self designed layer, but failed. ### Standalone code to reproduce the issue ```shell x1 = Input(shape=[64, 7,7, 256]) x2 = Input(shape=[64, 159]) x = layers.GlobalAveragePooling2D()(x1) x = layers.Dense(256, use_bias=False)(x) x = tf.expand_dims(x , axis=1) x = TransformerDecoderLayer(128, 128 // 32, 128 * 4, 0.2)(x2, x) model = Model(inputs=[x1, x2], outputs=x) model = add_regularizers(model, l2(l2_rate), custom_objects={ "TransformerDecoderLayer": TransformerDecoderLayer }) or from tensorflow.keras.models import model_from_json with open("/data/sbot_shared_2/qiwang/cv/barcode_deblur/model.json", "r") as json_file: json_string = json_file.read() model = model_from_json(json_string, custom_objects={"TransformerDecoderLayer":TransformerDecoderLayer,"CoordinateChannel": CoordinateChannel,})) ``` ### Relevant log output Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/saving/model_config.py", line 131, in model_from_json return deserialize(config, custom_objects=custom_objects) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/layers/serialization.py", line 177, in deserialize printable_module_name='layer') File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/utils/generic_utils.py", line 358, in deserialize_keras_object list(custom_objects.items()))) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/functional.py", line 669, in from_config config, custom_objects) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/functional.py", line 1285, in reconstruct_from_config process_node(layer, node_data) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/functional.py", line 1233, in process_node output_tensors = layer(input_tensors, **kwargs) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 952, in __call__ input_list) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 1091, in _functional_construction_call inputs, input_masks, args, kwargs) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 822, in _keras_tensor_symbolic_call return self._infer_output_signature(inputs, args, kwargs, input_masks) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 863, in _infer_output_signature outputs = call_fn(inputs, *args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/layers/core.py", line 1327, in _call_wrapper return self._call_wrapper(*args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/layers/core.py", line 1359, in _call_wrapper result = self.function(*args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/dispatch.py", line 201, in wrapper return target(*args, **kwargs) TypeError: tensor_not_equals() missing 1 required positional argument: 'other' ## **Json file use to load model** ```json {"class_name": "Functional", "config": {"name": "model", "layers": [{"class_name": "InputLayer", "config": {"batch_input_shape": [null, 224, 224, 1], "dtype": "float32", "sparse": false, "ragged": false, "name": "input_1"}, "name": "input_1", "inbound_nodes": []}, {"class_name": "CoordinateChannel", "config": {"name": "coordinate_channel", "trainable": true, "dtype": "float32", "rank": 2, "use_radius": false, "data_format": "channels_last"}, "name": "coordinate_channel", "inbound_nodes": [[["input_1", 0, 0, {}]]]}, {"class_name": "Sequential", "config": {"name": "sequential", "layers": [{"class_name": "InputLayer", "config": {"batch_input_shape": [null, 224, 224, 3], "dtype": "float32", "sparse": false, "ragged": false, "name": "conv2d_input"}}, {"class_name": "Conv2D", "config": {"name": "conv2d", "trainable": true, "dtype": "float32", "filters": 48, "kernel_size": [3, 3], "strides": [2, 2], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_1", "trainable": true, "dtype": "float32", "filters": 96, "kernel_size": [3, 3], "strides": [2, 2], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_1", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_1", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_1", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_2", "trainable": true, "dtype": "float32", "filters": 96, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_2", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_2", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_2", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_3", "trainable": true, "dtype": "float32", "filters": 96, "kernel_size": [3, 3], "strides": [2, 2], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_3", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_3", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_3", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_4", "trainable": true, "dtype": "float32", "filters": 96, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_4", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_4", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_4", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_5", "trainable": true, "dtype": "float32", "filters": 96, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_5", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_5", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_5", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "MaxPooling2D", "config": {"name": "max_pooling2d", "trainable": true, "dtype": "float32", "pool_size": [2, 2], "padding": "valid", "strides": [2, 2], "data_format": "channels_last"}}, {"class_name": "Dropout", "config": {"name": "dropout_6", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_6", "trainable": true, "dtype": "float32", "filters": 192, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_6", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_6", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_7", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_7", "trainable": true, "dtype": "float32", "filters": 192, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_7", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_7", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_8", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_8", "trainable": true, "dtype": "float32", "filters": 192, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_8", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_8", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_9", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_9", "trainable": true, "dtype": "float32", "filters": 384, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_9", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_9", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_10", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "MaxPooling2D", "config": {"name": "max_pooling2d_1", "trainable": true, "dtype": "float32", "pool_size": [2, 2], "padding": "valid", "strides": [2, 2], "data_format": "channels_last"}}, {"class_name": "Dropout", "config": {"name": "dropout_11", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_10", "trainable": true, "dtype": "float32", "filters": 1536, "kernel_size": [1, 1], "strides": [1, 1], "padding": "valid", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_10", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_10", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_12", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_11", "trainable": true, "dtype": "float32", "filters": 192, "kernel_size": [1, 1], "strides": [1, 1], "padding": "valid", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_11", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_11", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_13", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_12", "trainable": true, "dtype": "float32", "filters": 192, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_12", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_12", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_14", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}]}, "name": "sequential", "inbound_nodes": [[["coordinate_channel", 0, 0, {}]]]}, {"class_name": "GlobalAveragePooling2D", "config": {"name": "global_average_pooling2d_1", "trainable": true, "dtype": "float32", "data_format": "channels_last"}, "name": "global_average_pooling2d_1", "inbound_nodes": [[["sequential", 1, 0, {}]]]}, {"class_name": "InputLayer", "config": {"batch_input_shape": [null, 159], "dtype": "float32", "sparse": false, "ragged": false, "name": "input_2"}, "name": "input_2", "inbound_nodes": []}, {"class_name": "Dense", "config": {"name": "dense_4", "trainable": true, "dtype": "float32", "units": 450, "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "dense_4", "inbound_nodes": [[["global_average_pooling2d_1", 0, 0, {}]]]}, {"class_name": "GlobalAveragePooling2D", "config": {"name": "global_average_pooling2d", "trainable": true, "dtype": "float32", "data_format": "channels_last"}, "name": "global_average_pooling2d", "inbound_nodes": [[["sequential", 1, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "dense", "trainable": true, "dtype": "float32", "units": 256, "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "dense", "inbound_nodes": [[["global_average_pooling2d", 0, 0, {}]]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.expand_dims", "trainable": true, "dtype": "float32", "function": "expand_dims"}, "name": "tf.expand_dims", "inbound_nodes": [["dense", 0, 0, {"axis": 1}]]}, {"class_name": "TransformerDecoderLayer", "config": {"d_model": 256, "num_heads": 8, "dim_feedforward": 1024, "dropout": 0.0, "vocab_size": 2, "regularizer_rate": 3e-06}, "name": "transformer_decoder_layer", "inbound_nodes": [[["input_2", 0, 0, {"memory": ["tf.expand_dims", 0, 0]}]]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.cast", "trainable": true, "dtype": "float32", "function": "cast"}, "name": "tf.cast", "inbound_nodes": [["input_2", 0, 0, {"dtype": "float32"}]]}, {"class_name": "Dense", "config": {"name": "dense_3", "trainable": true, "dtype": "float32", "units": 2, "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "dense_3", "inbound_nodes": [[["transformer_decoder_layer", 0, 0, {}]]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.convert_to_tensor_1", "trainable": true, "dtype": "float32", "function": "convert_to_tensor"}, "name": "tf.convert_to_tensor_1", "inbound_nodes": [["tf.cast", 0, 0, {}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.convert_to_tensor", "trainable": true, "dtype": "float32", "function": "convert_to_tensor"}, "name": "tf.convert_to_tensor", "inbound_nodes": [["dense_3", 0, 0, {}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.cast_1", "trainable": true, "dtype": "float32", "function": "cast"}, "name": "tf.cast_1", "inbound_nodes": [["tf.convert_to_tensor_1", 0, 0, {"dtype": "int64"}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.convert_to_tensor_2", "trainable": true, "dtype": "float32", "function": "convert_to_tensor"}, "name": "tf.convert_to_tensor_2", "inbound_nodes": [["tf.convert_to_tensor", 0, 0, {}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.nn.sparse_softmax_cross_entropy_with_logits", "trainable": true, "dtype": "float32", "function": "nn.sparse_softmax_cross_entropy_with_logits"}, "name": "tf.nn.sparse_softmax_cross_entropy_with_logits", "inbound_nodes": [["tf.cast_1", 0, 0, {"logits": ["tf.convert_to_tensor_2", 0, 0]}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.cast_2", "trainable": true, "dtype": "float32", "function": "cast"}, "name": "tf.cast_2", "inbound_nodes": [["tf.nn.sparse_softmax_cross_entropy_with_logits", 0, 0, {"dtype": "float32"}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.math.multiply", "trainable": true, "dtype": "float32", "function": "math.multiply"}, "name": "tf.math.multiply", "inbound_nodes": [["tf.cast_2", 0, 0, {"y": 1.0}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.__operators__.ne", "trainable": true, "dtype": "float32", "function": "__operators__.ne"}, "name": "tf.__operators__.ne", "inbound_nodes": [["input_2", 0, 0, {}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.cast_3", "trainable": true, "dtype": "float32", "function": "cast"}, "name": "tf.cast_3", "inbound_nodes": [["tf.math.multiply", 0, 0, {"dtype": "float32"}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.cast_4", "trainable": true, "dtype": "float32", "function": "cast"}, "name": "tf.cast_4", "inbound_nodes": [["tf.__operators__.ne", 0, 0, {"dtype": "float32"}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.math.multiply_1", "trainable": true, "dtype": "float32", "function": "math.multiply"}, "name": "tf.math.multiply_1", "inbound_nodes": [["tf.cast_3", 0, 0, {"y": ["tf.cast_4", 0, 0], "name": null}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.math.reduce_sum", "trainable": true, "dtype": "float32", "function": "math.reduce_sum"}, "name": "tf.math.reduce_sum", "inbound_nodes": [["tf.math.multiply_1", 0, 0, {}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.math.reduce_sum_1", "trainable": true, "dtype": "float32", "function": "math.reduce_sum"}, "name": "tf.math.reduce_sum_1", "inbound_nodes": [["tf.cast_4", 0, 0, {}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.math.truediv", "trainable": true, "dtype": "float32", "function": "math.truediv"}, "name": "tf.math.truediv", "inbound_nodes": [["tf.math.reduce_sum", 0, 0, {"y": ["tf.math.reduce_sum_1", 0, 0], "name": null}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.math.multiply_2", "trainable": true, "dtype": "float32", "function": "math.multiply"}, "name": "tf.math.multiply_2", "inbound_nodes": [["tf.math.truediv", 0, 0, {"y": 0.5, "name": null}]]}, {"class_name": "AddLoss", "config": {"name": "add_loss", "trainable": true, "dtype": "float32", "unconditional": false}, "name": "add_loss", "inbound_nodes": [[["tf.math.multiply_2", 0, 0, {}]]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.math.multiply_3", "trainable": true, "dtype": "float32", "function": "math.multiply"}, "name": "tf.math.multiply_3", "inbound_nodes": [["tf.math.truediv", 0, 0, {"y": 0.5, "name": null}]]}, {"class_name": "AddMetric", "config": {"name": "add_metric", "trainable": true, "dtype": "float32", "aggregation": "mean", "metric_name": "transformer_decoder_loss"}, "name": "add_metric", "inbound_nodes": [[["tf.math.multiply_3", 0, 0, {}]]]}], "input_layers": [["input_1", 0, 0], ["input_2", 0, 0]], "output_layers": [["dense_4", 0, 0]]}, "keras_version": "2.4.0", "backend": "tensorflow"} ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62218/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62218/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62217
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62217/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62217/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62217/events
https://github.com/tensorflow/tensorflow/issues/62217
1,960,327,245
I_kwDOArmXAs502DhN
62,217
TypeError: this __dict__ descriptor does not support '_DictWrapper' objects
{ "login": "mattdangerw", "id": 1389937, "node_id": "MDQ6VXNlcjEzODk5Mzc=", "avatar_url": "https://avatars.githubusercontent.com/u/1389937?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mattdangerw", "html_url": "https://github.com/mattdangerw", "followers_url": "https://api.github.com/users/mattdangerw/followers", "following_url": "https://api.github.com/users/mattdangerw/following{/other_user}", "gists_url": "https://api.github.com/users/mattdangerw/gists{/gist_id}", "starred_url": "https://api.github.com/users/mattdangerw/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mattdangerw/subscriptions", "organizations_url": "https://api.github.com/users/mattdangerw/orgs", "repos_url": "https://api.github.com/users/mattdangerw/repos", "events_url": "https://api.github.com/users/mattdangerw/events{/privacy}", "received_events_url": "https://api.github.com/users/mattdangerw/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 473184161, "node_id": "MDU6TGFiZWw0NzMxODQxNjE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:support", "name": "type:support", "color": "159b2e", "default": false, "description": "Support issues" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097545817, "node_id": "MDU6TGFiZWwxMDk3NTQ1ODE3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:apis", "name": "comp:apis", "color": "0052cc", "default": false, "description": "Highlevel API related issues" } ]
closed
false
{ "login": "rohan100jain", "id": 144114, "node_id": "MDQ6VXNlcjE0NDExNA==", "avatar_url": "https://avatars.githubusercontent.com/u/144114?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rohan100jain", "html_url": "https://github.com/rohan100jain", "followers_url": "https://api.github.com/users/rohan100jain/followers", "following_url": "https://api.github.com/users/rohan100jain/following{/other_user}", "gists_url": "https://api.github.com/users/rohan100jain/gists{/gist_id}", "starred_url": "https://api.github.com/users/rohan100jain/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rohan100jain/subscriptions", "organizations_url": "https://api.github.com/users/rohan100jain/orgs", "repos_url": "https://api.github.com/users/rohan100jain/repos", "events_url": "https://api.github.com/users/rohan100jain/events{/privacy}", "received_events_url": "https://api.github.com/users/rohan100jain/received_events", "type": "User", "site_admin": false }
[ { "login": "rohan100jain", "id": 144114, "node_id": "MDQ6VXNlcjE0NDExNA==", "avatar_url": "https://avatars.githubusercontent.com/u/144114?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rohan100jain", "html_url": "https://github.com/rohan100jain", "followers_url": "https://api.github.com/users/rohan100jain/followers", "following_url": "https://api.github.com/users/rohan100jain/following{/other_user}", "gists_url": "https://api.github.com/users/rohan100jain/gists{/gist_id}", "starred_url": "https://api.github.com/users/rohan100jain/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rohan100jain/subscriptions", "organizations_url": "https://api.github.com/users/rohan100jain/orgs", "repos_url": "https://api.github.com/users/rohan100jain/repos", "events_url": "https://api.github.com/users/rohan100jain/events{/privacy}", "received_events_url": "https://api.github.com/users/rohan100jain/received_events", "type": "User", "site_admin": false }, { "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false } ]
null
[ "@sachinprasadhs,\r\nI was able to reproduce the issue on tf-[nightly](https://colab.research.google.com/gist/tilakrayal/929175f4ba6ee4b734402c76d6e94173/dict_output_bug.ipynb) -2.16.0-dev20231026. Kindly find the gist of it here.", "Is there an easy patch to fix this for TF2.15? E.g. can I just downrev typing_extensions in pip_package/setup.py?\r\n", "To answer my own question: Yes. Just applying the change from https://github.com/tensorflow/tensorflow/pull/60688 fixes this for us.", "@plopresti,\r\nI tried to execute the code available on the colab with the latest tf-nightly(2.16.0-dev20240125) along with the keras3.0 version and it was executed without any issue/error. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/ef09970d8f6c3ef48f0fc5d0a74535c5/dict_output_bug.ipynb). Thank you!", "@tilakrayal Yes, our reproducer also passes on tf-nightly.\r\n\r\nI wonder what change fixed it. Anyway this does not appear to be an issue with latest builds.", "@plopresti,\r\nYeah the changes have happened with the respective PR https://github.com/keras-team/keras/pull/18682.\r\n```\r\n\r\n if backend() == \"tensorflow\":\r\n # This stop tensorflow from wrapping tf.function output in a\r\n # _DictWrapper object.\r\n _self_setattr_tracking = getattr(\r\n self, \"_self_setattr_tracking\", True\r\n )\r\n self._self_setattr_tracking = False\r\n```\r\n\r\nThank you!", "At this point, given that keras fixed it, this issue can be closed, I think", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62217\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62217\">No</a>\n", "@tilakrayal \r\n\r\nThis issue is happening for us again with the r2.17 branch.\r\n\r\n`export WRAPT_DISABLE_EXTENSIONS=true` (per https://github.com/tensorflow/tensorflow/issues/60687#issuecomment-1647756840) appears to work around it. But I am unsure what the knock-on effects of that might be.\r\n\r\nRebuilding TensorFlow after patching `tensorflow/tools/pip_package/setup.py` to force `typing_extensions<4.6.0` also works around it.\r\n\r\nI have confirmed our Keras version (3.3.3) has the change you cite above.\r\n\r\nI am at a loss for how to proceed and would welcome any suggestion. Thank you!" ]
2023-10-25T01:11:31
2024-06-11T17:07:50
2024-02-15T01:47:26
MEMBER
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? Yes ### Source binary ### TensorFlow version nightly ### Custom code Yes ### OS platform and distribution Colab ### Python version 3.10 ### Current behavior? - Install a clean tensorflow environment with the latest `typing-extensions` pip package. - Assign a dictionary to a `tf.Module` (will wrap it in a `_DictWrapper` for tracking). - Output that dictionary from a `tf.function`. - `TypeError: this __dict__ descriptor does not support '_DictWrapper' objects`. This is somewhat of a zombie bug, see https://github.com/tensorflow/tensorflow/issues/60687. This is important because it breaks all `keras` functional models with dictionary output, but is not a `keras` bug. This can be reproduced simply with low-level tensorflow. We either need to continue pinning an older version of typing extensions, or fix tensorflow to work with the latest version of typing extension. The latter seems less likely to keep breaking. ### Standalone code to reproduce the issue https://colab.research.google.com/gist/mattdangerw/6904dc4ab29ff936ad3c3b966848f463/dict-output-bug.ipynb ### Relevant log output ```shell --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-4-4a26ae41286e> in <cell line: 12>() 10 x = tf.constant([2, 3]) 11 y = tf.constant([3, -2]) ---> 12 f(x, y) 4 frames /usr/local/lib/python3.10/dist-packages/tensorflow/python/util/traceback_utils.py in error_handler(*args, **kwargs) 151 except Exception as e: 152 filtered_tb = _process_traceback_frames(e.__traceback__) --> 153 raise e.with_traceback(filtered_tb) from None 154 finally: 155 del filtered_tb /usr/local/lib/python3.10/dist-packages/tensorflow/core/function/trace_type/trace_type_builder.py in from_value(value, context) 142 if context.is_legacy_signature and isinstance(value, trace.TraceType): 143 return value --> 144 elif isinstance(value, trace.SupportsTracingProtocol): 145 generated_type = value.__tf_tracing_type__(context) 146 if not isinstance(generated_type, trace.TraceType): /usr/local/lib/python3.10/dist-packages/typing_extensions.py in __instancecheck__(cls, instance) 601 for attr in cls.__protocol_attrs__: 602 try: --> 603 val = inspect.getattr_static(instance, attr) 604 except AttributeError: 605 break /usr/lib/python3.10/inspect.py in getattr_static(obj, attr, default) 1741 if (dict_attr is _sentinel or 1742 type(dict_attr) is types.MemberDescriptorType): -> 1743 instance_result = _check_instance(obj, attr) 1744 else: 1745 klass = obj /usr/lib/python3.10/inspect.py in _check_instance(obj, attr) 1688 instance_dict = {} 1689 try: -> 1690 instance_dict = object.__getattribute__(obj, "__dict__") 1691 except AttributeError: 1692 pass TypeError: this __dict__ descriptor does not support '_DictWrapper' objects ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62217/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62217/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62216
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62216/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62216/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62216/events
https://github.com/tensorflow/tensorflow/pull/62216
1,960,290,061
PR_kwDOArmXAs5dseqv
62,216
r2.15 cherry-pick: 66681ea34be "Add missing headers to the Windows Libtensorflow archive"
{ "login": "tensorflow-jenkins", "id": 16359713, "node_id": "MDQ6VXNlcjE2MzU5NzEz", "avatar_url": "https://avatars.githubusercontent.com/u/16359713?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tensorflow-jenkins", "html_url": "https://github.com/tensorflow-jenkins", "followers_url": "https://api.github.com/users/tensorflow-jenkins/followers", "following_url": "https://api.github.com/users/tensorflow-jenkins/following{/other_user}", "gists_url": "https://api.github.com/users/tensorflow-jenkins/gists{/gist_id}", "starred_url": "https://api.github.com/users/tensorflow-jenkins/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tensorflow-jenkins/subscriptions", "organizations_url": "https://api.github.com/users/tensorflow-jenkins/orgs", "repos_url": "https://api.github.com/users/tensorflow-jenkins/repos", "events_url": "https://api.github.com/users/tensorflow-jenkins/events{/privacy}", "received_events_url": "https://api.github.com/users/tensorflow-jenkins/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "@learning-to-play The Windows libtensorflow archive is missing few header files. Due to this, Windows users are running into errors when trying to use Libtensorflow (see https://github.com/tensorflow/tensorflow/issues/59762 and https://github.com/tensorflow/tensorflow/issues/61964). This PR amends the Windows libtensorflow build script to add the missing headers to the archive. It will be great if we can have this PR cherrypicked before we do the TF 2.15 final release." ]
2023-10-25T00:21:47
2024-04-10T19:05:02
2024-04-10T19:04:59
COLLABORATOR
null
false
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/pulls/62216", "html_url": "https://github.com/tensorflow/tensorflow/pull/62216", "diff_url": "https://github.com/tensorflow/tensorflow/pull/62216.diff", "patch_url": "https://github.com/tensorflow/tensorflow/pull/62216.patch", "merged_at": null }
Refer to the original commit: https://github.com/tensorflow/tensorflow/commit/66681ea34bee93fa359486458f92ceea864cc6de
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62216/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62216/timeline
null
null
true
https://api.github.com/repos/tensorflow/tensorflow/issues/62215
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62215/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62215/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62215/events
https://github.com/tensorflow/tensorflow/issues/62215
1,960,258,372
I_kwDOArmXAs501ytE
62,215
Tensorflow Partitioned Variable checkpoint Inconsistency
{ "login": "hmc-cs-mdrissi", "id": 16809055, "node_id": "MDQ6VXNlcjE2ODA5MDU1", "avatar_url": "https://avatars.githubusercontent.com/u/16809055?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hmc-cs-mdrissi", "html_url": "https://github.com/hmc-cs-mdrissi", "followers_url": "https://api.github.com/users/hmc-cs-mdrissi/followers", "following_url": "https://api.github.com/users/hmc-cs-mdrissi/following{/other_user}", "gists_url": "https://api.github.com/users/hmc-cs-mdrissi/gists{/gist_id}", "starred_url": "https://api.github.com/users/hmc-cs-mdrissi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hmc-cs-mdrissi/subscriptions", "organizations_url": "https://api.github.com/users/hmc-cs-mdrissi/orgs", "repos_url": "https://api.github.com/users/hmc-cs-mdrissi/repos", "events_url": "https://api.github.com/users/hmc-cs-mdrissi/events{/privacy}", "received_events_url": "https://api.github.com/users/hmc-cs-mdrissi/received_events", "type": "User", "site_admin": false }
[ { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 996845227, "node_id": "MDU6TGFiZWw5OTY4NDUyMjc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:dist-strat", "name": "comp:dist-strat", "color": "0052cc", "default": false, "description": "Distribution Strategy related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "jamesmullenbach", "id": 6721195, "node_id": "MDQ6VXNlcjY3MjExOTU=", "avatar_url": "https://avatars.githubusercontent.com/u/6721195?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jamesmullenbach", "html_url": "https://github.com/jamesmullenbach", "followers_url": "https://api.github.com/users/jamesmullenbach/followers", "following_url": "https://api.github.com/users/jamesmullenbach/following{/other_user}", "gists_url": "https://api.github.com/users/jamesmullenbach/gists{/gist_id}", "starred_url": "https://api.github.com/users/jamesmullenbach/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jamesmullenbach/subscriptions", "organizations_url": "https://api.github.com/users/jamesmullenbach/orgs", "repos_url": "https://api.github.com/users/jamesmullenbach/repos", "events_url": "https://api.github.com/users/jamesmullenbach/events{/privacy}", "received_events_url": "https://api.github.com/users/jamesmullenbach/received_events", "type": "User", "site_admin": false }
[ { "login": "jamesmullenbach", "id": 6721195, "node_id": "MDQ6VXNlcjY3MjExOTU=", "avatar_url": "https://avatars.githubusercontent.com/u/6721195?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jamesmullenbach", "html_url": "https://github.com/jamesmullenbach", "followers_url": "https://api.github.com/users/jamesmullenbach/followers", "following_url": "https://api.github.com/users/jamesmullenbach/following{/other_user}", "gists_url": "https://api.github.com/users/jamesmullenbach/gists{/gist_id}", "starred_url": "https://api.github.com/users/jamesmullenbach/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jamesmullenbach/subscriptions", "organizations_url": "https://api.github.com/users/jamesmullenbach/orgs", "repos_url": "https://api.github.com/users/jamesmullenbach/repos", "events_url": "https://api.github.com/users/jamesmullenbach/events{/privacy}", "received_events_url": "https://api.github.com/users/jamesmullenbach/received_events", "type": "User", "site_admin": false }, { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "I think logic that allows legacy.optimizer variables to handle sharding with checkpointing lives [here](https://github.com/keras-team/keras/blob/68f9af408a1734704746f7e6fa9cfede0d6879d8/keras/optimizers/legacy/optimizer_v2.py#L936), _create_slots_for_sharded_variables while new experimental.optimizer is missing equivalent [logic](https://github.com/keras-team/keras/blob/v2.14.0/keras/optimizers/optimizer.py). So maybe fits more as keras repo issue although you can trigger this bug without explicitly import keras or even referencing tf.keras once as default optimizer when model.compile(optimizer=\"Adam\") will lead to this.\r\n\r\nI see also a bit more sharded specific logic inside `get_slot` [here](https://github.com/keras-team/keras/blob/68f9af408a1734704746f7e6fa9cfede0d6879d8/keras/optimizers/legacy/optimizer_v2.py#L1090)\r\n\r\nedit: Looks like this is key [pr](https://github.com/keras-team/keras/commit/75d70a610dffe927d89ceb400d79bb7f9027b26e) where legacy.optimizer got support for handling sharded variables well.", "Hi Mehdi,\r\n\r\nThanks for reporting this. I can reproduce the shape map you provided, however when I load the model with different sharding or no sharding, it loads correctly. Could you share the exact code you're using to load the checkpoint and the error message you are getting? Thanks!", "> however when I load the model with different sharding or no sharding, it loads correctly\r\n\r\nMy guess is you reloaded model, but didn't reload optimizer too.\r\n\r\n```python\r\nfrom typing import Any\r\n\r\nimport os\r\nimport tempfile\r\n\r\nimport tensorflow as tf\r\nfrom tensorflow.python.distribute.sharded_variable import ShardedVariable\r\n\r\n\r\n# More realistic example this would be done by Parameter Server Strategy.\r\ndef shard_variables_creator(partitioner) -> Any:\r\n def _creator(next_creator, **kwargs):\r\n var = next_creator(**kwargs)\r\n if var.shape.rank == 0:\r\n return var\r\n\r\n num_shards = partitioner(var.shape, var.dtype, axis=0)\r\n if num_shards[0] == 1:\r\n return var\r\n\r\n shard_count = num_shards[0]\r\n shards = []\r\n start = 0\r\n for index in range(shard_count):\r\n shard_name = var.name.removesuffix(\":0\") + f\"/part_{index}\"\r\n size = var.shape[0] // shard_count + (1 if var.shape[0] % shard_count > index else 0)\r\n shards.append(tf.Variable(var[start : start + size], name=shard_name))\r\n start += size\r\n\r\n return ShardedVariable(shards)\r\n\r\n return _creator\r\n\r\n\r\npartitioner = tf.distribute.experimental.partitioners.MaxSizePartitioner(max_shard_bytes=100 * 16 * 4)\r\n\r\nwith tf.variable_creator_scope(shard_variables_creator(partitioner)):\r\n toy_model = tf.keras.Sequential(\r\n [tf.keras.layers.Embedding(100, 32), tf.keras.layers.Dense(1, activation=\"sigmoid\")]\r\n )\r\n toy_model.compile(loss=\"binary_crossentropy\", optimizer=tf.optimizers.experimental.Adam())\r\n toy_model.build(input_shape=(None, 1))\r\n toy_model.optimizer.build(toy_model.trainable_variables) # type: ignore\r\n\r\ntemp_dir = tempfile.gettempdir()\r\nweights_path = os.path.join(temp_dir, \"model_weights\")\r\ntoy_model.save_weights(weights_path)\r\n\r\ntoy_model2 = tf.keras.Sequential([tf.keras.layers.Embedding(100, 32), tf.keras.layers.Dense(1, activation=\"sigmoid\")])\r\ntoy_model2.compile(loss=\"binary_crossentropy\", optimizer=tf.optimizers.experimental.Adam())\r\ntoy_model2.build(input_shape=(None, 1))\r\ntoy_model2.optimizer.build(toy_model2.trainable_variables) # type: ignore\r\ntoy_model2.load_weights(weights_path)\r\n```\r\n\r\nCrashes with an error message of,\r\n\r\n```\r\n raise e.with_traceback(filtered_tb) from None\r\n File \"/Users/pa-loaner/Snapchat/Dev/.venvs/bento/lib/python3.9/site-packages/tensorflow/python/training/saving/saveable_object_util.py\", line 133, in restore\r\n raise ValueError(\r\nValueError: Received incompatible tensor with shape (50, 32) when attempting to restore variable with shape (100, 32) and name optimizer/_momentums/0/.ATTRIBUTES/VARIABLE_VALUE.\r\n```\r\n\r\nThe issue is optimizer variables are not saved properly when partitioning is used. You can load model without optimizer, but if you try to reload model and optimizer (to continue training) it crashes. This bug is specific to new optimizer api and older optimizer api does not crash and handles optimizer variable partitioning as needed.\r\n", "Thanks! I've reproduced this now -- indeed the optimizer variables are saved in sharded form and probably shouldn't be. I'll look into this.\r\n\r\nFYI, loading does work when the last lines are placed under a ParameterServerStrategy scope, i.e.:\r\n```python\r\nwith strategy.scope():\r\n toy_model2 = tf.keras.Sequential([tf.keras.layers.Embedding(100, 32), tf.keras.layers.Dense(1, activation=\"sigmoid\")])\r\n toy_model2.compile(loss=\"binary_crossentropy\", optimizer=tf.optimizers.experimental.Adam())\r\n toy_model2.build(input_shape=(None, 1))\r\n toy_model2.optimizer.build(toy_model2.trainable_variables) # type: ignore\r\n toy_model2.load_weights(weights_path)\r\n```\r\nregardless of the sharding used by the strategy. So if you are planning on restoring to continue training with PSStrategy, it should work as long as you load within scope like this. Else, report back here. ", "This script has 1 dependency (pip install portpicker) besides tf, but is self contained ps example.\r\n\r\n```python\r\nfrom typing import Any, Mapping\r\n\r\nimport json\r\nimport os\r\nimport tempfile\r\nfrom multiprocessing import Process\r\n\r\nimport tensorflow as tf\r\n\r\nfrom portpicker import pick_unused_port\r\n\r\n__spec__ = None\r\n\r\n\r\ndef create_tf_configs(worker_count: int, ps_count: int):\r\n \"\"\"Create TF_CONFIGs for a cluster.\"\"\"\r\n cluster_dict: dict[str, list[str]] = {}\r\n if worker_count:\r\n cluster_dict[\"worker\"] = [f\"localhost:{pick_unused_port()}\" for _ in range(worker_count)]\r\n if ps_count:\r\n cluster_dict[\"ps\"] = [f\"localhost:{pick_unused_port()}\" for _ in range(ps_count)]\r\n\r\n cluster_dict[\"chief\"] = [f\"localhost:{pick_unused_port()}\"]\r\n\r\n tf_configs = []\r\n for i in range(worker_count):\r\n tf_configs.append({\"cluster\": cluster_dict, \"task\": {\"type\": \"worker\", \"index\": i}})\r\n\r\n for i in range(ps_count):\r\n tf_configs.append({\"cluster\": cluster_dict, \"task\": {\"type\": \"ps\", \"index\": i}})\r\n\r\n tf_configs.append({\"cluster\": cluster_dict, \"task\": {\"type\": \"chief\", \"index\": 0}})\r\n\r\n return tf_configs\r\n\r\n\r\ndef _create_process(tf_config: Mapping[str, Any]):\r\n name = tf_config[\"task\"][\"type\"] + \"_\" + str(tf_config[\"task\"][\"index\"])\r\n\r\n print(f\"Starting {name} process...\")\r\n os.environ[\"TF_CONFIG\"] = json.dumps(tf_config)\r\n p = Process(target=run)\r\n p.start()\r\n\r\n\r\ndef run():\r\n resolver = tf.distribute.cluster_resolver.TFConfigClusterResolver()\r\n\r\n task_type = resolver.task_type\r\n if task_type in (\"worker\", \"ps\"):\r\n print(\"Starting server...\")\r\n server = tf.distribute.Server(\r\n resolver.cluster_spec(),\r\n job_name=resolver.task_type,\r\n task_index=resolver.task_id,\r\n protocol=resolver.rpc_layer,\r\n start=True,\r\n )\r\n server.join()\r\n\r\n partitioner = tf.distribute.experimental.partitioners.MaxSizePartitioner(max_shard_bytes=100 * 16 * 4)\r\n strategy = tf.distribute.experimental.ParameterServerStrategy(\r\n cluster_resolver=resolver, variable_partitioner=partitioner\r\n )\r\n\r\n print(\"Building model...\")\r\n with strategy.scope():\r\n toy_model = tf.keras.Sequential(\r\n [tf.keras.layers.Embedding(100, 32), tf.keras.layers.Dense(1, activation=\"sigmoid\")]\r\n )\r\n toy_model.compile(loss=\"binary_crossentropy\", optimizer=tf.optimizers.experimental.Adam())\r\n toy_model.build(input_shape=(None, 1))\r\n toy_model.optimizer.build(toy_model.trainable_variables) # type: ignore\r\n\r\n print(\"Saving weights...\")\r\n temp_dir = tempfile.gettempdir()\r\n weights_path = os.path.join(temp_dir, \"model_weights\")\r\n toy_model.save_weights(weights_path)\r\n\r\n # No partitioner used for second ps strategy.\r\n strategy2 = tf.distribute.experimental.ParameterServerStrategy(cluster_resolver=resolver)\r\n with strategy2.scope():\r\n toy_model2 = tf.keras.Sequential(\r\n [tf.keras.layers.Embedding(100, 32), tf.keras.layers.Dense(1, activation=\"sigmoid\")]\r\n )\r\n toy_model2.compile(loss=\"binary_crossentropy\", optimizer=tf.optimizers.experimental.Adam())\r\n toy_model2.build(input_shape=(None, 1))\r\n toy_model2.optimizer.build(toy_model2.trainable_variables) # type: ignore\r\n print(\"Loading weights...\")\r\n toy_model2.load_weights(weights_path).assert_consumed()\r\n\r\n print(\"Done!\")\r\n\r\n\r\ndef main():\r\n tf_configs = create_tf_configs(2, 1)\r\n chief_config = tf_configs[-1]\r\n for tf_config in tf_configs[:-1]:\r\n _create_process(tf_config)\r\n\r\n os.environ[\"TF_CONFIG\"] = json.dumps(chief_config)\r\n run()\r\n\r\n\r\nif __name__ == \"__main__\":\r\n main()\r\n```\r\n\r\nThis script also fails and uses ps strategy for both original model and reloading. It does change partitioner which would be nice to do. Typical usage we have is train model on cluster for base model and then incrementally train it later (daily) on different clusters. It was common for number of partitions to change which also causes reloading to fail.\r\n\r\nI think right now for model to be reloaded even in PS it requires partitioning to stay same. If you change the number of parameter servers/partitioning then it mismatches.\r\n\r\nI do have workarounds for this, but they're complex and would be nice to save optimizer variables unpartitioned and support reloading them. My current workaround is I read checkpoint, rewrite optimizer variables in checkpoint with new target partitioning, and save it back. This relies on couple heuristics/examining checkpoint metadata to even find optimizer variables (including heuristic of if name looks like legacy optimizer skip it)", "Thanks for this script -- I'll have to dig in, there must be some other discrepancy with the test I'm using. I reload optimizer variables as well and the checkpoint reading works and re-partitions appropriately. The root cause is likely whatever is causing the checkpoint to contain variables in sharded form, and if we fix that the rest of the workflow will work as intended, so I'll start there.", "I just submitted https://github.com/keras-team/tf-keras/pull/703 which should resolve this, please reopen if not. You would need to wait for the next nightly release, or build from source, to test. Thanks for the report!", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62215\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62215\">No</a>\n", "Thank you very much. I've confirmed the pr does fix my issue and tested it on some more cases where it behaved well." ]
2023-10-24T23:38:46
2023-12-20T04:14:32
2023-12-12T21:46:52
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14 ### Custom code No ### OS platform and distribution Mac/Linux ### Mobile device _No response_ ### Python version 3.9 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? For tf.optimizers.experimental vs tf.optimizers.legacy, the former saves variables in checkpoint partitioned while latter does not. Model variables are saved not partitioned. This leads to save_weights/load_weights incompatibility when changing partition count. For example if you train model with 10 parameter servers using partitioner, save weights, and then load it outside PS with no partitioning the model fails to load. There is even a test case focused on supporting saving -> loading model with different partitioning [here](https://github.com/tensorflow/tensorflow/blob/4dacf3f368eb7965e9b5c3bbdd5193986081c3b2/tensorflow/python/training/saver_test.py#L1070). I would not expect tf.optimizers.experimental.Optimizer variables to require partitioning to match while model variables/legacy optimizer do not. I tried to use tf-nightly but it uses keras-nightly which is already keras 3 and has various breaking changes. model.save_weights does not supports non h5 format currently with nightly nor did tf.train.Checkpoint(model=model).write() work with the example code. When you print checkpoint weights you can see model variable shapes are [100, 32], but optimizer variable shapes are [50, 32], [50, 32]. I've simplified code to make partitioned variables directly, but in realistic example they would be made by PS strategy. ### Standalone code to reproduce the issue ```shell import tensorflow as tf from tensorflow.python.distribute.sharded_variable import ShardedVariable from typing import Any import tempfile import os # More realistic example this would be done by Parameter Server Strategy. def shard_variables_creator(partitioner) -> Any: def _creator(next_creator, **kwargs): var = next_creator(**kwargs) if var.shape.rank == 0: return var num_shards = partitioner(var.shape, var.dtype, axis=0) if num_shards[0] == 1: return var shard_count = num_shards[0] shards = [] start = 0 for index in range(shard_count): shard_name = var.name.removesuffix(":0") + f"/part_{index}" size = var.shape[0] // shard_count + (1 if var.shape[0] % shard_count > index else 0) shards.append(tf.Variable(var[start:start+size], name=shard_name)) start += size return ShardedVariable(shards) return _creator partitioner = tf.distribute.experimental.partitioners.MaxSizePartitioner(max_shard_bytes=100*16*4) with tf.variable_creator_scope(shard_variables_creator(partitioner)): toy_model = tf.keras.Sequential([tf.keras.layers.Embedding(100, 32), tf.keras.layers.Dense(1, activation="sigmoid")]) toy_model.compile(loss="binary_crossentropy", optimizer=tf.optimizers.experimental.Adam()) toy_model.build(input_shape=(None, 1)) toy_model.optimizer.build(toy_model.trainable_variables) # type: ignore temp_dir = tempfile.gettempdir() weights_path = os.path.join(temp_dir, "model_weights") toy_model.save_weights(weights_path) reader = tf.train.load_checkpoint(weights_path) print(reader.get_variable_to_shape_map()) ``` ### Relevant log output ```shell {'optimizer/_velocities/3/.ATTRIBUTES/VARIABLE_VALUE': [1], 'optimizer/_velocities/2/.ATTRIBUTES/VARIABLE_VALUE': [32, 1], 'optimizer/_velocities/1/.ATTRIBUTES/VARIABLE_VALUE': [50, 32], 'optimizer/_momentums/3/.ATTRIBUTES/VARIABLE_VALUE': [1], 'optimizer/_learning_rate/.ATTRIBUTES/VARIABLE_VALUE': [], 'layer_with_weights-1/kernel/.ATTRIBUTES/VARIABLE_VALUE': [32, 1], 'layer_with_weights-1/bias/.ATTRIBUTES/VARIABLE_VALUE': [1], 'optimizer/_momentums/1/.ATTRIBUTES/VARIABLE_VALUE': [50, 32], 'layer_with_weights-0/embeddings/.ATTRIBUTES/VARIABLE_VALUE': [100, 32], 'optimizer/_velocities/0/.ATTRIBUTES/VARIABLE_VALUE': [50, 32], 'optimizer/_momentums/2/.ATTRIBUTES/VARIABLE_VALUE': [32, 1], '_CHECKPOINTABLE_OBJECT_GRAPH': [], 'optimizer/_momentums/0/.ATTRIBUTES/VARIABLE_VALUE': [50, 32], 'optimizer/_iterations/.ATTRIBUTES/VARIABLE_VALUE': []} ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62215/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62215/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62214
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62214/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62214/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62214/events
https://github.com/tensorflow/tensorflow/issues/62214
1,959,663,022
I_kwDOArmXAs50zhWu
62,214
Get XNNPACK Profiling Info in TfLite Example
{ "login": "FabianSchuetze", "id": 10357496, "node_id": "MDQ6VXNlcjEwMzU3NDk2", "avatar_url": "https://avatars.githubusercontent.com/u/10357496?v=4", "gravatar_id": "", "url": "https://api.github.com/users/FabianSchuetze", "html_url": "https://github.com/FabianSchuetze", "followers_url": "https://api.github.com/users/FabianSchuetze/followers", "following_url": "https://api.github.com/users/FabianSchuetze/following{/other_user}", "gists_url": "https://api.github.com/users/FabianSchuetze/gists{/gist_id}", "starred_url": "https://api.github.com/users/FabianSchuetze/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/FabianSchuetze/subscriptions", "organizations_url": "https://api.github.com/users/FabianSchuetze/orgs", "repos_url": "https://api.github.com/users/FabianSchuetze/repos", "events_url": "https://api.github.com/users/FabianSchuetze/events{/privacy}", "received_events_url": "https://api.github.com/users/FabianSchuetze/received_events", "type": "User", "site_admin": false }
[ { "id": 390482148, "node_id": "MDU6TGFiZWwzOTA0ODIxNDg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/awaiting%20review", "name": "awaiting review", "color": "bc3869", "default": false, "description": "Pull request awaiting review" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 750616506, "node_id": "MDU6TGFiZWw3NTA2MTY1MDY=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:lite", "name": "comp:lite", "color": "0052cc", "default": false, "description": "TF Lite related issues" }, { "id": 2689451671, "node_id": "MDU6TGFiZWwyNjg5NDUxNjcx", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:lite-examples", "name": "comp:lite-examples", "color": "06C2A1", "default": false, "description": "TensorFlow Lite Examples" }, { "id": 2726299159, "node_id": "MDU6TGFiZWwyNzI2Mjk5MTU5", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:lite-xnnpack", "name": "comp:lite-xnnpack", "color": "97F7B2", "default": false, "description": "TensorFlow Lite XNNPack related issues" } ]
open
false
{ "login": "pkgoogle", "id": 132095473, "node_id": "U_kgDOB9-d8Q", "avatar_url": "https://avatars.githubusercontent.com/u/132095473?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pkgoogle", "html_url": "https://github.com/pkgoogle", "followers_url": "https://api.github.com/users/pkgoogle/followers", "following_url": "https://api.github.com/users/pkgoogle/following{/other_user}", "gists_url": "https://api.github.com/users/pkgoogle/gists{/gist_id}", "starred_url": "https://api.github.com/users/pkgoogle/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pkgoogle/subscriptions", "organizations_url": "https://api.github.com/users/pkgoogle/orgs", "repos_url": "https://api.github.com/users/pkgoogle/repos", "events_url": "https://api.github.com/users/pkgoogle/events{/privacy}", "received_events_url": "https://api.github.com/users/pkgoogle/received_events", "type": "User", "site_admin": false }
[ { "login": "pkgoogle", "id": 132095473, "node_id": "U_kgDOB9-d8Q", "avatar_url": "https://avatars.githubusercontent.com/u/132095473?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pkgoogle", "html_url": "https://github.com/pkgoogle", "followers_url": "https://api.github.com/users/pkgoogle/followers", "following_url": "https://api.github.com/users/pkgoogle/following{/other_user}", "gists_url": "https://api.github.com/users/pkgoogle/gists{/gist_id}", "starred_url": "https://api.github.com/users/pkgoogle/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pkgoogle/subscriptions", "organizations_url": "https://api.github.com/users/pkgoogle/orgs", "repos_url": "https://api.github.com/users/pkgoogle/repos", "events_url": "https://api.github.com/users/pkgoogle/events{/privacy}", "received_events_url": "https://api.github.com/users/pkgoogle/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @FabianSchuetze \r\n\r\nAs per the [documentation](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/examples/label_image), to use XNNPACK delegate we have to set flag `-x 1`. Have you tried this flag along with profiling and see if XNNPACK profiling information is visible?\r\n\r\nThanks.", "Thanks, @pjpratik for your reply. \r\n\r\nYes, I have and I still get the same result. \r\n\r\nInterestingly, I can get very good profiling information for xnnpack for the benchmarking app. ", "Hi @FabianSchuetze, It does not seem that the flag is getting passed down to the delegate, but you're saying that you are getting good profiling information on the benchmarking app? (I'm assuming you meant benchmark_model??) can you give me the exact commands you are using there so that I can see how it passes down the flag in that instance. Thanks for your help.", "I have a fix for this. I will update once the fix is merged.", "Thanks a lot, @pkgoogle and please apologize for the delayed response. ", "Hi @FabianSchuetze, the fix is comitted: 535fd94, can you rerun your test on master or nightly and let us know if your issue is resolved? Thanks.", "Thanks for working on this, @pkgoogle . \r\n\r\nIt almost resolved the issue. There is no entry for \r\n```\r\nERROR: failed to get XNNPACK profile information.\r\nERROR: failed to get XNNPACK profile information.\r\nERROR: failed to get XNNPACK profile information.\r\nERROR: failed to get XNNPACK profile information.\r\nERROR: failed to get XNNPACK profile information.\r\nERROR: failed to get XNNPACK profile information.\r\n```\r\nWhich is great.\r\n\r\nHowever, there is still no profiling active. \r\n\r\nWith the build command in the [docs](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/examples/label_image/README.md), the `NoopProfiler` is enabled in the [example](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/examples/label_image/label_image.cc#L266). \r\n```\r\n auto profiler = std::make_unique<profiling::Profiler>(\r\n settings->max_profiling_buffer_entries);\r\n interpreter->SetProfiler(profiler.get());\r\n```\r\nTo get informative profiling output, I had to circumvent the `ifdefs` in [profiler.h](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/profiling/profiler.h)\r\n```\r\n// TODO(b/131688504): Remove this and use runtime flags for profiler selection.\r\n#ifdef TFLITE_PROFILING_ENABLED\r\nusing Profiler = BufferedProfiler;\r\n#else\r\nusing Profiler = NoopProfiler;\r\n#endif // TFLITE_PROFILING_ENABLED\r\n```\r\nI say \"circumvent\", because I set the ifdef myself in the code as I didn't know how to pass that flag with a Bazel build invocation. \r\n\r\n(Strictly speaking, the issue is closed, however. The missing profile information applies to all delegates not to xnnpack anymore.)", "Hi @FabianSchuetze, thanks for the feedback, just FYI you can build it with -DTFLITE_PROFILING_ENABLED, to turn the def on ... I'll work on completing the original intent of that API though." ]
2023-10-24T16:39:45
2023-11-10T18:24:40
null
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version master branch ### Custom code No ### OS platform and distribution Ubuntu 222.04 ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? When I run the example label_image in tensorflow lite with profiling enabled (see [here](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/examples/label_image) for the set-up) I get the following output: ``` ERROR: failed to get XNNPACK profile information. ERROR: failed to get XNNPACK profile information. ERROR: failed to get XNNPACK profile information. ERROR: failed to get XNNPACK profile information. ERROR: failed to get XNNPACK profile information. ERROR: failed to get XNNPACK profile information. INFO: invoked INFO: average time: 22.357 ms INFO: 23.639, Subgraph 0, Node 0, OpCode 3, CONV_2D INFO: 0.002, Subgraph 0, Node 29, OpCode 43, SQUEEZE INFO: 22.513, Subgraph 0, Node 0, OpCode 3, CONV_2D INFO: 0.001, Subgraph 0, Node 29, OpCode 43, SQUEEZE INFO: 22.354, Subgraph 0, Node 0, OpCode 3, CONV_2D INFO: 0.001, Subgraph 0, Node 29, OpCode 43, SQUEEZE ``` I would like to get profiling info from XNNPACK. I see that the reason is because the program bails out in [xnn_get_runtime_profiling_info](https://github.com/google/XNNPACK/blob/master/src/runtime.c#L742) because the profiling flags is set to false. The stack trace is: ``` #0 tflite::xnnpack::(anonymous namespace)::Subgraph::AddEventsToProfiler ( profiler=0x5555563f54a0, runtime=0x55555631fc90) at tensorflow/lite/delegates/xnnpack/xnnpack_delegate.cc:1051 #1 0x0000555555b284c1 in tflite::xnnpack::(anonymous namespace)::Subgraph::Invoke ( this=0x5555563da950, context=0x55555632bd08) at tensorflow/lite/delegates/xnnpack/xnnpack_delegate.cc:1037 #2 0x0000555555b3a618 in tflite::xnnpack::(anonymous namespace)::SubgraphInvoke ( context=0x55555632bd08, node=0x5555563325e0) at tensorflow/lite/delegates/xnnpack/xnnpack_delegate.cc:6192 #3 0x0000555555a5f3f5 in tflite::Subgraph::OpInvoke (this=0x55555632bce0, op_reg=..., node=0x5555563325e0) at tensorflow/lite/core/subgraph.cc:1288 #4 0x0000555555a6046c in tflite::Subgraph::InvokeImpl (this=0x55555632bce0) at tensorflow/lite/core/subgraph.cc:1601 #5 0x0000555555a5feea in tflite::Subgraph::Invoke (this=0x55555632bce0) at tensorflow/lite/core/subgraph.cc:1494 #6 0x0000555555a2e124 in tflite::impl::Interpreter::Invoke (this=0x55555631d230) at tensorflow/lite/core/interpreter.cc:237 #7 0x000055555557393a in tflite::label_image::RunInference (settings=0x7fffffffd8f0, delegate_providers=...) at tensorflow/lite/examples/label_image/label_image.cc:335 #8 0x0000555555574dca in tflite::label_image::Main (argc=11, argv=0x7fffffffdad8) at tensorflow/lite/examples/label_image/label_image.cc:558 #9 0x0000555555574e68 in main (argc=11, argv=0x7fffffffdad8) at tensorflow/lite/examples/label_image/label_image.cc:566 ``` I would like to set the flags to enable profiling, but I am not sure how. Can somebody kindly explain me how to set the flag? ### Standalone code to reproduce the issue ```shell See here: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/examples/label_image#build-the-example ``` ### Relevant log output ```shell ERROR: failed to get XNNPACK profile information. ERROR: failed to get XNNPACK profile information. ERROR: failed to get XNNPACK profile information. ERROR: failed to get XNNPACK profile information. ERROR: failed to get XNNPACK profile information. ERROR: failed to get XNNPACK profile information. ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62214/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62214/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62213
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62213/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62213/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62213/events
https://github.com/tensorflow/tensorflow/pull/62213
1,959,633,195
PR_kwDOArmXAs5dqSyR
62,213
[BugFix] : Update padding computation for TFL->TOSA for transpose_conv.
{ "login": "sahas3", "id": 5185083, "node_id": "MDQ6VXNlcjUxODUwODM=", "avatar_url": "https://avatars.githubusercontent.com/u/5185083?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sahas3", "html_url": "https://github.com/sahas3", "followers_url": "https://api.github.com/users/sahas3/followers", "following_url": "https://api.github.com/users/sahas3/following{/other_user}", "gists_url": "https://api.github.com/users/sahas3/gists{/gist_id}", "starred_url": "https://api.github.com/users/sahas3/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sahas3/subscriptions", "organizations_url": "https://api.github.com/users/sahas3/orgs", "repos_url": "https://api.github.com/users/sahas3/repos", "events_url": "https://api.github.com/users/sahas3/events{/privacy}", "received_events_url": "https://api.github.com/users/sahas3/received_events", "type": "User", "site_admin": false }
[ { "id": 390482148, "node_id": "MDU6TGFiZWwzOTA0ODIxNDg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/awaiting%20review", "name": "awaiting review", "color": "bc3869", "default": false, "description": "Pull request awaiting review" }, { "id": 1169364458, "node_id": "MDU6TGFiZWwxMTY5MzY0NDU4", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/size:S", "name": "size:S", "color": "adafea", "default": false, "description": "CL Change Size: Small" } ]
open
false
{ "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false }
[ { "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false } ]
null
[ "Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).\n\nView this [failed invocation](https://github.com/tensorflow/tensorflow/pull/62213/checks?check_run_id=18009633539) of the CLA check for more information.\n\nFor the most up to date status, view the checks section at the bottom of the pull request.", "Hi @rsuderman, Can you please review this PR ? Thank you!", "Hi @jpienaar, Can you please review this PR ? Thank you!", "Hi @jpienaar, Can you please review this PR ? Thank you!", "Hi @jpienaar, Can you please review this PR ? Thank you!", "Hi @NatashaKnk, Can you please review this PR ? Thank you!", "Hi @NatashaKnk, Can you please review this PR ? Thank you!" ]
2023-10-24T16:23:07
2024-06-07T16:31:17
null
NONE
null
false
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/pulls/62213", "html_url": "https://github.com/tensorflow/tensorflow/pull/62213", "diff_url": "https://github.com/tensorflow/tensorflow/pull/62213.diff", "patch_url": "https://github.com/tensorflow/tensorflow/pull/62213.patch", "merged_at": null }
This change fixes the padding computation for translating `tfl.transpose_conv` to `tosa.transpose_conv2d` as per the padding definition change for the padding attribute in TOSA spec in https://git.mlplatform.org/tosa/specification.git/commit/?id=eda7b126d3914e9461cf014439b3571b9e6a9c41 For more info, please refer to the discussion in https://github.com/llvm/llvm-project/pull/68167
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62213/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62213/timeline
null
null
true
https://api.github.com/repos/tensorflow/tensorflow/issues/62212
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62212/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62212/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62212/events
https://github.com/tensorflow/tensorflow/issues/62212
1,959,479,034
I_kwDOArmXAs50y0b6
62,212
Different behaviors of raw_ops.Sigmoid can be observed when jitcompiled=true.
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
open
false
{ "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false }
[ { "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi **@zoux1a** ,\r\n\r\nI have replicated the reported behaviour with colab using TF v2.14, 2.15, and TF-nightly. Please find the [gist](https://colab.research.google.com/gist/Venkat6871/b35628ec856171b2cede047c4df29001/62212_gpu_2-14-2-15-nightly.ipynb) here for reference.\r\n\r\nThank you!", "Hi @zoux1a ,\r\n\r\nThe assertion is failing because here the inputs are complex dtypes and Sigmoid Op is converting this to `Nans` or `0` & `1` s which is inconsistent.\r\n\r\nIf we convert input from complex to float32 then the results are same. I have taken a simple input and attached my observations in the [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/75d132e91953834bc9157daefaa1cbdc/62212_gpu_r2.ipynb#scrollTo=7scnMay_kunM).\r\n\r\nIMO, there is some inconsistency in Sigmoid Op with complex dtypes causing this behaviour. Escalating the issue to SME for their comments.\r\n\r\n\r\n\r\n", "Fix is now in Eigen: https://gitlab.com/libeigen/eigen/-/merge_requests/1431\r\n\r\nWill take a few weeks to propagate to TF.", "@zoux1a ,\r\nThe above PR which was raised in the eigen repo was merged and also tried to execute the code on tf-nightly and it was executed without any issue/error/fail. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/8e1306cba13a29a823f72c61c3e7a50c/untitled1954.ipynb). Thank you!" ]
2023-10-24T15:04:47
2024-06-12T11:08:04
null
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? In TensorFlow, enabling jitcompiled results in inconsistent behavior of raw_ops.Sigmoid. ### Standalone code to reproduce the issue ```shell I can reproduce this issue on colab: https://colab.research.google.com/drive/16gZRKnhRtqUBJiUQEobXCrjt3B4-w8hS?usp=sharing ``` ### Relevant log output ```shell InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float32), atol = tf.Tensor(0.001, shape=(), dtype=float32)' b'x (shape=(10, 9) dtype=complex64) = ' (nan+nanj), (1+0j), (nan+nanj), ... b'y (shape=(10, 9) dtype=complex64) = ' (1+0j), (-0-0j), (1+0j), ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62212/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62212/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62211
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62211/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62211/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62211/events
https://github.com/tensorflow/tensorflow/issues/62211
1,959,453,075
I_kwDOArmXAs50yuGT
62,211
Different behaviors of raw_ops.Expm1 can be observed when jitcompiled=true.
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "@sachinprasadhs,\r\nI was able to reproduce the issue on tensorflow v2.14 and tf-nightly. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/a7a8aa205d7c0d5e8acd3ff09a96bbda/untitled1416.ipynb).", "I did not observe any inconsistencies when `jit_compile = True` and `jit_compile = False`. \r\nIt is failing in both the cases and resulting similar outputs.\r\nAttaching the Gist [here](https://colab.sandbox.google.com/gist/sachinprasadhs/4170aec49c6cfb4fc1d67fd5dabd5fd2/raw_ops-expm1.ipynb) for reference. ", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62211\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62211\">No</a>\n" ]
2023-10-24T14:53:50
2023-11-29T01:49:31
2023-11-29T01:49:16
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? In TensorFlow, enabling jitcompiled results in inconsistent behavior of raw_ops.Expm1. ### Standalone code to reproduce the issue ```shell https://colab.research.google.com/drive/1k9OjhFTmZNsj94JJ0lmJ-iiBL29-au00?usp=sharing ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 42, in <module> tf.debugging.assert_near(no_op_res, op_res, atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 9, 8) dtype=complex128) = ' (-1+0j), (-1+0j), (nan+infj), ... b'y (shape=(10, 9, 8) dtype=complex128) = ' (-1+0j), (-1+0j), (inf+infj), ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62211/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62211/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62210
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62210/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62210/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62210/events
https://github.com/tensorflow/tensorflow/issues/62210
1,959,165,128
I_kwDOArmXAs50xnzI
62,210
Missing `'tensorflow.python.training.tracking'` in version 2.14.0; cannot load pickled model
{ "login": "dpiras", "id": 25639122, "node_id": "MDQ6VXNlcjI1NjM5MTIy", "avatar_url": "https://avatars.githubusercontent.com/u/25639122?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dpiras", "html_url": "https://github.com/dpiras", "followers_url": "https://api.github.com/users/dpiras/followers", "following_url": "https://api.github.com/users/dpiras/following{/other_user}", "gists_url": "https://api.github.com/users/dpiras/gists{/gist_id}", "starred_url": "https://api.github.com/users/dpiras/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dpiras/subscriptions", "organizations_url": "https://api.github.com/users/dpiras/orgs", "repos_url": "https://api.github.com/users/dpiras/repos", "events_url": "https://api.github.com/users/dpiras/events{/privacy}", "received_events_url": "https://api.github.com/users/dpiras/received_events", "type": "User", "site_admin": false }
[ { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 473184161, "node_id": "MDU6TGFiZWw0NzMxODQxNjE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:support", "name": "type:support", "color": "159b2e", "default": false, "description": "Support issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @dpiras ,\r\n\r\nCould you please confirm whether the pickled model is of Tf2.14V. It seems there is shuffle in the module causing this error. \r\n\r\nThe changes may happens in versions we need to change the imports accordingly.Also Tensorflow has its own APIs for serialization and deserialization.It is recommended to save the model in the official formats like `.keras` or `.tf` . \r\n", "@SuryanarayanaY many thanks for looking into this! \r\n\r\nThe pickled model was created with a different version of TF, so below 2.14.0 (probably around 2.10). We never had a problem so far, though, even if using TF version 2.13.\r\n\r\nWe will definitely use the TF APIs for serialisation and deserialisation in the future, thank you for pointing them out!", "@dpiras ,\r\n\r\nAFAIK, Tensorflow will not recommend Pickle for serialization/deserialization and this package is not in requirement packages we won't provide official support for this and won't recommend users to use it. Thanks!", "@SuryanarayanaY thanks. So you are saying that the missing `tensorflow.python.training.tracking` module is not planned to be restored in TF 2.14.0 and beyond?", "@dpiras , I mean the tracking module not exists in the path `tensorflow.python.training.tracking` . The module seems exists at [tensorflow.python.trackable](https://github.com/tensorflow/tensorflow/tree/r2.14/tensorflow/python/trackable).", "@SuryanarayanaY ah, I see - thank you. I guess we can close this issue then, and in our package we will either use `< 2.14.0` or make sure we employ the TF serialisation tools available rather than `pickle`. Cheers!", "@dpiras ,Thanks for confirmation. \r\n\r\nClosing the issue as per user confirmation.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62210\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62210\">No</a>\n" ]
2023-10-24T12:38:58
2023-11-09T16:01:20
2023-11-09T16:01:17
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? Yes ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Google Colab ### Mobile device _No response_ ### Python version 3.10 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version N/A ### GPU model and memory _No response_ ### Current behavior? We used to load some pickled TF models using: ``` import pickle pickle.load(open("/content/cosmopower/cosmopower/trained_models/CP_paper/CMB/cmb_TT_NN.pkl", 'rb')) ``` but as of version 2.14.0 we get: ``` --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) [<ipython-input-3-776b938106f2>](https://localhost:8080/#) in <cell line: 1>() ----> 1 pickle.load(open("/content/cosmopower/cosmopower/trained_models/CP_paper/CMB/cmb_TT_NN.pkl", 'rb')) ModuleNotFoundError: No module named 'tensorflow.python.training.tracking' ``` We checked that there are no errors with TF `2.13.0`, and everything works as expected. The `tensorflow.python.training.tracking` module seems to have been removed since `2.14.0`, but we are unable to find it in the release notes. This error is observed on Colab as well as on other platforms and OSs. ### Standalone code to reproduce the issue ```shell ! git clone https://github.com/alessiospuriomancini/cosmopower.git # download folder with TF model # this is intended for colab; change path if necessary import pickle pickle.load(open("/content/cosmopower/cosmopower/trained_models/CP_paper/CMB/cmb_TT_NN.pkl", 'rb')) ``` ### Relevant log output ```shell --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) <ipython-input-3-776b938106f2> in <cell line: 1>() ----> 1 pickle.load(open("/content/cosmopower/cosmopower/trained_models/CP_paper/CMB/cmb_TT_NN.pkl", 'rb')) ModuleNotFoundError: No module named 'tensorflow.python.training.tracking' --------------------------------------------------------------------------- NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt. To view examples of installing some common dependencies, click the "Open Examples" button below. --------------------------------------------------------------------------- ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62210/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62210/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62209
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62209/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62209/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62209/events
https://github.com/tensorflow/tensorflow/issues/62209
1,959,152,288
I_kwDOArmXAs50xkqg
62,209
Deserialization issues with non-default dtypes
{ "login": "AlexanderLutsenko", "id": 2457934, "node_id": "MDQ6VXNlcjI0NTc5MzQ=", "avatar_url": "https://avatars.githubusercontent.com/u/2457934?v=4", "gravatar_id": "", "url": "https://api.github.com/users/AlexanderLutsenko", "html_url": "https://github.com/AlexanderLutsenko", "followers_url": "https://api.github.com/users/AlexanderLutsenko/followers", "following_url": "https://api.github.com/users/AlexanderLutsenko/following{/other_user}", "gists_url": "https://api.github.com/users/AlexanderLutsenko/gists{/gist_id}", "starred_url": "https://api.github.com/users/AlexanderLutsenko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/AlexanderLutsenko/subscriptions", "organizations_url": "https://api.github.com/users/AlexanderLutsenko/orgs", "repos_url": "https://api.github.com/users/AlexanderLutsenko/repos", "events_url": "https://api.github.com/users/AlexanderLutsenko/events{/privacy}", "received_events_url": "https://api.github.com/users/AlexanderLutsenko/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 1097545817, "node_id": "MDU6TGFiZWwxMDk3NTQ1ODE3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:apis", "name": "comp:apis", "color": "0052cc", "default": false, "description": "Highlevel API related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false }
[ { "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false } ]
null
[ "@AlexanderLutsenko Could you please try to use a different saving format as` tf.keras.models.save_model()` function.\r\nThis issue seems to be fixed in TF v2.16 or nightly. Hope this helps?\r\nThank you!``", "@sushreebarsa I tried `.h5`, `.keras` and `SavedModel` formats, no luck. \r\nYes, the problem is not present in `v2.16-nightly`, presumably because it switched to Keras 3. However, Keras 2 will still be supported as a standalone package for a while, so I figured it'd be worthwhile to report.", "@AlexanderLutsenko Yeah, thank you for raising such an issue! \r\nAs the issue has been resolved in the nightly using Keras 3, it will be fixed after the new release. Could you please move this issue to closed status as the issue doesn't replicated in Keras 3.\r\nThank you!", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62209\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62209\">No</a>\n" ]
2023-10-24T12:31:00
2023-11-06T09:32:20
2023-11-06T09:32:18
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source binary ### TensorFlow version tf v2.14.0-rc1-21-g4dacf3f368e ### Custom code Yes ### OS platform and distribution _No response_ ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? The following model cannot be deserialized: ```python x = keras.Input(batch_shape=(4, 16), dtype=tf.float16) output = 1.0 + x keras_model = keras.Model(x, output) ``` It appears as if Keras fails to recognize the `dtype` of constants and always saves them as default type (`float32`/`int32`). Setting `dtype` explicitly does not help: ```python output = tf.convert_to_tensor(1, dtype=tf.float16) + x ``` The problem persists across various non-default data types (`float16`, `float64`, `int16`, `int64`), operations (`add`, `sub`, `mul`, `pow`) and model formats (`.h5`, `SavedModel`). Oddly enough, it goes away when the arguments are swapped: ```python output = x + 1.0 # Works just fine! ``` In `v2.16-nightly`, which resolves to Keras 3, everything's alright. ### Standalone code to reproduce the issue ```shell import tensorflow as tf from tensorflow import keras x = keras.Input(batch_shape=(4, 16), dtype=tf.float16) output = tf.convert_to_tensor(1, dtype=tf.float16) + x keras_model = keras.Model(x, output) model_path = 'model.h5' keras_model.save(model_path) print('Model saved') keras_model_restored = keras.models.load_model(model_path) print('Model loaded') ``` ### Relevant log output ```shell TypeError: Exception encountered when calling layer "tf.__operators__.add" (type TFOpLambda). Input 'y' of 'AddV2' Op has type float16 that does not match type float32 of argument 'x'. Call arguments received by layer "tf.__operators__.add" (type TFOpLambda): • x=tf.Tensor(shape=(), dtype=float32) • y=tf.Tensor(shape=(4, 16), dtype=float16) • name=None ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62209/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62209/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62208
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62208/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62208/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62208/events
https://github.com/tensorflow/tensorflow/issues/62208
1,958,971,757
I_kwDOArmXAs50w4lt
62,208
//tensorflow/python/eager:forwardprop_test test fails on AARCH64
{ "login": "elfringham", "id": 10442001, "node_id": "MDQ6VXNlcjEwNDQyMDAx", "avatar_url": "https://avatars.githubusercontent.com/u/10442001?v=4", "gravatar_id": "", "url": "https://api.github.com/users/elfringham", "html_url": "https://github.com/elfringham", "followers_url": "https://api.github.com/users/elfringham/followers", "following_url": "https://api.github.com/users/elfringham/following{/other_user}", "gists_url": "https://api.github.com/users/elfringham/gists{/gist_id}", "starred_url": "https://api.github.com/users/elfringham/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/elfringham/subscriptions", "organizations_url": "https://api.github.com/users/elfringham/orgs", "repos_url": "https://api.github.com/users/elfringham/repos", "events_url": "https://api.github.com/users/elfringham/events{/privacy}", "received_events_url": "https://api.github.com/users/elfringham/received_events", "type": "User", "site_admin": false }
[ { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" } ]
closed
false
null
[]
null
[ "Issue raised on Eigen https://gitlab.com/libeigen/eigen/-/issues/2738", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62208\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62208\">No</a>\n" ]
2023-10-24T10:38:38
2023-10-24T20:28:16
2023-10-24T20:28:13
CONTRIBUTOR
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? Yes ### Source source ### TensorFlow version git HEAD ### Custom code No ### OS platform and distribution Ubuntu 20.04 ### Mobile device n/a ### Python version 3.9.17 ### Bazel version 6.1.0 ### GCC/compiler version 17.0.0 ### CUDA/cuDNN version n/a ### GPU model and memory n/a ### Current behavior? Since Eigen was updated, the unit test //tensorflow/python/eager:forwardprop_test now fails. Eigen was updated by https://github.com/tensorflow/tensorflow/commit/57e6377cf9879e33f3612f1ffd3619b6513e5296 It looks like this commit in Eigen is the problem. https://gitlab.com/libeigen/eigen/-/commit/81b48065ea673cd352d11ef9b6a3d86778ac962d This seems to only affect AARCH64 and not x86. ### Standalone code to reproduce the issue ```shell bazel test --cache_test_results=no --build_tests_only --config=mkl_aarch64_threadpool --test_env=TF_ENABLE_ONEDNN_OPTS=1 --copt=-flax-vector-conversions --test_env=TF2_BEHAVIOR=1 --test_env=PORTSERVER_ADDRESS=@unittest-portserver --test_size_filters=small,medium --test_output=errors --verbose_failures=true --test_keep_going --notest_verbose_timeout_warnings --test_tag_filters=--oss_serial,-no_oss,-oss_excluded,-v1only,-benchmark-test,-no_aarch64,-no_oss_py38,-no_oss_py39,-no_oss_py310 --jobs=75 -- //tensorflow/python/eager:forwardprop_test ``` ### Relevant log output ```shell ====================================================================== FAIL: testNumericHigherOrder (__main__.ForwardpropTest) ForwardpropTest.testNumericHigherOrder Warms up, gets object counts, runs the test, checks for new objects. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andrew/src/tf_test/tensorflow-git/bazel-ci_build-cache/.cache/bazel/_bazel_andrew/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow/bazel-out/aarch64-opt/bin/tensorflow/python/eager/forwardprop_test_cpu.runfiles/org_tensorflow/tensorflow/python/framework/test_util.py", line 713, in decorator f(self, *args, **kwargs) File "/home/andrew/src/tf_test/tensorflow-git/bazel-ci_build-cache/.cache/bazel/_bazel_andrew/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow/bazel-out/aarch64-opt/bin/tensorflow/python/eager/forwardprop_test_cpu.runfiles/org_tensorflow/tensorflow/python/eager/forwardprop_test.py", line 455, in testNumericHigherOrder _test_gradients( File "/home/andrew/src/tf_test/tensorflow-git/bazel-ci_build-cache/.cache/bazel/_bazel_andrew/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow/bazel-out/aarch64-opt/bin/tensorflow/python/eager/forwardprop_test_cpu.runfiles/org_tensorflow/tensorflow/python/eager/forwardprop_test.py", line 215, in _test_gradients _test_gradients( File "/home/andrew/src/tf_test/tensorflow-git/bazel-ci_build-cache/.cache/bazel/_bazel_andrew/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow/bazel-out/aarch64-opt/bin/tensorflow/python/eager/forwardprop_test_cpu.runfiles/org_tensorflow/tensorflow/python/eager/forwardprop_test.py", line 215, in _test_gradients _test_gradients( File "/home/andrew/src/tf_test/tensorflow-git/bazel-ci_build-cache/.cache/bazel/_bazel_andrew/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow/bazel-out/aarch64-opt/bin/tensorflow/python/eager/forwardprop_test_cpu.runfiles/org_tensorflow/tensorflow/python/eager/forwardprop_test.py", line 231, in _test_gradients testcase.assertAllClose(sym_jac_back, sym_jac_fwd, rtol=srtol, atol=satol) File "/home/andrew/src/tf_test/tensorflow-git/bazel-ci_build-cache/.cache/bazel/_bazel_andrew/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow/bazel-out/aarch64-opt/bin/tensorflow/python/eager/forwardprop_test_cpu.runfiles/org_tensorflow/tensorflow/python/framework/test_util.py", line 1657, in decorated return f(*args, **kwds) ^^^^^^^^^^^^^^^^ File "/home/andrew/src/tf_test/tensorflow-git/bazel-ci_build-cache/.cache/bazel/_bazel_andrew/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow/bazel-out/aarch64-opt/bin/tensorflow/python/eager/forwardprop_test_cpu.runfiles/org_tensorflow/tensorflow/python/framework/test_util.py", line 3293, in assertAllClose self._assertAllCloseRecursive(a, b, rtol=rtol, atol=atol, msg=msg) File "/home/andrew/src/tf_test/tensorflow-git/bazel-ci_build-cache/.cache/bazel/_bazel_andrew/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow/bazel-out/aarch64-opt/bin/tensorflow/python/eager/forwardprop_test_cpu.runfiles/org_tensorflow/tensorflow/python/framework/test_util.py", line 3229, in _assertAllCloseRecursive self._assertArrayLikeAllClose( File "/home/andrew/src/tf_test/tensorflow-git/bazel-ci_build-cache/.cache/bazel/_bazel_andrew/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow/bazel-out/aarch64-opt/bin/tensorflow/python/eager/forwardprop_test_cpu.runfiles/org_tensorflow/tensorflow/python/framework/test_util.py", line 3186, in _assertArrayLikeAllClose np.testing.assert_allclose( File "/home/andrew/src/tf_test/tensorflow-git/bazel-ci_build-cache/.cache/bazel/_bazel_andrew/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow/bazel-out/aarch64-opt/bin/tensorflow/python/eager/forwardprop_test_cpu.runfiles/pypi_numpy/site-packages/numpy/testing/_private/utils.py", line 1527, in assert_allclose assert_array_compare(compare, actual, desired, err_msg=str(err_msg), File "/home/andrew/src/tf_test/tensorflow-git/bazel-ci_build-cache/.cache/bazel/_bazel_andrew/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow/bazel-out/aarch64-opt/bin/tensorflow/python/eager/forwardprop_test_cpu.runfiles/pypi_numpy/site-packages/numpy/testing/_private/utils.py", line 844, in assert_array_compare raise AssertionError(msg) AssertionError: Not equal to tolerance rtol=1e-06, atol=1e-06 Mismatched value: a is different from b. not close where = (array([0]), array([0]), array([2])) not close lhs = [-155.46957] not close rhs = [-155.46982] not close dif = [0.00024414] not close tol = [0.00015647] dtype = float32, shape = (1, 4, 4) Mismatched elements: 1 / 16 (6.25%) Max absolute difference: 0.00024414 Max relative difference: 1.5703409e-06 x: array([[[-4755.0654 , -139.43396 , -155.46957 , 158.52019 ], [ -139.43398 , -119.946 , -26.157635, 20.20992 ], [ -155.4697 , -26.15764 , 428.02136 , -365.0485 ],... y: array([[[-4755.0654 , -139.43398 , -155.46982 , 158.52022 ], [ -139.43399 , -119.946014, -26.157648, 20.209923], [ -155.46967 , -26.157635, 428.02112 , -365.04846 ],... ---------------------------------------------------------------------- Ran 13 tests in 95.972s FAILED (failures=1) ================================================================================ ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62208/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62208/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62207
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62207/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62207/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62207/events
https://github.com/tensorflow/tensorflow/issues/62207
1,958,886,697
I_kwDOArmXAs50wj0p
62,207
Different behaviors of raw_ops.Cos + raw_ops.Asinh on jitcompiled=true.
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "@sachinprasadhs,\r\nI was able to reproduce the issue on tensorflow v2.14 and tf-nightly. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/00fa658574f245690a738f7cc36bf231/untitled.ipynb).", "I observed the failure is happening only when `jit_compile = True`, and it is under the expected `rtol` and `atol` when `jit_compile = False`.\r\nAlthough, when `jit_compile` is set to `True`, the max difference was observed near `0.002/0.003` which is smaller in number and does not show the significant impact. \r\nAttached the [Gist](https://colab.sandbox.google.com/gist/sachinprasadhs/a2f257e8639145f71854b6f81928c85b/raw_ops-cos-and-raw_ops-asinh.ipynb) here for reference. Thanks!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62207\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62207\">No</a>\n" ]
2023-10-24T09:44:43
2023-11-29T01:49:34
2023-11-29T01:49:18
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? In TensorFlow, enabling jitcompiled results in inconsistent behavior of raw_ops.Cos and raw_ops.Asinh. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.Cos(x=x, ) x = tf.raw_ops.Asinh(x=x, ) return x m = Network() inp = { "x": tf.random.uniform([10,9,8,6], -100, 100, dtype=tf.bfloat16), } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 27, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 9, 8, 6) dtype=float64) = ' -0.86328125, 0.87890625, 0.8828125, ... b'y (shape=(10, 9, 8, 6) dtype=float64) = ' -0.8671875, 0.87890625, 0.8828125, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62207/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62207/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62206
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62206/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62206/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62206/events
https://github.com/tensorflow/tensorflow/issues/62206
1,958,857,864
I_kwDOArmXAs50wcyI
62,206
Different behaviors of raw_ops.Sigmoid can be observed when jitcompiled=true.
{ "login": "zoux1a", "id": 100054206, "node_id": "U_kgDOBfa0vg", "avatar_url": "https://avatars.githubusercontent.com/u/100054206?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zoux1a", "html_url": "https://github.com/zoux1a", "followers_url": "https://api.github.com/users/zoux1a/followers", "following_url": "https://api.github.com/users/zoux1a/following{/other_user}", "gists_url": "https://api.github.com/users/zoux1a/gists{/gist_id}", "starred_url": "https://api.github.com/users/zoux1a/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zoux1a/subscriptions", "organizations_url": "https://api.github.com/users/zoux1a/orgs", "repos_url": "https://api.github.com/users/zoux1a/repos", "events_url": "https://api.github.com/users/zoux1a/events{/privacy}", "received_events_url": "https://api.github.com/users/zoux1a/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1133285679, "node_id": "MDU6TGFiZWwxMTMzMjg1Njc5", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:xla", "name": "comp:xla", "color": "0052cc", "default": false, "description": "XLA" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @zoux1a ,\r\n\r\nI have replicated the reported behaviour. With jit_compile=True the results seems not in the precision level of `rtol=0.001`. If we change `rtol=0.01` then the results are same.\r\n\r\nOne more observation the behaviour seems from `eager = False`. With eager execution it works fine with given tolerances also.\r\n\r\nPlease refer attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/3481f0de94a04b050985455924192170/62206-gpu.ipynb).", "I believe the results in eager mode and XLA-compiled mode should be consistent. Will this bug be fixed in the future?", "Hi @zoux1a , For the Sigmoid Op, `bfloat16` dtype is not supported for XLA-GPU setup as per this [source](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/tf2xla/g3doc/gpu_supported_ops.md#:~:text=int64%2Cuint32%2Cuint64%7D-,Sigmoid,-T%3D%7Bcomplex64%2Cdouble).\r\n\r\nCould you please cross check and confirm.", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62206\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62206\">No</a>\n", "Hi @GwiHwan-Go ,\r\n\r\nI have tested the code with Tf2.14v and the difference is related to precision only which happens due to XLA internal fusions and conversions and XLA uses FP32 precision by default.\r\n\r\nTo check that , I have printed the `reduce_sum` of results which are same for both which is `448` for an experiment. This indicates the results are same but only precision differences with XLA which is expected.\r\n\r\nPlease refer attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/1a600f6d0fa72d18b5e8e8de710d6642/62206_final.ipynb).\r\n\r\nThanks!" ]
2023-10-24T09:28:06
2023-12-13T16:07:03
2023-11-26T01:49:41
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory GPU 0: NVIDIA GeForce RTX 2070 GPU 1: NVIDIA GeForce RTX 2070 GPU 2: NVIDIA GeForce RTX 2070 GPU 3: NVIDIA GeForce RTX 2070 ### Current behavior? In TensorFlow, enabling jitcompiled results in inconsistent behavior of raw_ops.Sigmoid. ### Standalone code to reproduce the issue ```shell import tensorflow as tf import traceback class Network(tf.Module): def __init__(self): super().__init__() @tf.function(jit_compile=True) def __call__(self, x): x = tf.raw_ops.Sigmoid(x=x, ) return x m = Network() inp = { "x": tf.random.uniform([10,9,8], dtype=tf.bfloat16), } with tf.device('/GPU:0'): tf.config.run_functions_eagerly(True) no_op_res = m(**inp) tf.config.run_functions_eagerly(False) with tf.device('/GPU:0'): op_res = m(**inp) tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) ``` ### Relevant log output ```shell Traceback (most recent call last): File "/home/guihuan/LLM/results/tf-2/2023-10-22-20-21/test.py", line 27, in <module> tf.debugging.assert_near(tf.cast(no_op_res, tf.float64), tf.cast(op_res, tf.float64), atol=0.001, rtol=0.001) File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/guihuan/.conda/envs/night/lib/python3.9/site-packages/tensorflow/python/ops/control_flow_assert.py", line 102, in Assert raise errors.InvalidArgumentError( tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'' b'x and y not equal to tolerance rtol = tf.Tensor(0.001, shape=(), dtype=float64), atol = tf.Tensor(0.001, shape=(), dtype=float64)' b'x (shape=(10, 9, 8) dtype=float64) = ' 0.65234375, 0.5078125, 0.56640625, ... b'y (shape=(10, 9, 8) dtype=float64) = ' 0.59765625, 0.03125, 0.26953125, ... ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62206/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62206/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62205
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62205/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62205/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62205/events
https://github.com/tensorflow/tensorflow/issues/62205
1,958,754,421
I_kwDOArmXAs50wDh1
62,205
Bug/Problem when ploting the result of `tf.image.resize`. Solution is given to the problem
{ "login": "VachanVY", "id": 109357590, "node_id": "U_kgDOBoSqFg", "avatar_url": "https://avatars.githubusercontent.com/u/109357590?v=4", "gravatar_id": "", "url": "https://api.github.com/users/VachanVY", "html_url": "https://github.com/VachanVY", "followers_url": "https://api.github.com/users/VachanVY/followers", "following_url": "https://api.github.com/users/VachanVY/following{/other_user}", "gists_url": "https://api.github.com/users/VachanVY/gists{/gist_id}", "starred_url": "https://api.github.com/users/VachanVY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/VachanVY/subscriptions", "organizations_url": "https://api.github.com/users/VachanVY/orgs", "repos_url": "https://api.github.com/users/VachanVY/repos", "events_url": "https://api.github.com/users/VachanVY/events{/privacy}", "received_events_url": "https://api.github.com/users/VachanVY/received_events", "type": "User", "site_admin": false }
[ { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5508003926, "node_id": "LA_kwDOArmXAs8AAAABSE14Vg", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF%202.13", "name": "TF 2.13", "color": "B13ACB", "default": false, "description": "For issues related to Tensorflow 2.13" } ]
open
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "@VachanVY isn't that a 'problem' with pyplot?\r\nFrom what I remember, if the image is given as `uint` then it expects range 0-255. If it is given as `float`, it expects 0-1.\r\nSo resizing the image might change the output format to `float` with range 0-255, thus requiring you to divide by 255 or casting back to int to observe the correct image.", "Hi @maksym33,\r\n> So resizing the image might change the output format to `float` with range 0-255, thus requiring you to divide by 255 or casting back to int to observe the correct image.\r\n\r\nwhen given unnormalized values 0-255 as input it should output `int` values between 0-255 not decimal values between 0-255, which should be corrected", "The default method of interpolation for `tf.image.resize` is `bilinear`, so it would make sense for it to return floats, otherwise you would lose even more precision when resizing. You could try `nearest` method if you want to cast to int without losing precision.\r\nOh yeah, found this little note in the docs for resize, seems I had good instincts:\r\n![image](https://github.com/tensorflow/tensorflow/assets/39015826/3aa4a6d6-c1fc-4ec8-8059-21f632beefe7)\r\n", "> The default method of interpolation for `tf.image.resize` is `bilinear`, so it would make sense for it to return floats, otherwise you would lose even more precision when resizing. You could try `nearest` method if you want to cast to int without losing precision. Oh yeah, found this little note in the docs for resize, seems I had good instincts: ![image](https://user-images.githubusercontent.com/39015826/277671632-3aa4a6d6-c1fc-4ec8-8059-21f632beefe7.png)\r\n\r\nNever argued about that, just saying returning float values between 0-255 is of no use (if it is between 0-255 it should be int), so modifying `tf.image.resize` to return normalized tensor (0-1.) will be of use because that's the norm\r\n\r\nWhat's the norm?\r\nAns: To return int values between 0-255 ***OR*** float values between 0-1 \r\n(you shouldn't be mixing both which is happening with `tf.image.resize` which should be fixed, just divide input by 255. when input's not normalized because returning floats between 0-255 is wrong!)", "I think unexpectedly performing a rescaling operation when only trying to resize an image is even more confusing - and that is assuming that people use it only for the above two specified formats, which is not always the case.\r\n", "In Tensorflow/Deep Learning, only the above-mentioned formats are used (as per my knowledge).\r\nIf not, specify the others. Anyway, mixing things from 2 formats is not justifiable.", "I think swapping between dtypes is much more less troublesome than swapping between scales - which seem more pyplot specific. There is also the case of using colours encoded as hsv or cieLAB.", "Mostly we only use the above 2 mentioned formats (0-255 ints or 0-1 floats) for input to computer vision pipelines.\r\n\r\n> I think swapping between dtypes is much more less troublesome than swapping between scales - which seem more pyplot specific. There is also the case of using colours encoded as hsv or cieLAB.\r\n\r\nOk but you cannot mix 2 formats just because it's less troublesome or whatever...\r\nI only have to say this much (otherwise I'll be repeating), @sushreebarsa Please respond or assign the issue to someone else", "Hi, @VachanVY! Sorry for the late response!\r\nThis is a known issue which generally occurs in TensorFlow when plotting the result of tf.image.resize. As a workaround you can use the` tf.cast()` function. You can convert the image to a `uint8` array before plotting it.\r\nPlease let us know if it helps?\r\nThank you!", "@sushreebarsa How about including that casting inside `tf.image.resize` depending on the `dtype` of input? It's not only helpful for plotting but also gives the correct format for input into deep learning models.\r\n\r\nCurrent behaviour:\r\nreturns `floats` between `0-255` when given an image with `int` values `0-255` which is wrong.\r\nno problem when given floats between `0-1` as it returns `floats` between `0-1` which is a correct format unlike above.\r\n", "@VachanVY Yes, we can use casting inside `tf.image.resize `depending on the dtype of input. As an example please refer to the following;\r\n```\r\nimport tensorflow as tf\r\n\r\ndef resize_with_casting(image, size, dtype=tf.float32):\r\n \"\"\"Resizes an image to a given size, casting the input to the desired dtype.\r\n\r\n Args:\r\n image: A Tensor of shape [height, width, channels] representing the image to resize.\r\n size: A list of two ints representing the new height and width of the image.\r\n dtype: The desired dtype of the output image.\r\n\r\n Returns:\r\n A Tensor of shape [new_height, new_width, channels] representing the resized image.\r\n \"\"\"\r\n\r\n\r\n # Determine the current dtype of the input image.\r\n current_dtype = image.dtype\r\n\r\n # If the current dtype is not the desired dtype, cast the image.\r\n if current_dtype != dtype:\r\n image = tf.cast(image, dtype)\r\n\r\n # Resize the image.\r\n resized_image = tf.image.resize(image, size)\r\n\r\n # Return the resized image.\r\n return resized_image\r\n\r\n# Example usage:\r\n\r\n# Resize an image to a size of 256x256, casting the input to tf.float32.\r\nimage = tf.random.normal([512, 512, 3], dtype=tf.uint8)\r\nresized_image = resize_with_casting(image, [256, 256])\r\n\r\n# Resize an image to a size of 128x128, casting the input to tf.uint8.\r\nimage = tf.random.uniform([256, 256, 3])\r\nresized_image = resize_with_casting(image, [128, 128], dtype=tf.uint8)\r\n\r\n\r\n```\r\nThank you!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "> @VachanVY Yes, we can use casting inside `tf.image.resize `depending on the dtype of input. As an example please refer to the following;\r\n> \r\n> ```\r\n> import tensorflow as tf\r\n> \r\n> def resize_with_casting(image, size, dtype=tf.float32):\r\n> \"\"\"Resizes an image to a given size, casting the input to the desired dtype.\r\n> \r\n> Args:\r\n> image: A Tensor of shape [height, width, channels] representing the image to resize.\r\n> size: A list of two ints representing the new height and width of the image.\r\n> dtype: The desired dtype of the output image.\r\n> \r\n> Returns:\r\n> A Tensor of shape [new_height, new_width, channels] representing the resized image.\r\n> \"\"\"\r\n> \r\n> \r\n> # Determine the current dtype of the input image.\r\n> current_dtype = image.dtype\r\n> \r\n> # If the current dtype is not the desired dtype, cast the image.\r\n> if current_dtype != dtype:\r\n> image = tf.cast(image, dtype)\r\n> \r\n> # Resize the image.\r\n> resized_image = tf.image.resize(image, size)\r\n> \r\n> # Return the resized image.\r\n> return resized_image\r\n> \r\n> # Example usage:\r\n> \r\n> # Resize an image to a size of 256x256, casting the input to tf.float32.\r\n> image = tf.random.normal([512, 512, 3], dtype=tf.uint8)\r\n> resized_image = resize_with_casting(image, [256, 256])\r\n> \r\n> # Resize an image to a size of 128x128, casting the input to tf.uint8.\r\n> image = tf.random.uniform([256, 256, 3])\r\n> resized_image = resize_with_casting(image, [128, 128], dtype=tf.uint8)\r\n> ```\r\n> \r\n> Thank you!\r\n\r\nI know I can write my own function but can that be included inside `tf.image.resize` is my question", "@VachanVY As far as I know, it is not possible to include your own custom function inside tf.image.resize. As tf.image.resize is a built-in TensorFlow function that is implemented in C++ and cannot be modified.\r\n\r\nThank you!", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62205\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62205\">No</a>\n", "@VachanVY Reopening this issue as it still persists. \r\n@sachinprasadhs Could you please have a look at this.\r\nThank you!", "Hi, \r\n\r\nApologies for the delayed response, tf.image.resize does not do any other validation on the range of values to return the normalized values between 0-1, it mainly performs on the method specified as shown in the implementation below.\r\n\r\nhttps://github.com/tensorflow/tensorflow/blob/4dacf3f368eb7965e9b5c3bbdd5193986081c3b2/tensorflow/python/ops/image_ops_impl.py#L1740-L1787\r\n\r\nIn oder to change the existing implementation as per your suggestion, it may break for many users. \r\nWill escalate the issue to the team and wait for their response. " ]
2023-10-24T08:24:07
2023-12-09T02:18:18
null
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? Yes ### Source source ### TensorFlow version tf 2.13.0 ### Custom code Yes ### OS platform and distribution _No response_ ### Mobile device _No response_ ### Python version 3.10.12 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? ```python import tensorflow as tf import matplotlib.pyplot as plt image_string = tf.io.read_file("/content/_1574258b-b76a-401c-8c1d-f9cf632d7631.jpeg") tensor = tf.io.decode_jpeg(image_string, channels=3) print(tensor.shape) plt.imshow(tensor.numpy()) plt.show() ``` ![download](https://github.com/tensorflow/tensorflow/assets/109357590/091608bc-25e9-4165-b911-2787366e5eb1) ```python plt.imshow((tf.image.resize(tensor, [100, 100])).numpy()) plt.show() # NO IMAGE, THERE IS PROBLEM print(tf.image.resize(tensor, [100, 100])) ``` > WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). ![download](https://github.com/tensorflow/tensorflow/assets/109357590/0fcaa65a-88cd-46d7-ac9e-acd4ca0b9fde) ```python <tf.Tensor: shape=(100, 100, 3), dtype=float32, numpy= array([[[ 12.7644 , 18.7644 , 32.7644 ], [ 14. , 20. , 34. ], [ 14. , 20. , 34. ], ..., [ 16.619999, 25.619999, 40.62 ], [ 16.039814, 28.039814, 44.039814], [ 17.995617, 29.995617, 45.995617]], [[ 14. , 20. , 34. ], [ 15. , 21. , 35. ], [ 16. , 22. , 36. ], ..., [ 18.899963, 27.899963, 42.899963], [ 15.279907, 27.279907, 43.279907], [ 16.14 , 28.14 , 44.14 ]], [[ 14. , 22. , 35. ], [ 16.099998, 24.099998, 37.1 ], [ 16. , 22. , 36. ], ..., [ 15.619899, 31.619898, 46.6199 ], [ 15.907904, 32.9079 , 48.9079 ], [ 17.240013, 34.240013, 50.240013]], ..., [[ 26.533968, 24.533968, 35.533966], [ 25.967827, 23.967827, 34.967827], [ 33.67996 , 30.67996 , 39.67996 ], ..., [114.779915, 31.979984, 41.879948], [119.47677 , 33.44877 , 44.46277 ], [103.15075 , 21.950676, 31.050713]], [[ 27.532555, 25.532555, 36.532555], [ 27.5823 , 25.5823 , 36.5823 ], [ 23.576063, 21.576063, 32.576065], ..., [104.3003 , 30.880442, 40.020397], [100.94113 , 24.181866, 32.0615 ], [112.63941 , 38.57296 , 45.57296 ]], [[ 34.041607, 32.04161 , 43.041607], [ 20.49961 , 18.49961 , 29.49961 ], [ 24.038023, 22.038023, 33.03802 ], ..., [ 83.27584 , 32.956017, 39.75404 ], [ 95.79817 , 19.357985, 27.21803 ], [100.01961 , 31.019604, 36.019604]]], dtype=float32)> ``` ```python # SOLUTION plt.imshow(tf.cast(tf.image.resize(tensor, [100, 100]), tf.int8)) # output range [0, 255] which is a correct format plt.show() ``` ![download](https://github.com/tensorflow/tensorflow/assets/109357590/6f20296b-97dd-4fde-9f98-5d3494679517) ```python # OR (normalizing gives a better image, the below image is better than the above) plt.imshow((tf.image.resize(tensor, [100, 100])/255.).numpy()) plt.show() # BUT ON NORMALIZING WE GET THE PROPER IMAGE # OR plt.imshow((tf.image.resize(tf.cast(tensor, tf.float32)/255., [100, 100])).numpy()) plt.show() # Both give the same image ``` ![download](https://github.com/tensorflow/tensorflow/assets/109357590/94eb3abb-b7d9-4ddc-8c80-eeca0bcec3ba) The code is self-explanatory. A problem exists in `tf.mage.resize` when the input image is not normalized. * Normalizing the input image or the output of `tf.mage.resize` * converting the output (of format float32) to `int8` when the input is of `int8` will solve the problem. ### Standalone code to reproduce the issue [Colab Link](https://colab.research.google.com/drive/1y41vpFs6Cd4NHmSY6IRmU53PXgl_SAFE#scrollTo=trFnmSDqtNxz&line=1&uniqifier=1) ### Relevant log output _No response_
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62205/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62205/timeline
null
reopened
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62204
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62204/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62204/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62204/events
https://github.com/tensorflow/tensorflow/issues/62204
1,958,728,263
I_kwDOArmXAs50v9JH
62,204
Float32 precision loss causing cross_entropy loss to return incorrect results
{ "login": "cui-83", "id": 38047701, "node_id": "MDQ6VXNlcjM4MDQ3NzAx", "avatar_url": "https://avatars.githubusercontent.com/u/38047701?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cui-83", "html_url": "https://github.com/cui-83", "followers_url": "https://api.github.com/users/cui-83/followers", "following_url": "https://api.github.com/users/cui-83/following{/other_user}", "gists_url": "https://api.github.com/users/cui-83/gists{/gist_id}", "starred_url": "https://api.github.com/users/cui-83/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cui-83/subscriptions", "organizations_url": "https://api.github.com/users/cui-83/orgs", "repos_url": "https://api.github.com/users/cui-83/repos", "events_url": "https://api.github.com/users/cui-83/events{/privacy}", "received_events_url": "https://api.github.com/users/cui-83/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 3797168204, "node_id": "LA_kwDOArmXAs7iVDBM", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF%202.8", "name": "TF 2.8", "color": "5DC9D0", "default": false, "description": "" } ]
closed
false
{ "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false }
[ { "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false } ]
null
[ "@cui-83 can you try calculating the loss directly from logits? \r\nFrom what I understand this is advised to do exactly for this reason.", "@maksym33 \r\nIndeed the symmetry is preserved when using logits:\r\n```\r\n>>> K.binary_crossentropy([[0.0],[1.0]],[[9.99],[-9.99]], from_logits=True)\r\n<tf.Tensor: shape=(2, 1), dtype=float32, numpy=\r\narray([[9.990046],\r\n [9.990046]], dtype=float32)>\r\n```\r\nThat's because \r\n```\r\n if from_logits:\r\n return nn.sigmoid_cross_entropy_with_logits(labels=target, logits=output)\r\n```\r\nThe calculation without logits is still problematic nevertheless. I don't see a simple solution but replacing epsilon with a bigger value (e.g., 1e-6) help alleviate the problem a little.", "Hello, @cui-83!\r\nSorry for the late response!\r\nFloat32 precision has a limited range of re-presentable values, and when dealing with large numbers, the loss calculations can overflow or underflow, resulting in inaccurate values which are intended. Could you please try to use higher precision data types like Float64 or BFloat16 with the latest TF version for the loss calculations to avoid such issues ?\r\nThank you!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62204\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62204\">No</a>\n" ]
2023-10-24T08:06:53
2023-12-15T01:49:36
2023-12-15T01:49:31
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? Yes ### Source source ### TensorFlow version tf 2.8 ### Custom code Yes ### OS platform and distribution _No response_ ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? ``` import tensorflow.keras.backend as K K.binary_crossentropy([[0.0],[1.0]],[[1.0],[0.0]], from_logits=False) <tf.Tensor: shape=(2, 1), dtype=float32, numpy= array([[15.333239], [15.424949]], dtype=float32)> ``` In theory, crossentropy isn't symmetric but the non-trivial discrepancy between crossentropy(0,1) and crossentropy(1,0) here is caused by precision loss. Specifically, In https://github.com/tensorflow/tensorflow/blob/v2.3.0/tensorflow/python/keras/backend.py#L4825C67-L4825C67 ``` epsilon_ = _constant_to_tensor(epsilon(), output.dtype.base_dtype) output = clip_ops.clip_by_value(output, epsilon_, 1. - epsilon_) bce = target * math_ops.log(output + epsilon()) bce += (1 - target) * math_ops.log(1 - output + epsilon()) return -bce ``` The problem is, when output==1, 1 - output + epsilon() = 1 - (1. - epsilon_) + epsilon() = 2* epsilon_ the expected result should be 2e-7, but the actual result is 2.1920928e-07 due to precision loss. After taking the natural log, we get 15.333239 and 15.424949. A 0.092 difference in a single sample loss is pretty significant. ### Standalone code to reproduce the issue ```shell import tensorflow.keras.backend as K K.binary_crossentropy([[0.0],[1.0]],[[1.0],[0.0]], from_logits=False) ``` ### Relevant log output ```shell <tf.Tensor: shape=(2, 1), dtype=float32, numpy=array([[15.333239], [15.424949]], dtype=float32)> ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62204/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62204/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62203
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62203/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62203/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62203/events
https://github.com/tensorflow/tensorflow/issues/62203
1,958,471,533
I_kwDOArmXAs50u-dt
62,203
tf.random.normal() causes RAM usage to keep growing
{ "login": "Djoren", "id": 10808578, "node_id": "MDQ6VXNlcjEwODA4NTc4", "avatar_url": "https://avatars.githubusercontent.com/u/10808578?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Djoren", "html_url": "https://github.com/Djoren", "followers_url": "https://api.github.com/users/Djoren/followers", "following_url": "https://api.github.com/users/Djoren/following{/other_user}", "gists_url": "https://api.github.com/users/Djoren/gists{/gist_id}", "starred_url": "https://api.github.com/users/Djoren/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Djoren/subscriptions", "organizations_url": "https://api.github.com/users/Djoren/orgs", "repos_url": "https://api.github.com/users/Djoren/repos", "events_url": "https://api.github.com/users/Djoren/events{/privacy}", "received_events_url": "https://api.github.com/users/Djoren/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5508003926, "node_id": "LA_kwDOArmXAs8AAAABSE14Vg", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF%202.13", "name": "TF 2.13", "color": "B13ACB", "default": false, "description": "For issues related to Tensorflow 2.13" } ]
open
false
{ "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false }
[ { "login": "tilakrayal", "id": 81610181, "node_id": "MDQ6VXNlcjgxNjEwMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/81610181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tilakrayal", "html_url": "https://github.com/tilakrayal", "followers_url": "https://api.github.com/users/tilakrayal/followers", "following_url": "https://api.github.com/users/tilakrayal/following{/other_user}", "gists_url": "https://api.github.com/users/tilakrayal/gists{/gist_id}", "starred_url": "https://api.github.com/users/tilakrayal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tilakrayal/subscriptions", "organizations_url": "https://api.github.com/users/tilakrayal/orgs", "repos_url": "https://api.github.com/users/tilakrayal/repos", "events_url": "https://api.github.com/users/tilakrayal/events{/privacy}", "received_events_url": "https://api.github.com/users/tilakrayal/received_events", "type": "User", "site_admin": false } ]
null
[ "Try `K.clear_session()` to delete unused graph parts. It might also be that the garbage collector will kick in further along the line,", "@Djoren,\r\nI tried to execute the above mentioned code on tensorflow v2.14 & it was executed without any error and also observed that the RAM usage is also not growing as mentioned. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/eb3041a339486bf8b950c50a34e6cc00/untitled1423.ipynb). Thank you!", "@tilakrayal I am getting the problem with python 3.11, but not 3.10 (which is the version in your gist).", "@Djoren,\r\nI tried to execute the mentioned code on the Linux environment with Tensorflow 2.16.1 and python 3.11 and couldn't find the memory leakage with the tf.random.normal(). Kindly find the screenshot for the reference.\r\n\r\n![Screenshot 2024-06-11 6 13 31 PM](https://github.com/tensorflow/tensorflow/assets/81610181/46d6fe94-5764-4498-9a39-d529b9f18c7e)\r\n" ]
2023-10-24T04:06:40
2024-06-11T12:46:19
null
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source binary ### TensorFlow version 2.13.0 ### Custom code No ### OS platform and distribution macOS Venture 13.1 (22C65) ### Mobile device _No response_ ### Python version 3.8.3 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? **Issue** I'm getting what looks like a memory leak from running tf.random.normal as below, in eager mode. I have not encountered this issue with others versions, e.g. 2.12.1 **Context** I'm running RL algorithms using a TF-addon [NoisyDense](https://www.tensorflow.org/addons/api_docs/python/tfa/layers/NoisyDense) layer, which exposes a function that does the below random sampling. Since it's being executed millions of times, it causes exploding RAM. **Notes** Wrapping the random sampling inside a function decorated with tf.function seems to avoid the issue. ### Standalone code to reproduce the issue ```shell import os, psutil process = psutil.Process() print(process.memory_info().rss / 1000000) # Ram usage in MB import tensorflow as tf print(tf.__version__) for _ in range(10): print(process.memory_info().rss / 1000000) for _ in range(5000): x = tf.random.normal(shape=(10000, 1)) # Causing growing RAM ``` ### Relevant log output ```shell 382.963712 2.13.0 382.963712 385.220608 387.21536 388.927488 390.926336 392.392704 394.338304 396.374016 398.323712 400.273408 ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62203/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62203/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62202
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62202/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62202/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62202/events
https://github.com/tensorflow/tensorflow/pull/62202
1,958,204,964
PR_kwDOArmXAs5dlfDI
62,202
Fix Memory Alignment tests on Windows
{ "login": "mraunak", "id": 83710963, "node_id": "MDQ6VXNlcjgzNzEwOTYz", "avatar_url": "https://avatars.githubusercontent.com/u/83710963?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mraunak", "html_url": "https://github.com/mraunak", "followers_url": "https://api.github.com/users/mraunak/followers", "following_url": "https://api.github.com/users/mraunak/following{/other_user}", "gists_url": "https://api.github.com/users/mraunak/gists{/gist_id}", "starred_url": "https://api.github.com/users/mraunak/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mraunak/subscriptions", "organizations_url": "https://api.github.com/users/mraunak/orgs", "repos_url": "https://api.github.com/users/mraunak/repos", "events_url": "https://api.github.com/users/mraunak/events{/privacy}", "received_events_url": "https://api.github.com/users/mraunak/received_events", "type": "User", "site_admin": false }
[ { "id": 390482148, "node_id": "MDU6TGFiZWwzOTA0ODIxNDg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/awaiting%20review", "name": "awaiting review", "color": "bc3869", "default": false, "description": "Pull request awaiting review" }, { "id": 987666414, "node_id": "MDU6TGFiZWw5ODc2NjY0MTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/ready%20to%20pull", "name": "ready to pull", "color": "2cd643", "default": false, "description": "PR ready for merge process" }, { "id": 1169364259, "node_id": "MDU6TGFiZWwxMTY5MzY0MjU5", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/size:XS", "name": "size:XS", "color": "adafea", "default": false, "description": "CL Change Size: Extra Small" }, { "id": 1478826728, "node_id": "MDU6TGFiZWwxNDc4ODI2NzI4", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:core", "name": "comp:core", "color": "024391", "default": false, "description": "issues related to core part of tensorflow" } ]
closed
false
{ "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false }
[ { "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false } ]
null
[]
2023-10-23T23:36:10
2023-11-03T04:56:04
2023-11-03T04:56:04
CONTRIBUTOR
null
false
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/pulls/62202", "html_url": "https://github.com/tensorflow/tensorflow/pull/62202", "diff_url": "https://github.com/tensorflow/tensorflow/pull/62202.diff", "patch_url": "https://github.com/tensorflow/tensorflow/pull/62202.patch", "merged_at": "2023-11-03T04:56:04" }
This PR addresses the ManualConstructor tests that verify memory alignment on the different platforms. The change resolves the byte-alignment error for long double data types and the memory alignment test passes successfully for both CLANG and MSVC compilers on the Windows platform.
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62202/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62202/timeline
null
null
true
https://api.github.com/repos/tensorflow/tensorflow/issues/62201
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62201/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62201/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62201/events
https://github.com/tensorflow/tensorflow/pull/62201
1,957,750,961
PR_kwDOArmXAs5dj73O
62,201
Update curl from 8.2.1 to 8.4.0
{ "login": "rtg0795", "id": 36429068, "node_id": "MDQ6VXNlcjM2NDI5MDY4", "avatar_url": "https://avatars.githubusercontent.com/u/36429068?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rtg0795", "html_url": "https://github.com/rtg0795", "followers_url": "https://api.github.com/users/rtg0795/followers", "following_url": "https://api.github.com/users/rtg0795/following{/other_user}", "gists_url": "https://api.github.com/users/rtg0795/gists{/gist_id}", "starred_url": "https://api.github.com/users/rtg0795/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rtg0795/subscriptions", "organizations_url": "https://api.github.com/users/rtg0795/orgs", "repos_url": "https://api.github.com/users/rtg0795/repos", "events_url": "https://api.github.com/users/rtg0795/events{/privacy}", "received_events_url": "https://api.github.com/users/rtg0795/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[]
2023-10-23T18:19:31
2023-10-24T01:24:02
2023-10-24T01:24:02
CONTRIBUTOR
null
false
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/pulls/62201", "html_url": "https://github.com/tensorflow/tensorflow/pull/62201", "diff_url": "https://github.com/tensorflow/tensorflow/pull/62201.diff", "patch_url": "https://github.com/tensorflow/tensorflow/pull/62201.patch", "merged_at": "2023-10-24T01:24:02" }
PiperOrigin-RevId: 572723857
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62201/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62201/timeline
null
null
true
https://api.github.com/repos/tensorflow/tensorflow/issues/62200
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62200/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62200/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62200/events
https://github.com/tensorflow/tensorflow/issues/62200
1,957,724,636
I_kwDOArmXAs50sIHc
62,200
Error when building from source: AddKernelActivityEvent<TF_CUPTI_HAS_CHANNEL_ID> ‘TF_CUPTI_HAS_CHANNEL_ID’ was not declared in this scope
{ "login": "Lip651", "id": 43471995, "node_id": "MDQ6VXNlcjQzNDcxOTk1", "avatar_url": "https://avatars.githubusercontent.com/u/43471995?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Lip651", "html_url": "https://github.com/Lip651", "followers_url": "https://api.github.com/users/Lip651/followers", "following_url": "https://api.github.com/users/Lip651/following{/other_user}", "gists_url": "https://api.github.com/users/Lip651/gists{/gist_id}", "starred_url": "https://api.github.com/users/Lip651/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lip651/subscriptions", "organizations_url": "https://api.github.com/users/Lip651/orgs", "repos_url": "https://api.github.com/users/Lip651/repos", "events_url": "https://api.github.com/users/Lip651/events{/privacy}", "received_events_url": "https://api.github.com/users/Lip651/received_events", "type": "User", "site_admin": false }
[ { "id": 473173351, "node_id": "MDU6TGFiZWw0NzMxNzMzNTE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:build/install", "name": "type:build/install", "color": "159b2e", "default": false, "description": "Build and install issues" } ]
closed
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62200\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62200\">No</a>\n", "I took a more stable branch and it worked " ]
2023-10-23T18:04:55
2023-10-25T05:47:30
2023-10-25T05:47:02
NONE
null
null
null
### Issue type Build/Install ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version 2.13 ### Custom code Yes ### OS platform and distribution Linux Ubuntu 20.04.6 LTS ### Mobile device _No response_ ### Python version 3.8.10 ### Bazel version 6.1.0 ### GCC/compiler version 9.4.0 ### CUDA/cuDNN version Cuda=11.4.152, cuDNN=8.9.5 ### GPU model and memory GeForce RTX 2070 Rev. A ### Current behavior? I am trying to install tensorflow from source. I am following this [tutorial](https://www.tensorflow.org/install/source). I have the cuDNN and the Cuda Toolkit installed, and the following configuration: ``` You have bazel 6.1.0 installed. Please specify the location of python. [Default is /usr/bin/python3]: Found possible Python library paths: /usr/lib/python3/dist-packages /usr/local/lib/python3.8/dist-packages Please input the desired Python library path to use. Default is [/usr/lib/python3/dist-packages] Do you wish to build TensorFlow with ROCm support? [y/N]: N No ROCm support will be enabled for TensorFlow. Do you wish to build TensorFlow with CUDA support? [y/N]: y CUDA support will be enabled for TensorFlow. Do you wish to build TensorFlow with TensorRT support? [y/N]: N No TensorRT support will be enabled for TensorFlow. Found CUDA 11.4 in: /usr/local/cuda-11.4/targets/x86_64-linux/lib /usr/local/cuda-11.4/targets/x86_64-linux/include Found cuDNN 8 in: /usr/local/cuda-11.4/targets/x86_64-linux/lib /usr/local/cuda-11.4/targets/x86_64-linux/include Please specify a list of comma-separated CUDA compute capabilities you want to build with. You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus. Each capability can be specified as "x.y" or "compute_xy" to include both virtual and binary GPU code, or as "sm_xy" to only include the binary code. Please note that each additional compute capability significantly increases your build time and binary size, and that TensorFlow only supports compute capabilities >= 3.5 [Default is: 7.5]: Do you want to use clang as CUDA compiler? [Y/n]: n nvcc will be used as CUDA compiler. Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]: Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -Wno-sign-compare]: Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: N Not configuring the WORKSPACE for Android builds. ``` Then doing: `bazel build --config=opt --action_env=PATH -c opt //tensorflow/tools/pip_package:build_pip_package` ``` ERROR: /home/master/.cache/bazel/_bazel_master/7d15ddcbf9badca106464f95f49bc497/external/local_xla/xla/backends/profiler/gpu/BUILD:172:16: Compiling xla/backends/profiler/gpu/cupti_tracer.cc failed: (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command (from target @local_xla//xla/backends/profiler/gpu:cupti_tracer) external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -MD -MF bazel-out/k8-opt/bin/external/local_xla/xla/backends/profiler/gpu/_objs/cupti_tracer/cupti_tracer.pic.d ... (remaining 180 arguments skipped) external/local_xla/xla/backends/profiler/gpu/cupti_tracer.cc: In member function ‘tsl::Status xla::profiler::CuptiTracer::ProcessActivityBuffer(CUcontext, uint32_t, uint8_t*, size_t)’: external/local_xla/xla/backends/profiler/gpu/cupti_tracer.cc:2177:34: error: ‘TF_CUPTI_HAS_CHANNEL_ID’ was not declared in this scope 2177 | AddKernelActivityEvent<TF_CUPTI_HAS_CHANNEL_ID>( | ^~~~~~~~~~~~~~~~~~~~~~~ external/local_xla/xla/backends/profiler/gpu/cupti_tracer.cc:2178:76: error: no matching function for call to ‘AddKernelActivityEvent<<expression error> >(xla::profiler::CuptiTraceCollector*&, xla::profiler::{anonymous}::CuptiActivityKernelTy*)’ 2178 | collector_, reinterpret_cast<CuptiActivityKernelTy *>(record)); | ^ external/local_xla/xla/backends/profiler/gpu/cupti_tracer.cc:747:6: note: candidate: ‘template<bool cupti_has_channel_id, class CuptiActivityKernel> void xla::profiler::{anonymous}::AddKernelActivityEvent(xla::profiler::CuptiTraceCollector*, const CuptiActivityKernel*)’ 747 | void AddKernelActivityEvent(CuptiTraceCollector *collector, | ^~~~~~~~~~~~~~~~~~~~~~ external/local_xla/xla/backends/profiler/gpu/cupti_tracer.cc:747:6: note: template argument deduction/substitution failed: external/local_xla/xla/backends/profiler/gpu/cupti_tracer.cc:2178:76: error: template argument 1 is invalid 2178 | collector_, reinterpret_cast<CuptiActivityKernelTy *>(record)); | ^ Target //tensorflow/tools/pip_package:build_pip_package failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 2354.699s, Critical Path: 306.56s INFO: 11360 processes: 84 internal, 11276 local. FAILED: Build did NOT complete successfully ``` ### Standalone code to reproduce the issue ```shell bazel build --config=opt --action_env=PATH -c opt //tensorflow/tools/pip_package:build_pip_package ``` ### Relevant log output ```shell ERROR: /home/master/Downloads/tensorflow/tensorflow/core/kernels/image/BUILD:325:18: Compiling tensorflow/core/kernels/image/image_ops_gpu.cu.cc failed: (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command (from target //tensorflow/core/kernels/image:image_ops_gpu) (cd /home/master/.cache/bazel/_bazel_master/7d15ddcbf9badca106464f95f49bc497/execroot/org_tensorflow && \ exec env - \ CUDA_TOOLKIT_PATH=/usr/local/cuda-11.4 \ GCC_HOST_COMPILER_PATH=/usr/bin/x86_64-linux-gnu-gcc-9 \ LD_LIBRARY_PATH=/usr/local/cuda-11.4/lib64:/home/master/TensorRT-8.6.1.6/lib:/usr/local/cuda-11.4/lib64:/home/master/TensorRT-8.6.1.6/lib \ PATH=/home/master/.cache/bazelisk/downloads/sha256/6c25a6d716545d6b672ec46f770521cd9ebb63d73617b8f4e6747825d1db1839/bin:/usr/local/cuda-11.4/bin:/home/master/.local/bin:/usr/local/cuda-11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin \ PWD=/proc/self/cwd \ PYTHON_BIN_PATH=/usr/bin/python3 \ PYTHON_LIB_PATH=/usr/lib/python3/dist-packages \ TF2_BEHAVIOR=1 \ TF_CUDA_COMPUTE_CAPABILITIES=7.5 \ external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -MD -MF bazel-out/k8-opt/bin/tensorflow/core/kernels/image/_objs/image_ops_gpu/image_ops_gpu.cu.pic.d '-frandom-seed=bazel-out/k8-opt/bin/tensorflow/core/kernels/image/_objs/image_ops_gpu/image_ops_gpu.cu.pic.o' '-DEIGEN_MAX_ALIGN_BYTES=64' -DEIGEN_ALLOW_UNALIGNED_SCALARS '-DEIGEN_USE_AVX512_GEMM_KERNELS=0' -DHAVE_SYS_UIO_H -DTF_USE_SNAPPY -DTENSORFLOW_USE_CUSTOM_CONTRACTION_KERNEL -DTENSORFLOW_USE_MKLDNN_CONTRACTION_KERNEL '-DEIGEN_ALTIVEC_USE_CUSTOM_PACK=0' '-DEIGEN_NEON_GEBP_NR=4' '-DBAZEL_CURRENT_REPOSITORY=""' -iquote . -iquote bazel-out/k8-opt/bin -iquote external/eigen_archive -iquote bazel-out/k8-opt/bin/external/eigen_archive -iquote external/com_google_absl -iquote bazel-out/k8-opt/bin/external/com_google_absl -iquote external/nsync -iquote bazel-out/k8-opt/bin/external/nsync -iquote external/com_google_protobuf -iquote bazel-out/k8-opt/bin/external/com_google_protobuf -iquote external/local_tsl -iquote bazel-out/k8-opt/bin/external/local_tsl -iquote external/com_googlesource_code_re2 -iquote bazel-out/k8-opt/bin/external/com_googlesource_code_re2 -iquote external/farmhash_archive -iquote bazel-out/k8-opt/bin/external/farmhash_archive -iquote external/fft2d -iquote bazel-out/k8-opt/bin/external/fft2d -iquote external/highwayhash -iquote bazel-out/k8-opt/bin/external/highwayhash -iquote external/gif -iquote bazel-out/k8-opt/bin/external/gif -iquote external/libjpeg_turbo -iquote bazel-out/k8-opt/bin/external/libjpeg_turbo -iquote external/zlib -iquote bazel-out/k8-opt/bin/external/zlib -iquote external/ml_dtypes -iquote bazel-out/k8-opt/bin/external/ml_dtypes -iquote external/local_config_cuda -iquote bazel-out/k8-opt/bin/external/local_config_cuda -iquote external/snappy -iquote bazel-out/k8-opt/bin/external/snappy -iquote external/double_conversion -iquote bazel-out/k8-opt/bin/external/double_conversion -iquote external/nccl_archive -iquote bazel-out/k8-opt/bin/external/nccl_archive -iquote external/local_config_rocm -iquote bazel-out/k8-opt/bin/external/local_config_rocm -iquote external/local_config_tensorrt -iquote bazel-out/k8-opt/bin/external/local_config_tensorrt -iquote external/png -iquote bazel-out/k8-opt/bin/external/png -iquote external/onednn -iquote bazel-out/k8-opt/bin/external/onednn -iquote external/local_xla -iquote bazel-out/k8-opt/bin/external/local_xla -Ibazel-out/k8-opt/bin/external/ml_dtypes/_virtual_includes/float8 -Ibazel-out/k8-opt/bin/external/ml_dtypes/_virtual_includes/int4 -Ibazel-out/k8-opt/bin/external/local_config_cuda/cuda/_virtual_includes/cuda_headers_virtual -Ibazel-out/k8-opt/bin/external/nccl_archive/_virtual_includes/nccl_config -Ibazel-out/k8-opt/bin/external/local_config_tensorrt/_virtual_includes/tensorrt_headers -isystem external/eigen_archive -isystem bazel-out/k8-opt/bin/external/eigen_archive -isystem external/eigen_archive/mkl_include -isystem bazel-out/k8-opt/bin/external/eigen_archive/mkl_include -isystem external/nsync/public -isystem bazel-out/k8-opt/bin/external/nsync/public -isystem external/com_google_protobuf/src -isystem bazel-out/k8-opt/bin/external/com_google_protobuf/src -isystem external/farmhash_archive/src -isystem bazel-out/k8-opt/bin/external/farmhash_archive/src -isystem external/gif -isystem bazel-out/k8-opt/bin/external/gif -isystem external/zlib -isystem bazel-out/k8-opt/bin/external/zlib -isystem external/ml_dtypes -isystem bazel-out/k8-opt/bin/external/ml_dtypes -isystem external/ml_dtypes/ml_dtypes -isystem bazel-out/k8-opt/bin/external/ml_dtypes/ml_dtypes -isystem external/local_config_cuda/cuda -isystem bazel-out/k8-opt/bin/external/local_config_cuda/cuda -isystem external/local_config_cuda/cuda/cuda/include -isystem bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include -isystem external/local_config_rocm/rocm -isystem bazel-out/k8-opt/bin/external/local_config_rocm/rocm -isystem external/local_config_rocm/rocm/rocm/include -isystem bazel-out/k8-opt/bin/external/local_config_rocm/rocm/rocm/include -isystem external/local_config_rocm/rocm/rocm/include/rocrand -isystem bazel-out/k8-opt/bin/external/local_config_rocm/rocm/rocm/include/rocrand -isystem external/local_config_rocm/rocm/rocm/include/roctracer -isystem bazel-out/k8-opt/bin/external/local_config_rocm/rocm/rocm/include/roctracer -isystem external/png -isystem bazel-out/k8-opt/bin/external/png -isystem external/onednn/include -isystem bazel-out/k8-opt/bin/external/onednn/include -isystem external/onednn/src -isystem bazel-out/k8-opt/bin/external/onednn/src -isystem external/onednn/src/common -isystem bazel-out/k8-opt/bin/external/onednn/src/common -isystem external/onednn/src/common/ittnotify -isystem bazel-out/k8-opt/bin/external/onednn/src/common/ittnotify -isystem external/onednn/src/cpu -isystem bazel-out/k8-opt/bin/external/onednn/src/cpu -isystem external/onednn/src/cpu/gemm -isystem bazel-out/k8-opt/bin/external/onednn/src/cpu/gemm -isystem external/onednn/src/cpu/x64/xbyak -isystem bazel-out/k8-opt/bin/external/onednn/src/cpu/x64/xbyak -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -fPIC -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -fno-omit-frame-pointer -no-canonical-prefixes -fno-canonical-system-headers -DNDEBUG -g0 -O2 -ffunction-sections -fdata-sections -Wno-all -Wno-extra -Wno-deprecated -Wno-deprecated-declarations -Wno-ignored-attributes -Wno-array-bounds -Wunused-result '-Werror=unused-result' -Wswitch '-Werror=switch' '-Wno-error=unused-but-set-variable' -DAUTOLOAD_DYNAMIC_KERNELS -Wno-sign-compare '-std=c++17' -x cuda '-DGOOGLE_CUDA=1' '--cuda-include-ptx=sm_75' '--cuda-gpu-arch=sm_75' '-Xcuda-fatbinary=--compress-all' '-nvcc_options=expt-relaxed-constexpr' -DEIGEN_AVOID_STL_ARRAY -Iexternal/gemmlowp -Wno-sign-compare '-ftemplate-depth=900' -fno-exceptions '-DGOOGLE_CUDA=1' '-DTENSORFLOW_USE_NVCC=1' '-DTENSORFLOW_USE_XLA=1' -DINTEL_MKL -DENABLE_ONEDNN_V3 -DAMD_ZENDNN -msse3 -pthread '-nvcc_options=relaxed-constexpr' '-nvcc_options=ftz=true' -c tensorflow/core/kernels/image/image_ops_gpu.cu.cc -o bazel-out/k8-opt/bin/tensorflow/core/kernels/image/_objs/image_ops_gpu/image_ops_gpu.cu.pic.o) # Configuration: a0763b48cf05909e46ed8ba9df7ecc2eca8eed6449f35b44f6b17dbe52c77dbe # Execution platform: @local_execution_config_platform//:platform bazel-out/k8-opt/bin/external/ml_dtypes/_virtual_includes/float8/ml_dtypes/include/float8.h(1164): warning: variable "aligned_highest" was declared but never referenced detected during: instantiation of "To ml_dtypes::float8_internal::ConvertImpl<From, To, kSaturate, kTruncate, std::enable_if_t<<expression>, void>>::run(const From &) [with From=ml_dtypes::float8_internal::float8_e4m3b11fnuz, To=ml_dtypes::float8_internal::float8_e4m3fn, kSaturate=false, kTruncate=false]" (1255): here instantiation of "Derived ml_dtypes::float8_internal::float8_base<Derived>::ConvertFrom(const From &) [with Derived=ml_dtypes::float8_internal::float8_e4m3fn, kSaturate=false, kTruncate=false, From=ml_dtypes::float8_internal::float8_e4m3b11fnuz]" (258): here bazel-out/k8-opt/bin/external/ml_dtypes/_virtual_includes/float8/ml_dtypes/include/float8.h(1164): warning: variable "aligned_highest" was declared but never referenced detected during: instantiation of "To ml_dtypes::float8_internal::ConvertImpl<From, To, kSaturate, kTruncate, std::enable_if_t<<expression>, void>>::run(const From &) [with From=ml_dtypes::float8_internal::float8_e4m3b11fnuz, To=float, kSaturate=false, kTruncate=false]" (1261): here instantiation of "To ml_dtypes::float8_internal::float8_base<Derived>::ConvertTo<To,kSaturate,kTruncate>(const Derived &) [with Derived=ml_dtypes::float8_internal::float8_e4m3b11fnuz, To=float, kSaturate=false, kTruncate=false]" (87): here instantiation of "ml_dtypes::float8_internal::float8_base<Derived>::operator float() const [with Derived=ml_dtypes::float8_internal::float8_e4m3b11fnuz]" (128): here instantiation of "Derived ml_dtypes::float8_internal::float8_base<Derived>::operator-(const Derived &) const [with Derived=ml_dtypes::float8_internal::float8_e4m3b11fnuz]" (287): here bazel-out/k8-opt/bin/external/ml_dtypes/_virtual_includes/float8/ml_dtypes/include/float8.h(1164): warning: variable "aligned_highest" was declared but never referenced detected during: instantiation of "To ml_dtypes::float8_internal::ConvertImpl<From, To, kSaturate, kTruncate, std::enable_if_t<<expression>, void>>::run(const From &) [with From=ml_dtypes::float8_internal::float8_e4m3fnuz, To=float, kSaturate=false, kTruncate=false]" (1261): here instantiation of "To ml_dtypes::float8_internal::float8_base<Derived>::ConvertTo<To,kSaturate,kTruncate>(const Derived &) [with Derived=ml_dtypes::float8_internal::float8_e4m3fnuz, To=float, kSaturate=false, kTruncate=false]" (87): here instantiation of "ml_dtypes::float8_internal::float8_base<Derived>::operator float() const [with Derived=ml_dtypes::float8_internal::float8_e4m3fnuz]" (128): here instantiation of "Derived ml_dtypes::float8_internal::float8_base<Derived>::operator-(const Derived &) const [with Derived=ml_dtypes::float8_internal::float8_e4m3fnuz]" (335): here bazel-out/k8-opt/bin/external/ml_dtypes/_virtual_includes/float8/ml_dtypes/include/float8.h(1164): warning: variable "aligned_highest" was declared but never referenced detected during: instantiation of "To ml_dtypes::float8_internal::ConvertImpl<From, To, kSaturate, kTruncate, std::enable_if_t<<expression>, void>>::run(const From &) [with From=ml_dtypes::float8_internal::float8_e4m3b11fnuz, To=ml_dtypes::float8_internal::float8_e4m3fnuz, kSaturate=false, kTruncate=false]" (1255): here instantiation of "Derived ml_dtypes::float8_internal::float8_base<Derived>::ConvertFrom(const From &) [with Derived=ml_dtypes::float8_internal::float8_e4m3fnuz, kSaturate=false, kTruncate=false, From=ml_dtypes::float8_internal::float8_e4m3b11fnuz]" (323): here bazel-out/k8-opt/bin/external/ml_dtypes/_virtual_includes/float8/ml_dtypes/include/float8.h(1164): warning: variable "aligned_highest" was declared but never referenced detected during: instantiation of "To ml_dtypes::float8_internal::ConvertImpl<From, To, kSaturate, kTruncate, std::enable_if_t<<expression>, void>>::run(const From &) [with From=ml_dtypes::float8_internal::float8_e5m2fnuz, To=ml_dtypes::float8_internal::float8_e5m2, kSaturate=false, kTruncate=false]" (1255): here instantiation of "Derived ml_dtypes::float8_internal::float8_base<Derived>::ConvertFrom(const From &) [with Derived=ml_dtypes::float8_internal::float8_e5m2, kSaturate=false, kTruncate=false, From=ml_dtypes::float8_internal::float8_e5m2fnuz]" (357): here bazel-out/k8-opt/bin/external/ml_dtypes/_virtual_includes/float8/ml_dtypes/include/float8.h(1164): warning: variable "aligned_highest" was declared but never referenced detected during: instantiation of "To ml_dtypes::float8_internal::ConvertImpl<From, To, kSaturate, kTruncate, std::enable_if_t<<expression>, void>>::run(const From &) [with From=ml_dtypes::float8_internal::float8_e5m2fnuz, To=float, kSaturate=false, kTruncate=false]" (1261): here instantiation of "To ml_dtypes::float8_internal::float8_base<Derived>::ConvertTo<To,kSaturate,kTruncate>(const Derived &) [with Derived=ml_dtypes::float8_internal::float8_e5m2fnuz, To=float, kSaturate=false, kTruncate=false]" (87): here instantiation of "ml_dtypes::float8_internal::float8_base<Derived>::operator float() const [with Derived=ml_dtypes::float8_internal::float8_e5m2fnuz]" (128): here instantiation of "Derived ml_dtypes::float8_internal::float8_base<Derived>::operator-(const Derived &) const [with Derived=ml_dtypes::float8_internal::float8_e5m2fnuz]" (399): here bazel-out/k8-opt/bin/external/ml_dtypes/_virtual_includes/float8/ml_dtypes/include/float8.h(1164): warning: variable "aligned_highest" was declared but never referenced detected during: instantiation of "To ml_dtypes::float8_internal::ConvertImpl<From, To, kSaturate, kTruncate, std::enable_if_t<<expression>, void>>::run(const From &) [with From=ml_dtypes::float8_internal::float8_e5m2, To=ml_dtypes::float8_internal::float8_e5m2fnuz, kSaturate=false, kTruncate=false]" (1255): here instantiation of "Derived ml_dtypes::float8_internal::float8_base<Derived>::ConvertFrom(const From &) [with Derived=ml_dtypes::float8_internal::float8_e5m2fnuz, kSaturate=false, kTruncate=false, From=ml_dtypes::float8_internal::float8_e5m2]" (383): here external/com_google_absl/absl/status/internal/statusor_internal.h(252): warning: ignoring return value type with "nodiscard" attribute external/com_google_absl/absl/status/internal/statusor_internal.h(259): warning: ignoring return value type with "nodiscard" attribute external/com_google_absl/absl/strings/internal/str_format/bind.h: In constructor ‘absl::lts_20230125::str_format_internal::FormatSpecTemplate<Args>::FormatSpecTemplate(const absl::lts_20230125::str_format_internal::ExtendedParsedFormat<absl::lts_20230125::FormatConversionCharSet(C)...>&)’: external/com_google_absl/absl/strings/internal/str_format/bind.h:171:1: error: parse error in template argument list 171 | CheckArity<sizeof...(C), sizeof...(Args)>(); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ external/com_google_absl/absl/strings/internal/str_format/bind.h:171:63: error: expected ‘;’ before ‘)’ token 171 | CheckArity<sizeof...(C), sizeof...(Args)>(); | ^ | ; external/com_google_absl/absl/strings/internal/str_format/bind.h:172:147: error: template argument 1 is invalid 172 | CheckMatches<C...>(absl::make_index_sequence<sizeof...(C)>{}); | ^ external/com_google_absl/absl/strings/internal/str_format/bind.h:172:151: error: expected primary-expression before ‘{’ token 172 | CheckMatches<C...>(absl::make_index_sequence<sizeof...(C)>{}); | ^ external/com_google_absl/absl/strings/internal/str_format/bind.h:172:150: error: expected ‘;’ before ‘{’ token 172 | CheckMatches<C...>(absl::make_index_sequence<sizeof...(C)>{}); | ^ | ; external/com_google_absl/absl/strings/internal/str_format/bind.h:172:153: error: expected primary-expression before ‘)’ token 172 | CheckMatches<C...>(absl::make_index_sequence<sizeof...(C)>{}); | ^ external/com_google_absl/absl/strings/internal/str_format/arg.h: In instantiation of ‘constexpr absl::lts_20230125::FormatConversionCharSet absl::lts_20230125::str_format_internal::ArgumentToConv() [with Arg = long int]’: external/com_google_absl/absl/strings/str_format.h:268:156: required by substitution of ‘template<class ... Args> using FormatSpec = absl::lts_20230125::str_format_internal::FormatSpecTemplate<absl::lts_20230125::FormatConversionCharSet((ArgumentToConv<Args>)())...> [with Args = {long int, const tensorflow::ResourceBase*}]’ external/com_google_absl/absl/strings/str_format.h:351:1: required by substitution of ‘template<class ... Args> std::string absl::lts_20230125::StrFormat(absl::lts_20230125::FormatSpec<Args ...>&, const Args& ...) [with Args = {long int, const tensorflow::ResourceBase*}]’ ./tensorflow/core/framework/resource_base.h:44:62: required from here external/com_google_absl/absl/strings/internal/str_format/arg.h:403:43: error: no matching function for call to ‘ExtractCharSet(ConvResult)’ 403 | return absl::str_format_internal::ExtractCharSet(ConvResult{}); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ external/com_google_absl/absl/strings/internal/str_format/arg.h:196:1: note: candidate: ‘template<absl::lts_20230125::FormatConversionCharSet C> constexpr absl::lts_20230125::FormatConversionCharSet absl::lts_20230125::str_format_internal::ExtractCharSet(absl::lts_20230125::FormatConvertResult<(absl::lts_20230125::FormatConversionCharSet)(C)>)’ 196 | constexpr FormatConversionCharSet ExtractCharSet(FormatConvertResult<C>) { | ^~~~~~~~~~~~~~ external/com_google_absl/absl/strings/internal/str_format/arg.h:196:1: note: template argument deduction/substitution failed: external/com_google_absl/absl/strings/internal/str_format/arg.h:403:43: note: couldn’t deduce template parameter ‘C’ 403 | return absl::str_format_internal::ExtractCharSet(ConvResult{}); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ external/com_google_absl/absl/strings/internal/str_format/arg.h:201:1: note: candidate: ‘template<absl::lts_20230125::FormatConversionCharSet C> constexpr absl::lts_20230125::FormatConversionCharSet absl::lts_20230125::str_format_internal::ExtractCharSet(absl::lts_20230125::str_format_internal::ArgConvertResult<(absl::lts_20230125::FormatConversionCharSet)(C)>)’ 201 | constexpr FormatConversionCharSet ExtractCharSet(ArgConvertResult<C>) { | ^~~~~~~~~~~~~~ external/com_google_absl/absl/strings/internal/str_format/arg.h:201:1: note: template argument deduction/substitution failed: external/com_google_absl/absl/strings/internal/str_format/arg.h:403:43: note: couldn’t deduce template parameter ‘C’ 403 | return absl::str_format_internal::ExtractCharSet(ConvResult{}); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ external/com_google_absl/absl/strings/internal/str_format/arg.h: In instantiation of ‘constexpr absl::lts_20230125::FormatConversionCharSet absl::lts_20230125::str_format_internal::ArgumentToConv() [with Arg = const tensorflow::ResourceBase*]’: external/com_google_absl/absl/strings/str_format.h:268:156: required by substitution of ‘template<class ... Args> using FormatSpec = absl::lts_20230125::str_format_internal::FormatSpecTemplate<absl::lts_20230125::FormatConversionCharSet((ArgumentToConv<Args>)())...> [with Args = {long int, const tensorflow::ResourceBase*}]’ external/com_google_absl/absl/strings/str_format.h:351:1: required by substitution of ‘template<class ... Args> std::string absl::lts_20230125::StrFormat(absl::lts_20230125::FormatSpec<Args ...>&, const Args& ...) [with Args = {long int, const tensorflow::ResourceBase*}]’ ./tensorflow/core/framework/resource_base.h:44:62: required from here external/com_google_absl/absl/strings/internal/str_format/arg.h:403:43: error: no matching function for call to ‘ExtractCharSet(ConvResult)’ external/com_google_absl/absl/strings/internal/str_format/arg.h:196:1: note: candidate: ‘template<absl::lts_20230125::FormatConversionCharSet C> constexpr absl::lts_20230125::FormatConversionCharSet absl::lts_20230125::str_format_internal::ExtractCharSet(absl::lts_20230125::FormatConvertResult<(absl::lts_20230125::FormatConversionCharSet)(C)>)’ 196 | constexpr FormatConversionCharSet ExtractCharSet(FormatConvertResult<C>) { | ^~~~~~~~~~~~~~ external/com_google_absl/absl/strings/internal/str_format/arg.h:196:1: note: template argument deduction/substitution failed: external/com_google_absl/absl/strings/internal/str_format/arg.h:403:43: note: couldn’t deduce template parameter ‘C’ 403 | return absl::str_format_internal::ExtractCharSet(ConvResult{}); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ external/com_google_absl/absl/strings/internal/str_format/arg.h:201:1: note: candidate: ‘template<absl::lts_20230125::FormatConversionCharSet C> constexpr absl::lts_20230125::FormatConversionCharSet absl::lts_20230125::str_format_internal::ExtractCharSet(absl::lts_20230125::str_format_internal::ArgConvertResult<(absl::lts_20230125::FormatConversionCharSet)(C)>)’ 201 | constexpr FormatConversionCharSet ExtractCharSet(ArgConvertResult<C>) { | ^~~~~~~~~~~~~~ external/com_google_absl/absl/strings/internal/str_format/arg.h:201:1: note: template argument deduction/substitution failed: external/com_google_absl/absl/strings/internal/str_format/arg.h:403:43: note: couldn’t deduce template parameter ‘C’ 403 | return absl::str_format_internal::ExtractCharSet(ConvResult{}); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ ./tensorflow/core/framework/resource_base.h: In member function ‘virtual std::string tensorflow::ResourceBase::MakeRefCountingHandleName(int64_t) const’: ./tensorflow/core/framework/resource_base.h:44:62: error: no matching function for call to ‘StrFormat(const char [18], int64_t&, const tensorflow::ResourceBase*)’ 44 | return absl::StrFormat("Resource-%d-at-%p", resource_id, this); | ^ external/com_google_absl/absl/strings/str_format.h:351:1: note: candidate: ‘template<class ... Args> std::string absl::lts_20230125::StrFormat(absl::lts_20230125::FormatSpec<Args ...>&, const Args& ...)’ 351 | ABSL_MUST_USE_RESULT std::string StrFormat(const FormatSpec<Args...>& format, | ^~~~~~~~~ external/com_google_absl/absl/strings/str_format.h:351:1: note: substitution of deduced template arguments resulted in errors seen above external/com_google_absl/absl/strings/internal/str_format/arg.h: In instantiation of ‘constexpr absl::lts_20230125::FormatConversionCharSet absl::lts_20230125::str_format_internal::ArgumentToConv() [with Arg = int]’: external/com_google_absl/absl/strings/internal/str_format/arg.h:570:61: required from ‘static bool absl::lts_20230125::str_format_internal::FormatArgImpl::Dispatch(absl::lts_20230125::str_format_internal::FormatArgImpl::Data, absl::lts_20230125::str_format_internal::FormatConversionSpecImpl, void*) [with T = int]’ external/com_google_absl/absl/strings/internal/str_format/arg.h:524:15: required from ‘void absl::lts_20230125::str_format_internal::FormatArgImpl::Init(const T&) [with T = int]’ external/com_google_absl/absl/strings/internal/str_format/arg.h:474:1: required from ‘absl::lts_20230125::str_format_internal::FormatArgImpl::FormatArgImpl(const T&) [with T = int]’ external/com_google_absl/absl/strings/internal/str_format/bind.h:202:49: required from here external/com_google_absl/absl/strings/internal/str_format/arg.h:403:43: error: no matching function for call to ‘ExtractCharSet(ConvResult)’ 403 | return absl::str_format_internal::ExtractCharSet(ConvResult{}); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ external/com_google_absl/absl/strings/internal/str_format/arg.h:196:1: note: candidate: ‘template<absl::lts_20230125::FormatConversionCharSet C> constexpr absl::lts_20230125::FormatConversionCharSet absl::lts_20230125::str_format_internal::ExtractCharSet(absl::lts_20230125::FormatConvertResult<(absl::lts_20230125::FormatConversionCharSet)(C)>)’ 196 | constexpr FormatConversionCharSet ExtractCharSet(FormatConvertResult<C>) { | ^~~~~~~~~~~~~~ external/com_google_absl/absl/strings/internal/str_format/arg.h:196:1: note: template argument deduction/substitution failed: external/com_google_absl/absl/strings/internal/str_format/arg.h:403:43: note: couldn’t deduce template parameter ‘C’ 403 | return absl::str_format_internal::ExtractCharSet(ConvResult{}); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ external/com_google_absl/absl/strings/internal/str_format/arg.h:201:1: note: candidate: ‘template<absl::lts_20230125::FormatConversionCharSet C> constexpr absl::lts_20230125::FormatConversionCharSet absl::lts_20230125::str_format_internal::ExtractCharSet(absl::lts_20230125::str_format_internal::ArgConvertResult<(absl::lts_20230125::FormatConversionCharSet)(C)>)’ 201 | constexpr FormatConversionCharSet ExtractCharSet(ArgConvertResult<C>) { | ^~~~~~~~~~~~~~ external/com_google_absl/absl/strings/internal/str_format/arg.h:201:1: note: template argument deduction/substitution failed: external/com_google_absl/absl/strings/internal/str_format/arg.h:403:43: note: couldn’t deduce template parameter ‘C’ 403 | return absl::str_format_internal::ExtractCharSet(ConvResult{}); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ Target //tensorflow/tools/pip_package:build_pip_package failed to build INFO: Elapsed time: 35.257s, Critical Path: 32.01s INFO: 238 processes: 30 internal, 208 local. FAILED: Build did NOT complete successfully ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62200/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62200/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62199
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62199/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62199/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62199/events
https://github.com/tensorflow/tensorflow/pull/62199
1,957,724,007
PR_kwDOArmXAs5dj18W
62,199
Update tpu_util.py
{ "login": "gautam1858", "id": 4949778, "node_id": "MDQ6VXNlcjQ5NDk3Nzg=", "avatar_url": "https://avatars.githubusercontent.com/u/4949778?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gautam1858", "html_url": "https://github.com/gautam1858", "followers_url": "https://api.github.com/users/gautam1858/followers", "following_url": "https://api.github.com/users/gautam1858/following{/other_user}", "gists_url": "https://api.github.com/users/gautam1858/gists{/gist_id}", "starred_url": "https://api.github.com/users/gautam1858/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gautam1858/subscriptions", "organizations_url": "https://api.github.com/users/gautam1858/orgs", "repos_url": "https://api.github.com/users/gautam1858/repos", "events_url": "https://api.github.com/users/gautam1858/events{/privacy}", "received_events_url": "https://api.github.com/users/gautam1858/received_events", "type": "User", "site_admin": false }
[ { "id": 1169364458, "node_id": "MDU6TGFiZWwxMTY5MzY0NDU4", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/size:S", "name": "size:S", "color": "adafea", "default": false, "description": "CL Change Size: Small" }, { "id": 1593512946, "node_id": "MDU6TGFiZWwxNTkzNTEyOTQ2", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/invalid", "name": "invalid", "color": "db6f57", "default": true, "description": "Hacktoberfest spam PR" } ]
closed
true
{ "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false }
[ { "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false } ]
null
[ "Please don't use \"add file\"/\"update file\"/\"fix file\"/etc. commit messages. These are hard to reason about when looking at the history of the file/repository. Instead, please write explanatory git commit messages.\r\n\r\nThe commit message is also the title of the PR if the PR has only one commit. It is thus twice important to have commit messages that are relevant, as PRs would be easier to understand and easier to analyze in search results.\r\n\r\nFor how to write good quality git commit messages, please consult https://cbea.ms/git-commit/ \r\n\r\nWe will automaticall close PRs by you if you don't take these suggestions into account" ]
2023-10-23T18:04:31
2023-11-01T00:06:31
2023-10-28T20:20:26
CONTRIBUTOR
spam
false
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/pulls/62199", "html_url": "https://github.com/tensorflow/tensorflow/pull/62199", "diff_url": "https://github.com/tensorflow/tensorflow/pull/62199.diff", "patch_url": "https://github.com/tensorflow/tensorflow/pull/62199.patch", "merged_at": null }
This commit refactors the code for calculating mesh_shape and device_coordinates for the topology. The changes include: - Convert core_locations into a NumPy array for improved performance. - Calculate minimum and maximum values for x, y, z, and core using NumPy functions. - Reshape device_coordinates efficiently using NumPy.
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62199/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62199/timeline
null
null
true
https://api.github.com/repos/tensorflow/tensorflow/issues/62198
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62198/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62198/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62198/events
https://github.com/tensorflow/tensorflow/issues/62198
1,957,431,102
I_kwDOArmXAs50rAc-
62,198
[XLA] using auto-clustering with tf_xla_auto_jit causes multiple compilation with variable seq. len.
{ "login": "TParcollet", "id": 11910731, "node_id": "MDQ6VXNlcjExOTEwNzMx", "avatar_url": "https://avatars.githubusercontent.com/u/11910731?v=4", "gravatar_id": "", "url": "https://api.github.com/users/TParcollet", "html_url": "https://github.com/TParcollet", "followers_url": "https://api.github.com/users/TParcollet/followers", "following_url": "https://api.github.com/users/TParcollet/following{/other_user}", "gists_url": "https://api.github.com/users/TParcollet/gists{/gist_id}", "starred_url": "https://api.github.com/users/TParcollet/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/TParcollet/subscriptions", "organizations_url": "https://api.github.com/users/TParcollet/orgs", "repos_url": "https://api.github.com/users/TParcollet/repos", "events_url": "https://api.github.com/users/TParcollet/events{/privacy}", "received_events_url": "https://api.github.com/users/TParcollet/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1133285679, "node_id": "MDU6TGFiZWwxMTMzMjg1Njc5", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:xla", "name": "comp:xla", "color": "0052cc", "default": false, "description": "XLA" }, { "id": 5508003926, "node_id": "LA_kwDOArmXAs8AAAABSE14Vg", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF%202.13", "name": "TF 2.13", "color": "B13ACB", "default": false, "description": "For issues related to Tensorflow 2.13" } ]
closed
false
{ "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false }
[ { "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false } ]
null
[ "Note: I tried by decorating using `with tf.xla.experimental.jit_scope():`, and the same thing happens, basically, the compilation takes a crazy amount of time and it feels like it's recompiling things over and over. After a good 50 minutes, it stops compiling and the training starts, but it has the same speed than without any XLA flag ... The latter is not true if I fix the batch - then the training is much faster. ", "@TParcollet \r\nFrom what I remember the XLA compilation does not support ragged tensors (variable length): [link](https://github.com/tensorflow/tensorflow/issues/56595)\r\nI also found that initalizing the ragged tensors can sometimes take quite a lot of time if done through `tf.ragged.constant`. Depends on the use case obviously.", "@maksym33 Thanks! Well, if this is the case then how the hell am I supposed to switch it off... I tried the four versions (argument, context, config and jit_compile) and it STILL triggers XLA. I then compiled from the source without XLA support and it then crashed with this \"Trying to access resource Resource...\" error. Any version above 2.12 triggers XLA from one way or another on my code - even when TF is not compiled with it. ", "I usually change the XLA compile with keras.model.compile and set jit_compile=False", "Hi, @TParcollet !\r\nCould you try to disable the auto-cluster by setting the tf_xla_auto_clustering_enabled environment variable to False and try with TF v2.14 ? Please let us know if it helped?\r\nThank you!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62198\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62198\">No</a>\n" ]
2023-10-23T15:22:16
2023-11-18T01:48:36
2023-11-18T01:48:33
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source binary ### TensorFlow version 2.13.1 ### Custom code Yes ### OS platform and distribution _No response_ ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? I have a somewhat complex model that deals with variable length tensors as input. The feature dimension remains the same, only one of the dimension changes (time). If I fix this by giving always the same batch of features, I can use tf_xla_auto_jit and see that the training speed improves quite a lot. However, as soon as I throw the for `batch in train_dataset` in the mix, everything becomes infinitely slow and, looking at the warning, it feels like XLA keeps recompiling ... I don't really know what to expect here? ### Standalone code to reproduce the issue ```shell Impossible to share unfortunately. ``` ### Relevant log output _No response_
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62198/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62198/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62197
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62197/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62197/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62197/events
https://github.com/tensorflow/tensorflow/issues/62197
1,957,312,833
I_kwDOArmXAs50qjlB
62,197
How to use tf.repeat and another buil-in highlevel funcs on Dataset?
{ "login": "mihalt", "id": 30621622, "node_id": "MDQ6VXNlcjMwNjIxNjIy", "avatar_url": "https://avatars.githubusercontent.com/u/30621622?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mihalt", "html_url": "https://github.com/mihalt", "followers_url": "https://api.github.com/users/mihalt/followers", "following_url": "https://api.github.com/users/mihalt/following{/other_user}", "gists_url": "https://api.github.com/users/mihalt/gists{/gist_id}", "starred_url": "https://api.github.com/users/mihalt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mihalt/subscriptions", "organizations_url": "https://api.github.com/users/mihalt/orgs", "repos_url": "https://api.github.com/users/mihalt/repos", "events_url": "https://api.github.com/users/mihalt/events{/privacy}", "received_events_url": "https://api.github.com/users/mihalt/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473184161, "node_id": "MDU6TGFiZWw0NzMxODQxNjE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:support", "name": "type:support", "color": "159b2e", "default": false, "description": "Support issues" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" } ]
closed
false
{ "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false }
[ { "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false } ]
null
[ "@mihalt Thank you for raising this issue.\r\nCould you please have a look at the [official](https://www.tensorflow.org/api_docs/python/tf/repeat#used-in-the-notebooks) example notebooks on tf.repeat for your reference. As the issue does not seem to be a bug or feature we will proceed with the SO thread going further. \r\nThank you!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62197\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62197\">No</a>\n" ]
2023-10-23T14:30:14
2023-11-11T01:47:44
2023-11-11T01:47:42
NONE
null
null
null
Can you help me in [stackoverflow](https://stackoverflow.com/questions/77332989/how-to-use-tf-repeat-and-another-buil-in-highlevel-funcs-on-dataset)?
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62197/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62197/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62196
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62196/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62196/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62196/events
https://github.com/tensorflow/tensorflow/issues/62196
1,957,252,021
I_kwDOArmXAs50qUu1
62,196
Quantization produces large scale coffiecient, which pervents the model from being loaded
{ "login": "FabianSchuetze", "id": 10357496, "node_id": "MDQ6VXNlcjEwMzU3NDk2", "avatar_url": "https://avatars.githubusercontent.com/u/10357496?v=4", "gravatar_id": "", "url": "https://api.github.com/users/FabianSchuetze", "html_url": "https://github.com/FabianSchuetze", "followers_url": "https://api.github.com/users/FabianSchuetze/followers", "following_url": "https://api.github.com/users/FabianSchuetze/following{/other_user}", "gists_url": "https://api.github.com/users/FabianSchuetze/gists{/gist_id}", "starred_url": "https://api.github.com/users/FabianSchuetze/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/FabianSchuetze/subscriptions", "organizations_url": "https://api.github.com/users/FabianSchuetze/orgs", "repos_url": "https://api.github.com/users/FabianSchuetze/repos", "events_url": "https://api.github.com/users/FabianSchuetze/events{/privacy}", "received_events_url": "https://api.github.com/users/FabianSchuetze/received_events", "type": "User", "site_admin": false }
[ { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 750616506, "node_id": "MDU6TGFiZWw3NTA2MTY1MDY=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:lite", "name": "comp:lite", "color": "0052cc", "default": false, "description": "TF Lite related issues" }, { "id": 1661751498, "node_id": "MDU6TGFiZWwxNjYxNzUxNDk4", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TFLiteConverter", "name": "TFLiteConverter", "color": "bfdadc", "default": false, "description": "For issues related to TFLite converter" }, { "id": 2671351731, "node_id": "MDU6TGFiZWwyNjcxMzUxNzMx", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/ModelOptimizationToolkit", "name": "ModelOptimizationToolkit", "color": "BFD629", "default": false, "description": "TF Model Optimization Toolkit" }, { "id": 5508003926, "node_id": "LA_kwDOArmXAs8AAAABSE14Vg", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF%202.13", "name": "TF 2.13", "color": "B13ACB", "default": false, "description": "For issues related to Tensorflow 2.13" } ]
open
false
{ "login": "abattery", "id": 3203059, "node_id": "MDQ6VXNlcjMyMDMwNTk=", "avatar_url": "https://avatars.githubusercontent.com/u/3203059?v=4", "gravatar_id": "", "url": "https://api.github.com/users/abattery", "html_url": "https://github.com/abattery", "followers_url": "https://api.github.com/users/abattery/followers", "following_url": "https://api.github.com/users/abattery/following{/other_user}", "gists_url": "https://api.github.com/users/abattery/gists{/gist_id}", "starred_url": "https://api.github.com/users/abattery/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/abattery/subscriptions", "organizations_url": "https://api.github.com/users/abattery/orgs", "repos_url": "https://api.github.com/users/abattery/repos", "events_url": "https://api.github.com/users/abattery/events{/privacy}", "received_events_url": "https://api.github.com/users/abattery/received_events", "type": "User", "site_admin": false }
[ { "login": "abattery", "id": 3203059, "node_id": "MDQ6VXNlcjMyMDMwNTk=", "avatar_url": "https://avatars.githubusercontent.com/u/3203059?v=4", "gravatar_id": "", "url": "https://api.github.com/users/abattery", "html_url": "https://github.com/abattery", "followers_url": "https://api.github.com/users/abattery/followers", "following_url": "https://api.github.com/users/abattery/following{/other_user}", "gists_url": "https://api.github.com/users/abattery/gists{/gist_id}", "starred_url": "https://api.github.com/users/abattery/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/abattery/subscriptions", "organizations_url": "https://api.github.com/users/abattery/orgs", "repos_url": "https://api.github.com/users/abattery/repos", "events_url": "https://api.github.com/users/abattery/events{/privacy}", "received_events_url": "https://api.github.com/users/abattery/received_events", "type": "User", "site_admin": false }, { "login": "pkgoogle", "id": 132095473, "node_id": "U_kgDOB9-d8Q", "avatar_url": "https://avatars.githubusercontent.com/u/132095473?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pkgoogle", "html_url": "https://github.com/pkgoogle", "followers_url": "https://api.github.com/users/pkgoogle/followers", "following_url": "https://api.github.com/users/pkgoogle/following{/other_user}", "gists_url": "https://api.github.com/users/pkgoogle/gists{/gist_id}", "starred_url": "https://api.github.com/users/pkgoogle/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pkgoogle/subscriptions", "organizations_url": "https://api.github.com/users/pkgoogle/orgs", "repos_url": "https://api.github.com/users/pkgoogle/repos", "events_url": "https://api.github.com/users/pkgoogle/events{/privacy}", "received_events_url": "https://api.github.com/users/pkgoogle/received_events", "type": "User", "site_admin": false } ]
null
[ "I was able to reproduce this issue. Please find this [gist](https://colab.research.google.com/gist/pjpratik/f71dec9bd1f702c1a62fb8505b7d4a50/62196.ipynb). Seems to be issue while converting pytorch->onnx->tf->tflite.\r\n\r\n@pkgoogle Could you please check this?\r\n\r\nThanks.\r\n\r\n", "Thanks for verifying, @pjpratik and thanks for checking @pkgoogle . ", "I was able to reproduce w/ the same gist as above. @abattery, Can you please take a look? Thanks.", "If you accept a PR and might review it @abattery, I can also look into this again. Would be nice to identify the source of this bug and also to do a PR for tf. ", "Hi @FabianSchuetze, we will review any PR which may come in. For this issue, I'm not sure where the root issue is yet but I can give you some guesses or things to look at. At a high level you should probably start with this README: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/mlir/lite/README.md and then probably review the passes: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/mlir/lite/tf_tfl_passes.cc. We use [MLIR](https://mlir.llvm.org/) to convert arbitrary compute graphs. Hope that at least gets you started ...", "Ok, I've started working on this and your comments were very helpful indeed, @pkgoogle - thanks. ", "Hi @pkgoogle \r\n\r\nThanks for your help. I've been able to reproduce the quantization problem with the `tfl_quantizer` binary. The binary loads an annotated model and returns the quantized output (`bazel-bin/tensorflow/compiler/mlir/lite/quantization/lite/tfl_quantizer --debug ANNOTATED.TFLITE > QUANTIZED.TFLITE 2>DEBUG`). The DEBUG file is extremely large (33GB) because it contains long hex numbers regularly, such as:\r\n```\r\n%cst_36 = arith.constant dense<\"0xB3C0153CF426D73B24C8233CE29033BB4F10F33C42F6A53C....\r\n```\r\nIf I remove these hex numbers, the DEBUG file is manageable. It contains a few suspicious values with seemingly erroneous quantization parameters, such as:\r\n```\r\ntfl.padv2 : (f32,i32,f32,) -> (!quant.uniform<i8:f32, 1.3344405750530544E+36:127>,)\r\n```\r\nbut I'm not sure whether this is relevant and how to debug it. Otherwise, I also jumped into the `quantization_driver.cc` functions but could not identify anything relevant. Do you have any suggestions for narrowing the search or creating good debug output? (NB: I have compiled tensorflow/compiler/mlir/lite/quantization/lite:tfl_quantizer in debug modus with the llvm supplied by tensorflow.)", "Hi @FabianSchuetze I would try to use lldb/gdb with that binary (and build with debug info) and see if you can break down the conversion step by step (and try to figure out before/after which pass does that weird scaling take root). It might be worth it to see if you can reduce down your model to as few as ops as possible that will still show the issue.\r\n\r\nHave you understood the Operation, Region, Block abstractions of MLIR? It's probably worth it to understand that abstraction first: https://www.youtube.com/watch?v=Y4SvqTtOIDk\r\n\r\nThen you can start with the operation which represents your model, dump it https://mlir.llvm.org/doxygen/classmlir_1_1Operation.html (Op->dump();) within lldb/gdb, after every conversion redump it when possible etc. That should help you drill down a bit.\r\n\r\nProbably not useful immediately but you may also want to review some other useful MLIR binaries:\r\n\r\nhttps://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/mlir/lite/BUILD\r\nhttps://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/mlir/BUILD\r\n\r\n(search for tf_cc_binary's in those files)\r\n\r\nI'm not an expert in those but they might be able to help in ways I can't see right now. Hope that helps.\r\n\r\n ", "Thanks for your comment, @pkgoogle . I made a bit of progress and think I'm on a good way. ", "Hi @pkgoogle . Just a brief update: \r\n\r\nThe segfault can be prevented by ensuring the scale coefficient is smaller than one. The scale coefficient can be restricted in [FakeQuantSupport.cc](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/mlir/lite/quantization/ir/FakeQuantSupport.cc#L148) or, in case that the legacy float scale is enabled, in [DownCastScale](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/mlir/lite/quantization/quantization_utils.cc#L675). \r\n\r\nI will now try to identify an appropriate location for interrupting the quantization process. During the quantization, several checks to ensure that the quantization parameters are within an admissible range are called. These checks might be an opportunity to interrupt the transformation.\r\n\r\nThanks also for your support regarding MLIR. It was a pleasure to work with it so far. ", "Hi @FabianSchuetze, Thanks for your help! That's really good progress, np, feel free to ask any more questions -- I don't know everything but I will try my best to help. MLIR has a huge activation energy so to speak but it's a pleasure once you get used to it, so it's great to see you were able to make progress.", "@pkgoogle : Thanks again for your help. I created a PR with a proposed solution. Maybe we can continue the discussion [there](https://github.com/tensorflow/tensorflow/pull/62605)" ]
2023-10-23T14:01:58
2023-12-09T17:21:30
null
NONE
null
null
null
### 1. System information Colab , as of 2023-10-23 ### 2. Code Please see the attached colab notebook here https://colab.research.google.com/drive/1yUD0nDu8oeeDtQBa7xCbQWx_w8PxS4UC?usp=sharing to reproduce the issue. It loads a pre-trained resnet18 from pytorch, converts it to onnx, converts it to tensorflow, and then exports it to tf-lite. ( The process is a bit convoluted, but I need a pretrained resnet18, and didn't find it in the tensorflow orbit so I used torchvision, hope that's ok.) If you download the generated model (model_int8.tflite) and open it in netron.app and click on the first MaxPool2D op, you can see that the quantization scale is ` 1.3344405750530544e+36 `. See the attached image. ![image](https://github.com/tensorflow/tensorflow/assets/10357496/60968bdd-ee50-48fd-9802-9b498ac619e4) This scale parameter itself is of course implausible (impossible), but loading the model also produces an error here: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/kernels/internal/quantization_util.cc#L117 Does anybody know why the quantization parameter is that high, and what can be done to fix it? Furthermore, can I let the quantization fails explicitly when it generates such high values?
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62196/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62196/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62195
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62195/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62195/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62195/events
https://github.com/tensorflow/tensorflow/issues/62195
1,956,522,718
I_kwDOArmXAs50nire
62,195
New
{ "login": "tommybunnzjr1986", "id": 131515194, "node_id": "U_kgDOB9bDOg", "avatar_url": "https://avatars.githubusercontent.com/u/131515194?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tommybunnzjr1986", "html_url": "https://github.com/tommybunnzjr1986", "followers_url": "https://api.github.com/users/tommybunnzjr1986/followers", "following_url": "https://api.github.com/users/tommybunnzjr1986/following{/other_user}", "gists_url": "https://api.github.com/users/tommybunnzjr1986/gists{/gist_id}", "starred_url": "https://api.github.com/users/tommybunnzjr1986/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tommybunnzjr1986/subscriptions", "organizations_url": "https://api.github.com/users/tommybunnzjr1986/orgs", "repos_url": "https://api.github.com/users/tommybunnzjr1986/repos", "events_url": "https://api.github.com/users/tommybunnzjr1986/events{/privacy}", "received_events_url": "https://api.github.com/users/tommybunnzjr1986/received_events", "type": "User", "site_admin": false }
[ { "id": 1593512946, "node_id": "MDU6TGFiZWwxNTkzNTEyOTQ2", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/invalid", "name": "invalid", "color": "db6f57", "default": true, "description": "Hacktoberfest spam PR" } ]
closed
true
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Complete spam" ]
2023-10-23T07:24:03
2023-10-23T11:01:24
2023-10-23T11:01:24
NONE
spam
null
null
**System information** - Android Device information (use `adb shell getprop ro.build.fingerprint` if possible): - TensorFlow Lite in Play Services SDK version (found in `build.gradle`): - Google Play Services version (`Settings` > `Apps` > `Google Play Services` > `App details`): **Standalone code to reproduce the issue** Provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to or attach code demonstrating the problem. **Any other info / logs** Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62195/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62195/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62194
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62194/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62194/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62194/events
https://github.com/tensorflow/tensorflow/issues/62194
1,956,464,127
I_kwDOArmXAs50nUX_
62,194
Loading cudNN in docker image where tensorflow is installed via pip returns `Error: libnvrtc.so: cannot open shared object file: No such file or directory`
{ "login": "maltel", "id": 3829974, "node_id": "MDQ6VXNlcjM4Mjk5NzQ=", "avatar_url": "https://avatars.githubusercontent.com/u/3829974?v=4", "gravatar_id": "", "url": "https://api.github.com/users/maltel", "html_url": "https://github.com/maltel", "followers_url": "https://api.github.com/users/maltel/followers", "following_url": "https://api.github.com/users/maltel/following{/other_user}", "gists_url": "https://api.github.com/users/maltel/gists{/gist_id}", "starred_url": "https://api.github.com/users/maltel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/maltel/subscriptions", "organizations_url": "https://api.github.com/users/maltel/orgs", "repos_url": "https://api.github.com/users/maltel/repos", "events_url": "https://api.github.com/users/maltel/events{/privacy}", "received_events_url": "https://api.github.com/users/maltel/received_events", "type": "User", "site_admin": false }
[ { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473173351, "node_id": "MDU6TGFiZWw0NzMxNzMzNTE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:build/install", "name": "type:build/install", "color": "159b2e", "default": false, "description": "Build and install issues" }, { "id": 1205615612, "node_id": "MDU6TGFiZWwxMjA1NjE1NjEy", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/subtype:%20ubuntu/linux", "name": "subtype: ubuntu/linux", "color": "b619ea", "default": false, "description": "Ubuntu/Linux Build/Installation Issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
open
false
{ "login": "angerson", "id": 32465472, "node_id": "MDQ6VXNlcjMyNDY1NDcy", "avatar_url": "https://avatars.githubusercontent.com/u/32465472?v=4", "gravatar_id": "", "url": "https://api.github.com/users/angerson", "html_url": "https://github.com/angerson", "followers_url": "https://api.github.com/users/angerson/followers", "following_url": "https://api.github.com/users/angerson/following{/other_user}", "gists_url": "https://api.github.com/users/angerson/gists{/gist_id}", "starred_url": "https://api.github.com/users/angerson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/angerson/subscriptions", "organizations_url": "https://api.github.com/users/angerson/orgs", "repos_url": "https://api.github.com/users/angerson/repos", "events_url": "https://api.github.com/users/angerson/events{/privacy}", "received_events_url": "https://api.github.com/users/angerson/received_events", "type": "User", "site_admin": false }
[ { "login": "angerson", "id": 32465472, "node_id": "MDQ6VXNlcjMyNDY1NDcy", "avatar_url": "https://avatars.githubusercontent.com/u/32465472?v=4", "gravatar_id": "", "url": "https://api.github.com/users/angerson", "html_url": "https://github.com/angerson", "followers_url": "https://api.github.com/users/angerson/followers", "following_url": "https://api.github.com/users/angerson/following{/other_user}", "gists_url": "https://api.github.com/users/angerson/gists{/gist_id}", "starred_url": "https://api.github.com/users/angerson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/angerson/subscriptions", "organizations_url": "https://api.github.com/users/angerson/orgs", "repos_url": "https://api.github.com/users/angerson/repos", "events_url": "https://api.github.com/users/angerson/events{/privacy}", "received_events_url": "https://api.github.com/users/angerson/received_events", "type": "User", "site_admin": false }, { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "I don't have a solution but just wanted to mention I'm having the same issue with a local install of tensorflow 2.14 via \"pip install tensorflow[and-cuda]\" on a Debian 12 machine. The solution does seem to be to system install CUDA, but that's not ideal like you say if tensorflow is supposed to be able to install CUDA on it's own. At the very least the current instructions on the [install tensorflow with pip page](https://www.tensorflow.org/install/pip) are not fully correct at the moment with this issue in place.", "Also seeing this issue. On a system with only the driver installed, `libnvrtc.so` can't be found. \r\n\r\nEdit: Just to add some additional details about my system:\r\nUbuntu 22.04 with nvidia driver 510 installed using the installer runfile. This is a secure environment that doesn't have access to the nvidia repositories. According to the [2.14.0 release notes](https://github.com/tensorflow/tensorflow/releases/tag/v2.14.0), this driver is all that should be required to install TensorFlow, but it doesn't work due to missing `libnvrtc.so`. \r\n\r\nInstalling CUDA toolkit manually (also using runfile installer) does fix the issue. So I suspect either the docs need updated to say there are additional dependencies or this is a bug where `nvrtc` is not being installed correctly. ", "@maltel It seems like NVIDIA compiler runtime (NVRTC) is not installed in your Docker image.\r\nTo install the prebuilt image, run the following command:\r\n```\r\ndocker pull tensorflow/tensorflow:latest-gpu\r\n```\r\nPlease let us know if it helps?\r\nThank you!", "Same issue on WSL2 Ubuntu 22.04 on Windows 10 using installation with `python3 -m pip install tensorflow[and-cuda]`\r\n\r\nOn WSL2 Ubuntu 20.04, after upgrading python to 3.10 I did not have this issue on the same Window 10 computer.\r\n\r\n", "@lightroomstatistics Thank you for your response here!\r\nCould you please file a new ticket for the issue you are facing?\r\nThank you!", "@sushreebarsa I am not using the tensorflow docker image, I am using a custom one (See dockerfile above) so I am not sure pulling the tensorflow docker image is useful. Besides, based on the other comments here it seems like its not an issue with docker, but rather an issue with Ubuntu when only the driver installed.\r\n\r\nI don't know what a new ticket is. Is it the same as a new issue? :-) ", "@maltel \r\nThanks for your above comment.\r\nSorry for the mistake! I was asking @lightroomstatistics to create a new ticket for WSL2 issue. \r\nWe will dig more into your issue and get back to you soon. Thank you!", "@maltel Could you try to install NVRTC manually. This can be done by adding the following lines to your Dockerfile:\r\n```\r\nRUN apt-get update && apt-get install -y nvrtc\r\n```\r\n@sachinprasadhs Could you please have a look into this issue!\r\nThank you!", "@sushreebarsa I tried installing it manually, but was not successful unfortunately. The package was not found, this is the output;\r\n\r\n```\r\nHit:1 http://archive.ubuntu.com/ubuntu jammy InRelease\r\nHit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease\r\nHit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease\r\nHit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease\r\nReading package lists... Done\r\nReading package lists... Done\r\nBuilding dependency tree... Done\r\nReading state information... Done\r\nE: Unable to locate package nvrtc\r\n```\r\n\r\nAm I doing something wrong?\r\n\r\nI found a package called libnvrtc11.2, but it is not the correct version I believe... At least it didnt solve the issue. https://packages.debian.org/bullseye/libs/libnvrtc11.2", "There are several different things going on in this issue's comment history. As to the latter part, the `nvrtc` package is actually called `cuda-nvrtc-X-Y` for whichever specific CUDA X.Y you have (see e.g. https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ ). Regarding the original post, the loading of libnvrtc.so instead of libnvrtc.so.XX (via its SONAME) was a bug in that particular build of cuDNN -- this probably will mean you need not only the cuda-nvrtc-11-8 package but also cuda-nvrtc-dev-11-8, so that the libnvrtc.so symlink is made available.\r\nHTH", "@nkinnaird - for https://github.com/tensorflow/tensorflow/issues/62194#issuecomment-1781418833 , you might want to see https://github.com/tensorflow/tensorflow/issues/61986 . I think your issue is more likely related to that one than to this one.", "Thanks for the reply @cliffwoolley! Does that mean there is no way of installing tensorflow and cuda dependencies through pip only for that particular version? (If the TF team doesn't add the cuda-nvrtc-dev-11-8 package?)", "Based on the comments in ticket #61986 I tried the command mentioned there: \r\n`python3 -m pip install \"tensorflow[and-cuda]==2.15\" --extra-index-url https://pypi.nvidia.com` \r\nand my error `Could not load library libcudnn_cnn_infer.so.8. Error: libnvrtc.so: cannot open shared object file: No such file or directory` didn't occur. So far so good.\r\n\r\nMy steps:\r\n\r\n1. Complete new WSL2 image\r\n2. sudo apt update\r\n3. sudo apt upgrade\r\n4. sudo apt install python3-pip\r\n5. python3 -m pip install --upgrade pip\r\n6. python3 -m pip install \"tensorflow[and-cuda]==2.15\" --extra-index-url https://pypi.nvidia.com\r\n7. pip install --ignore-installed --no-cache-dir -r requirements_win.txt\r\n8. ran my keras / tensorflow / mflow interference model" ]
2023-10-23T06:43:35
2023-11-25T10:27:19
null
NONE
null
null
null
### Issue type Build/Install ### Have you reproduced the bug with TensorFlow Nightly? No ### Source binary ### TensorFlow version 2.14.0 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04 ### Mobile device _No response_ ### Python version 3.10 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8/8.7 ### GPU model and memory NVIDIA L40, 46BG ### Current behavior? We are building a Docker image that is running an Ubuntu 22.04. The host machine is also Ubuntu 22.04. We have chosen to not use the prebuilt tensorflow Docker image. We are trying to install tensorflow via pip in the docker image, and at the first glance it seems to work, as `import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))` works perfectly fine and prints something along the lines of `tf.Tensor(-163.40398, shape=(), dtype=float32)`. However, when we try to load cudNN by running the keras `Model.train_on_batch` method we get the error `Could not load library libcudnn_cnn_infer.so.8. Error: libnvrtc.so: cannot open shared object file: No such file or directory`. Full stack trace is in the "Relevant log ouput" cell. If we install cuda in the docker image by running the following commands it works though. But we would prefer not installing cuda directly and only through pip. ``` apt-get install wget \ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin \ mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600 \ wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-ubuntu2204-11-8-local_11.8.0-520.61.05-1_amd64.deb \ dpkg -i cuda-repo-ubuntu2204-11-8-local_11.8.0-520.61.05-1_amd64.deb \ cp /var/cuda-repo-ubuntu2204-11-8-local/cuda-*-keyring.gpg /usr/share/keyrings/ \ apt-get update \ DEBIAN_FRONTEND=noninteractive apt-get -y install cuda \ echo "export PATH=${PATH}:/usr/local/cuda/bin" >> ~/.bashrc \ ``` `nvidia-smi` prints ``` +---------------------------------------------------------------------------------------+ | NVIDIA-SMI 535.104.12 Driver Version: 535.104.12 CUDA Version: 12.2 | |-----------------------------------------+----------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+======================+======================| | 0 NVIDIA L40 Off | 00000000:0B:00.0 Off | 0 | | N/A 37C P0 78W / 300W | 4MiB / 46068MiB | 3% Default | | | | N/A | +-----------------------------------------+----------------------+----------------------+ +---------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=======================================================================================| | No running processes found | +---------------------------------------------------------------------------------------+ ``` `pip freeze` gives us these dependencies (some dependencies stripped): ``` keras==2.14.0 keras-core==0.1.7 keras-cv==0.6.4 ... numpy==1.26.1 nvidia-cublas-cu11==11.11.3.6 nvidia-cuda-cupti-cu11==11.8.87 nvidia-cuda-nvcc-cu11==11.8.89 nvidia-cuda-runtime-cu11==11.8.89 nvidia-cudnn-cu11==8.7.0.84 nvidia-cufft-cu11==10.9.0.58 nvidia-curand-cu11==10.3.0.86 nvidia-cusolver-cu11==11.4.1.48 nvidia-cusparse-cu11==11.7.5.86 nvidia-nccl-cu11==2.16.5 ... tensorboard==2.14.1 tensorboard-data-server==0.7.1 tensorflow==2.14.0 tensorflow-datasets==4.9.3 tensorflow-estimator==2.14.0 tensorflow-io-gcs-filesystem==0.34.0 tensorflow-metadata==1.14.0 tensorrt==8.5.3.1 ``` To me it seems like installing tensorflow via `pip install tensorflow[and-cuda]==2.14.0` doesn't include the libnvrtc.so file? Or maybe it's some error related to keras? ### Standalone code to reproduce the issue ```shell Dockerfile: FROM ghcr.io/osgeo/gdal:ubuntu-small-3.7.2 ARG USE_GPU RUN apt-get update && apt-get install ca-certificates -y # Install python dependencies RUN apt install python3-pip -y RUN pip install pillow==10.1.0 transformers==4.33.3 imageio==2.31.1 scipy==1.11.1 geopandas==0.14.0 dtale==3.7.0 rasterio==1.3.9 rasterstats==0.19.0 psycopg2-binary==2.9.9 sqlalchemy==2.0.22 keras-cv==0.6.4 focal-loss==0.0.7 azure-storage-blob==12.18.3 RUN if [ "$USE_GPU" = "true" ]; then \ pip install tensorflow[and-cuda]==2.14.0; \ else \ pip install tensorflow==2.14.0; \ fi ``` ``` ### Relevant log output ```shell 2023-10-23 05:58:21.251995: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:9342] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered 2023-10-23 05:58:21.252097: E tensorflow/compiler/xla/stream_executor/cuda/cuda_fft.cc:609] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered 2023-10-23 05:58:21.252135: E tensorflow/compiler/xla/stream_executor/cuda/cuda_blas.cc:1518] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2023-10-23 05:58:21.259174: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. Using TensorFlow backend 2023-10-23 05:58:27.246915: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:894] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355 2023-10-23 05:58:27.284909: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:894] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355 2023-10-23 05:58:27.286183: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:894] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355 2023-10-23 05:58:27.298554: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55b5e53fd570 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2023-10-23 05:58:27.298575: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version 2023-10-23 05:58:27.298922: E ./tensorflow/compiler/xla/stream_executor/stream_executor_internal.h:124] SetPriority unimplemented for this stream. 2023-10-23 05:58:27.299033: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:894] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355 2023-10-23 05:58:27.300290: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:894] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355 2023-10-23 05:58:27.301475: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:894] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355 2023-10-23 05:58:27.447455: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:894] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355 2023-10-23 05:58:27.448893: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:894] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355 2023-10-23 05:58:27.450160: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:894] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355 2023-10-23 05:58:27.451404: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1886] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 43412 MB memory: -> device: 0, name: NVIDIA L40, pci bus id: 0000:0b:00.0, compute capability: 8.9 2023-10-23 05:58:27.453893: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55b5e5f86f60 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices: 2023-10-23 05:58:27.453916: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): NVIDIA L40, Compute Capability 8.9 learning_rate 0.001 2023-10-23 05:59:11.072927: I tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:442] Loaded cuDNN version 8700 Could not load library libcudnn_cnn_infer.so.8. Error: libnvrtc.so: cannot open shared object file: No such file or directory ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62194/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62194/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62193
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62193/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62193/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62193/events
https://github.com/tensorflow/tensorflow/issues/62193
1,955,898,736
I_kwDOArmXAs50lKVw
62,193
EfficientNet transfer learning - init with imagenet weights changes model
{ "login": "maksym33", "id": 39015826, "node_id": "MDQ6VXNlcjM5MDE1ODI2", "avatar_url": "https://avatars.githubusercontent.com/u/39015826?v=4", "gravatar_id": "", "url": "https://api.github.com/users/maksym33", "html_url": "https://github.com/maksym33", "followers_url": "https://api.github.com/users/maksym33/followers", "following_url": "https://api.github.com/users/maksym33/following{/other_user}", "gists_url": "https://api.github.com/users/maksym33/gists{/gist_id}", "starred_url": "https://api.github.com/users/maksym33/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/maksym33/subscriptions", "organizations_url": "https://api.github.com/users/maksym33/orgs", "repos_url": "https://api.github.com/users/maksym33/repos", "events_url": "https://api.github.com/users/maksym33/events{/privacy}", "received_events_url": "https://api.github.com/users/maksym33/received_events", "type": "User", "site_admin": false }
[ { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 1097546578, "node_id": "MDU6TGFiZWwxMDk3NTQ2NTc4", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:keras", "name": "comp:keras", "color": "0052cc", "default": false, "description": "Keras related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
open
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "@google-admin can you assign someone manually to this case? It seems the bot missed it after changing the title?", "@maksym33 ,\r\n\r\nApologies for the bug in auto-assignment.I have replicated the issue and confirm difference in outputs before and after reloading the model as per attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/85d9b42b4b87e101cc252bb1d8e9c39d/62193_efficientnet_bug.ipynb#scrollTo=CCzU08ac5Yey). Need to check the root cause. Thanks.", "@SuryanarayanaY no worries, for the root cause please see the efficient net building function, which adds additional rescaling layer for imagenet weights.\r\nSee original post for the GitHub link." ]
2023-10-22T13:16:25
2023-12-12T10:55:33
null
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source binary ### TensorFlow version 2.14 ### Custom code No ### OS platform and distribution Linux Ubuntu 22.04 ### Mobile device _No response_ ### Python version 3.10 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version 11.8 ### GPU model and memory _No response_ ### Current behavior? My current pipeline of: 1. Train a model using EfficientNet backbone with `weights="imagenet"` 2. Transfer a trained model **weights** to the prod environment 3. Initialize the production model with `weights=None` and load the previously learned weights 4. Compare the model's output between training and productions environment - **they are different** Obviously, I expected the outputs to be the same. After LOTS of investigation, I found the culprit which is NOT mentioned anywhere in the documentation: [github link](https://github.com/keras-team/keras/blob/68f9af408a1734704746f7e6fa9cfede0d6879d8/keras/applications/efficientnet.py#L359). Turns out, when the model is initialized with `weights="imagenet"` an additional rescaling layer is added. I understand the reason behind it (reproducing the Imagenet results) but the above situation proves how misleading the implementation is. _Why didn't I just save the whole model instead of transferring only the weights?_ Well, because the model is trained with mixed precision on a GPU and transferring it this way to a production env which uses a CPU would make it unusable (nans all around). _What I would expect ideally:_ The same model structure no matter which weights are loaded. _What I would expect to minimize the impact of this issue:_ When the weights are loaded to production model, the mismatch between number of layers is detected and a warning is raised. See test collab notebook with the code from below: [link](https://colab.research.google.com/drive/1M_VbMiH79elsPex08awkjDwIuvFBqOpC?usp=sharing ) ### Standalone code to reproduce the issue ```shell import tensorflow as tf import numpy as np from keras.applications.efficientnet import EfficientNetB3, preprocess_input img_shape = (300,300,3) x = np.ones((1,) + img_shape)*255 trained_model = EfficientNetB3(weights="imagenet", include_top=False, input_shape=img_shape) trained_model.save_weights("weights.h5") prod_model = EfficientNetB3(weights=None, include_top=False, input_shape=img_shape) prod_model.load_weights("weights.h5") y_trained = trained_model.predict(preprocess_input(x), verbose=0)[0,:2,:2,:2] y_prod = prod_model.predict(preprocess_input(x), verbose=0)[0,:2,:2,:2] print(f"Trained model output (initialized with imagenet weights):\n{y_trained}") print(f"Production model output (initialized with 'None' weights):\n{y_prod}") ``` ### Relevant log output ```shell Trained model output (initialized with imagenet weights): [[[-0.27523986 -0.25020567] [-0.26998693 -0.27772853]] [[-0.2728562 -0.27376127] [-0.24821427 -0.23993279]]] Production model output (initialized with 'None' weights): [[[-0.2746129 0.89038897] [-0.25032952 0.1611695 ]] [[-0.1986168 0.0976367 ] [-0.17414406 -0.26978934]]] ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62193/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62193/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62192
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62192/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62192/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62192/events
https://github.com/tensorflow/tensorflow/issues/62192
1,955,523,043
I_kwDOArmXAs50junj
62,192
tf.keras.Model with nested dictionary inputs fails to serialize/deserialize
{ "login": "burnpanck", "id": 1310437, "node_id": "MDQ6VXNlcjEzMTA0Mzc=", "avatar_url": "https://avatars.githubusercontent.com/u/1310437?v=4", "gravatar_id": "", "url": "https://api.github.com/users/burnpanck", "html_url": "https://github.com/burnpanck", "followers_url": "https://api.github.com/users/burnpanck/followers", "following_url": "https://api.github.com/users/burnpanck/following{/other_user}", "gists_url": "https://api.github.com/users/burnpanck/gists{/gist_id}", "starred_url": "https://api.github.com/users/burnpanck/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/burnpanck/subscriptions", "organizations_url": "https://api.github.com/users/burnpanck/orgs", "repos_url": "https://api.github.com/users/burnpanck/repos", "events_url": "https://api.github.com/users/burnpanck/events{/privacy}", "received_events_url": "https://api.github.com/users/burnpanck/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097546578, "node_id": "MDU6TGFiZWwxMDk3NTQ2NTc4", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:keras", "name": "comp:keras", "color": "0052cc", "default": false, "description": "Keras related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "@burnpanck,\r\nThank you for reporting the issue. We are currently investigating the issue, and I kindly request some time to thoroughly analyze the problem in order to offer a resolution. Thank you!", "@sachinprasadhs,\r\nI was able to reproduce the issue on tensorflow v2.14, v2.13 and [tf-nightly](https://colab.research.google.com/gist/tilakrayal/ce17db0b619e5197b6c526dcfa819c10/untitled1464.ipynb). Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/2ad827cca47992b6e5c756b92d395c43/untitled1465.ipynb).", "Hi,\r\n\r\nGoing forward `Keras` with the new multi backend support in `Keras 3` it will no longer support deeply nested inputs/outputs more than 1 level in `Model()`.\r\n\r\nYou would have to provide the inputs/outputs in the same level as shown below.\r\n\r\n```python\r\nimport tensorflow as tf\r\n\r\[email protected]_keras_serializable(package=\"MyPackage\")\r\nclass DummyModel(tf.keras.Model):\r\n def __init__(self, name=None):\r\n super().__init__(name=name)\r\n self.sublayer = tf.keras.layers.Dense(16)\r\n def call(self, x, **kw):\r\n a = x[\"a\"]\r\n b = x[\"b\"]\r\n c = x[\"c\"]\r\n return self.sublayer(tf.concat([a,b,c], axis=-1))\r\n\r\nmodel = DummyModel()\r\nout = model(dict(\r\n a = tf.keras.Input(3,dtype=tf.float32),\r\n b = tf.keras.Input(4,dtype=tf.float32),\r\n c = tf.keras.Input(5,dtype=tf.float32),\r\n )\r\n)\r\nmodel.summary()\r\n\r\nmodel.save(\"temp.keras\")\r\n\r\ntf.keras.saving.load_model(\"temp.keras\")\r\n```", "What a pity. Given that one can always create a wrapper around model calls that serialises and deserialises nested dicts into a flat dict or even a list, obviously there is no fundamental reason why this could not be supported. In fact, if I remember correctly, that's what I did during TF 1 days. It's just that now, we have to again decide between writing lots of unnecessary boiler-plate or having non-expressive APIs.\r\nWhere do I post a feature request for TF 3?", "For `Keras 3` you can post the issue in https://github.com/keras-team/keras/issues and close the issue here. \r\n", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62192\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62192\">No</a>\n", "Ok, if TF really doesn't want to support nested dictionaries in some or all of their APIs, then that should be documented, and ideally it should produce actionable error messages. Right now, the TF documentation explicitly states that the `.keras` format is the chosen method, but it doesn't support all features previous formats did. So this is a breaking change, and should be documented very explicitly. I thus don't think that this issue can be closed, whether or not the feature is going to be supported. It is either an implementation bug or a documentation bug.", "It is documented here and it will be available in keras.io soon.\r\n\r\nhttps://github.com/keras-team/keras-io/blob/be3791ecde06d8bae22c885868983ddaf1af2cd7/guides/migrate_to_keras_3.py#L203-L245", "Ok, that makes sense - thanks for pointer." ]
2023-10-21T14:50:57
2023-11-21T15:53:43
2023-11-18T01:48:34
NONE
null
null
null
Info: - Issue type: **Bug** - Have you reproduced the bug with TensorFlow Nightly? No - Source: binary - TensorFlow version: 2.14.0 - Custom code: No - OS platform and distribution: macOS 13.6 - Python version: 3.11 - CUDA/cuDNN version: none ### Current behavior? When trying to serialize/deserialize a `tf.keras.Model` nested input shapes cause an error. Note that this has been observed many years back in #37061, which was closed because their MVP included a `tf.keras.Sequential` which was deemed as not supported. However, the issue has nothing to do with `tf.keras.Sequential` at all, and instead lies purely in the deserialisation code of keras. ### Standalone code to reproduce the issue ```shell import tensorflow as tf @tf.keras.saving.register_keras_serializable(package="MyPackage") class DummyModel(tf.keras.Model): def __init__(self, name=None): super().__init__(name=name) self.sublayer = tf.keras.layers.Dense(16) def call(self, x, **kw): a = x["a"] nested = x["nested"] b = nested["b"] c = nested["c"] return self.sublayer(tf.concat([a,b,c], axis=-1)) model = DummyModel() out = model(dict( a = tf.keras.Input(3,dtype=tf.float32), nested = dict( b = tf.keras.Input(4,dtype=tf.float32), c = tf.keras.Input(5,dtype=tf.float32), ), )) model.summary() model.save("temp.keras") tf.keras.saving.load_model("temp.keras") ``` ### Relevant log output ```shell --------------------------------------------------------------------------- TypeError Traceback (most recent call last) File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tensorflow/python/framework/tensor_shape.py:851, in TensorShape.__init__(self, dims) 850 try: --> 851 self._dims.append(as_dimension(d).value) 852 except TypeError as e: File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tensorflow/python/framework/tensor_shape.py:741, in as_dimension(value) 740 else: --> 741 return Dimension(value) File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tensorflow/python/framework/tensor_shape.py:217, in Dimension.__init__(self, value) 216 except AttributeError: --> 217 raise TypeError( 218 "Dimension value must be integer or None or have " 219 "an __index__ method, got value '{0!r}' with type '{1!r}'".format( 220 value, type(value))) from None 221 if self._value < 0: TypeError: Dimension value must be integer or None or have an __index__ method, got value ''b'' with type '<class 'str'>' The above exception was the direct cause of the following exception: TypeError Traceback (most recent call last) File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tensorflow/python/eager/execute.py:204, in make_shape(v, arg_name) 203 try: --> 204 shape = tensor_shape.as_shape(v) 205 except TypeError as e: File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tensorflow/python/framework/tensor_shape.py:1526, in as_shape(shape) 1525 else: -> 1526 return TensorShape(shape) File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tensorflow/python/framework/tensor_shape.py:853, in TensorShape.__init__(self, dims) 852 except TypeError as e: --> 853 raise TypeError( 854 "Failed to convert '{0!r}' to a shape: '{1!r}'" 855 "could not be converted to a dimension. A shape should " 856 "either be single dimension (e.g. 10), or an iterable of " 857 "dimensions (e.g. [1, 10, None]).".format(dims, d)) from e 858 self._dims = tuple(self._dims) TypeError: Failed to convert '{'b': [None, 4], 'c': [None, 5]}' to a shape: ''b''could not be converted to a dimension. A shape should either be single dimension (e.g. 10), or an iterable of dimensions (e.g. [1, 10, None]). During handling of the above exception, another exception occurred: TypeError Traceback (most recent call last) Cell In[6], line 1 ----> 1 tf.keras.saving.load_model("temp.keras") File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/keras/src/saving/saving_api.py:254, in load_model(filepath, custom_objects, compile, safe_mode, **kwargs) 249 if kwargs: 250 raise ValueError( 251 "The following argument(s) are not supported " 252 f"with the native Keras format: {list(kwargs.keys())}" 253 ) --> 254 return saving_lib.load_model( 255 filepath, 256 custom_objects=custom_objects, 257 compile=compile, 258 safe_mode=safe_mode, 259 ) 261 # Legacy case. 262 return legacy_sm_saving_lib.load_model( 263 filepath, custom_objects=custom_objects, compile=compile, **kwargs 264 ) File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/keras/src/saving/saving_lib.py:281, in load_model(filepath, custom_objects, compile, safe_mode) 278 asset_store.close() 280 except Exception as e: --> 281 raise e 282 else: 283 return model File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/keras/src/saving/saving_lib.py:246, in load_model(filepath, custom_objects, compile, safe_mode) 244 # Construct the model from the configuration file in the archive. 245 with ObjectSharingScope(): --> 246 model = deserialize_keras_object( 247 config_dict, custom_objects, safe_mode=safe_mode 248 ) 250 all_filenames = zf.namelist() 251 if _VARS_FNAME + ".h5" in all_filenames: File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/keras/src/saving/serialization_lib.py:731, in deserialize_keras_object(config, custom_objects, safe_mode, **kwargs) 729 build_config = config.get("build_config", None) 730 if build_config: --> 731 instance.build_from_config(build_config) 732 compile_config = config.get("compile_config", None) 733 if compile_config: File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/keras/src/engine/base_layer.py:2331, in Layer.build_from_config(self, config) 2329 input_shape = config["input_shape"] 2330 if input_shape is not None: -> 2331 self.build(input_shape) File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/keras/src/engine/training.py:494, in Model.build(self, input_shape) 489 x = [ 490 base_layer_utils.generate_placeholders_from_shape(shape) 491 for shape in input_shape 492 ] 493 elif isinstance(input_shape, dict): --> 494 x = { 495 k: base_layer_utils.generate_placeholders_from_shape( 496 shape 497 ) 498 for k, shape in input_shape.items() 499 } 500 else: 501 x = base_layer_utils.generate_placeholders_from_shape( 502 input_shape 503 ) File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/keras/src/engine/training.py:495, in <dictcomp>(.0) 489 x = [ 490 base_layer_utils.generate_placeholders_from_shape(shape) 491 for shape in input_shape 492 ] 493 elif isinstance(input_shape, dict): 494 x = { --> 495 k: base_layer_utils.generate_placeholders_from_shape( 496 shape 497 ) 498 for k, shape in input_shape.items() 499 } 500 else: 501 x = base_layer_utils.generate_placeholders_from_shape( 502 input_shape 503 ) File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/keras/src/engine/base_layer_utils.py:189, in generate_placeholders_from_shape(shape) 188 def generate_placeholders_from_shape(shape): --> 189 return tf1.placeholder(shape=shape, dtype=backend.floatx()) File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tensorflow/python/ops/array_ops.py:3283, in placeholder(dtype, shape, name) 3279 if context.executing_eagerly(): 3280 raise RuntimeError("tf.placeholder() is not compatible with " 3281 "eager execution.") -> 3283 return gen_array_ops.placeholder(dtype=dtype, shape=shape, name=name) File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tensorflow/python/ops/gen_array_ops.py:7071, in placeholder(dtype, shape, name) 7069 if shape is None: 7070 shape = None -> 7071 shape = _execute.make_shape(shape, "shape") 7072 _, _, _op, _outputs = _op_def_library._apply_op_helper( 7073 "Placeholder", dtype=dtype, shape=shape, name=name) 7074 _result = _outputs[:] File ~/.pyenv/versions/3.11.3/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tensorflow/python/eager/execute.py:206, in make_shape(v, arg_name) 204 shape = tensor_shape.as_shape(v) 205 except TypeError as e: --> 206 raise TypeError("Error converting %s to a TensorShape: %s." % (arg_name, e)) 207 except ValueError as e: 208 raise ValueError("Error converting %s to a TensorShape: %s." % 209 (arg_name, e)) TypeError: Error converting shape to a TensorShape: Failed to convert '{'b': [None, 4], 'c': [None, 5]}' to a shape: ''b''could not be converted to a dimension. A shape should either be single dimension (e.g. 10), or an iterable of dimensions (e.g. [1, 10, None]).. ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62192/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62192/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62191
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62191/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62191/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62191/events
https://github.com/tensorflow/tensorflow/issues/62191
1,955,213,076
I_kwDOArmXAs50ii8U
62,191
tf.strings.to_number cannot convert positive integers prefixed with "+" when out_type is tf.int32 or tf.int64
{ "login": "sapphire008", "id": 3713023, "node_id": "MDQ6VXNlcjM3MTMwMjM=", "avatar_url": "https://avatars.githubusercontent.com/u/3713023?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sapphire008", "html_url": "https://github.com/sapphire008", "followers_url": "https://api.github.com/users/sapphire008/followers", "following_url": "https://api.github.com/users/sapphire008/following{/other_user}", "gists_url": "https://api.github.com/users/sapphire008/gists{/gist_id}", "starred_url": "https://api.github.com/users/sapphire008/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sapphire008/subscriptions", "organizations_url": "https://api.github.com/users/sapphire008/orgs", "repos_url": "https://api.github.com/users/sapphire008/repos", "events_url": "https://api.github.com/users/sapphire008/events{/privacy}", "received_events_url": "https://api.github.com/users/sapphire008/received_events", "type": "User", "site_admin": false }
[ { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5922361893, "node_id": "LA_kwDOArmXAs8AAAABYQASJQ", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF2.14", "name": "TF2.14", "color": "b60205", "default": false, "description": "For issues related to Tensorflow 2.14.x" } ]
open
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @sapphire008 ,\r\n\r\nI have replicated the reported behaviour in tf-nightly and attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/1353285f9ddac2e974e5de832752b68b/62191.ipynb) here for reference.\r\n\r\nWe will look into it and update you. Thanks!", "I have fixed the issue on local environment, but I can't open a PR on tsl repo since \"An owner of this repository has limited the ability to open a pull request to users that are collaborators on this repository\".\r\nHere is the fix https://github.com/google/tsl/compare/main...fsx950223:tsl:main." ]
2023-10-21T01:55:21
2023-10-24T08:00:01
null
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? No ### Source source ### TensorFlow version tf 2.11.0, 2.13.0, 2.14.0 ### Custom code Yes ### OS platform and distribution MacOS 13.1 ### Mobile device Macbook Pro ### Python version 3.10.6 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? Converting string to numbers with "+" throws errors in TF 2.11.0, 2.13.0, 2.14.0 when `out_type=tf.int64` or `out_type=tf.in32`. Not expecting error to be thrown and strings can be correctly converted into integers. For example, I would like to parse timezone information from a string (using substring) ```python t = tf.constant([ "2023-05-07 17:32:25-08:00", # utc: next day "2023-05-07 05:32:25+11:00", # utc: previous day "2023-05-07 05:32:25-08:00", # utc: same date "2023-02-29 23:32:15-04:00", # leap year ] ) ``` ### Standalone code to reproduce the issue ```shell Code to reproduce import tensorflow # these are all okay tf.string.to_number(tf.constant("-11"), out_type=tf.int64) tf.string.to_number(tf.constant("11"), out_type=tf.int64) tf.string.to_number(tf.constant("+11"), out_type=tf.float32) # this throws the error below tf.strings.to_number(tf.constant("+11"), out_type=tf.int64) ``` ### Relevant log output ```shell Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/edward/opt/miniforge3/envs/testtf214/lib/python3.10/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/Users/edward/opt/miniforge3/envs/testtf214/lib/python3.10/site-packages/tensorflow/python/framework/ops.py", line 5888, in raise_from_not_ok_status raise core._status_to_exception(e) from None # pylint: disable=protected-access tensorflow.python.framework.errors_impl.InvalidArgumentError: {{function_node __wrapped__StringToNumber_device_/job:localhost/replica:0/task:0/device:CPU:0}} StringToNumberOp could not correctly convert string: +11 [Op:StringToNumber] name: ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62191/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 1, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62191/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62190
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62190/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62190/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62190/events
https://github.com/tensorflow/tensorflow/pull/62190
1,955,108,302
PR_kwDOArmXAs5dbP8l
62,190
[TOSA] Add legalize stateful pass to TOSA
{ "login": "Jerry-Ge", "id": 24451859, "node_id": "MDQ6VXNlcjI0NDUxODU5", "avatar_url": "https://avatars.githubusercontent.com/u/24451859?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Jerry-Ge", "html_url": "https://github.com/Jerry-Ge", "followers_url": "https://api.github.com/users/Jerry-Ge/followers", "following_url": "https://api.github.com/users/Jerry-Ge/following{/other_user}", "gists_url": "https://api.github.com/users/Jerry-Ge/gists{/gist_id}", "starred_url": "https://api.github.com/users/Jerry-Ge/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Jerry-Ge/subscriptions", "organizations_url": "https://api.github.com/users/Jerry-Ge/orgs", "repos_url": "https://api.github.com/users/Jerry-Ge/repos", "events_url": "https://api.github.com/users/Jerry-Ge/events{/privacy}", "received_events_url": "https://api.github.com/users/Jerry-Ge/received_events", "type": "User", "site_admin": false }
[ { "id": 390482148, "node_id": "MDU6TGFiZWwzOTA0ODIxNDg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/awaiting%20review", "name": "awaiting review", "color": "bc3869", "default": false, "description": "Pull request awaiting review" }, { "id": 987666414, "node_id": "MDU6TGFiZWw5ODc2NjY0MTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/ready%20to%20pull", "name": "ready to pull", "color": "2cd643", "default": false, "description": "PR ready for merge process" }, { "id": 1169365682, "node_id": "MDU6TGFiZWwxMTY5MzY1Njgy", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/size:L", "name": "size:L", "color": "adafea", "default": false, "description": "CL Change Size: Large" } ]
closed
false
{ "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false }
[ { "login": "gbaned", "id": 48215717, "node_id": "MDQ6VXNlcjQ4MjE1NzE3", "avatar_url": "https://avatars.githubusercontent.com/u/48215717?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gbaned", "html_url": "https://github.com/gbaned", "followers_url": "https://api.github.com/users/gbaned/followers", "following_url": "https://api.github.com/users/gbaned/following{/other_user}", "gists_url": "https://api.github.com/users/gbaned/gists{/gist_id}", "starred_url": "https://api.github.com/users/gbaned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gbaned/subscriptions", "organizations_url": "https://api.github.com/users/gbaned/orgs", "repos_url": "https://api.github.com/users/gbaned/repos", "events_url": "https://api.github.com/users/gbaned/events{/privacy}", "received_events_url": "https://api.github.com/users/gbaned/received_events", "type": "User", "site_admin": false } ]
null
[]
2023-10-20T23:06:09
2023-11-10T13:20:40
2023-11-10T13:20:40
CONTRIBUTOR
null
false
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/pulls/62190", "html_url": "https://github.com/tensorflow/tensorflow/pull/62190", "diff_url": "https://github.com/tensorflow/tensorflow/pull/62190.diff", "patch_url": "https://github.com/tensorflow/tensorflow/pull/62190.patch", "merged_at": "2023-11-10T13:20:40" }
Handle the TFL Variable operators in a separate module level pass since the existing tfl-to-tosa pass is a function pass. TFL::VarHandleOp is mapped to TOSA::VariableOp TFL::AssignVariableOp is mapped to TOSA::VariableWriteOp TFL::ReadVariableOp is mapped to TOSA::VariableReadOp
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62190/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62190/timeline
null
null
true
https://api.github.com/repos/tensorflow/tensorflow/issues/62189
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62189/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62189/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62189/events
https://github.com/tensorflow/tensorflow/issues/62189
1,954,930,019
I_kwDOArmXAs50hd1j
62,189
Could not find a version that satisfies the requirement tf-nightly (from versions: none) when install with pip
{ "login": "PurvangL", "id": 104454645, "node_id": "U_kgDOBjnZ9Q", "avatar_url": "https://avatars.githubusercontent.com/u/104454645?v=4", "gravatar_id": "", "url": "https://api.github.com/users/PurvangL", "html_url": "https://github.com/PurvangL", "followers_url": "https://api.github.com/users/PurvangL/followers", "following_url": "https://api.github.com/users/PurvangL/following{/other_user}", "gists_url": "https://api.github.com/users/PurvangL/gists{/gist_id}", "starred_url": "https://api.github.com/users/PurvangL/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/PurvangL/subscriptions", "organizations_url": "https://api.github.com/users/PurvangL/orgs", "repos_url": "https://api.github.com/users/PurvangL/repos", "events_url": "https://api.github.com/users/PurvangL/events{/privacy}", "received_events_url": "https://api.github.com/users/PurvangL/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473184161, "node_id": "MDU6TGFiZWw0NzMxODQxNjE=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:support", "name": "type:support", "color": "159b2e", "default": false, "description": "Support issues" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" } ]
closed
false
{ "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false }
[ { "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false } ]
null
[ "Python 3.8 is no longer supported which is why there are no matching versions available. Please use Python 3.9, 3.10 or 3.11.", "Thanks @elfringham , like he said 3.8 is not supported.\r\nYou are likely only getting this error now because the last 90 nightlies are stored on pypi which means the last build that supported 3.8 was likely removed. ", "@PurvangL This issue generally occurs when the version mismatch happens. Python 3.8 is not actively supported so please use 3.9 or later. Please have a look at this reference https://www.tensorflow.org/install/source\r\nThank you!", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62189\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62189\">No</a>\n", "I got the same problem with python3.9, why?" ]
2023-10-20T19:48:55
2024-05-13T08:07:17
2023-11-18T01:48:36
NONE
null
null
null
Please go to Stack Overflow for help and support: https://stackoverflow.com/questions/tagged/tensorflow If you open a GitHub issue, here is our policy: 1. It must be a bug, a feature request, or a significant problem with the documentation (for small docs fixes please send a PR instead). 2. The form below must be filled out. 3. It shouldn't be a TensorBoard issue. Those go [here](https://github.com/tensorflow/tensorboard/issues). **Here's why we have that policy**: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow. ------------------------ ### System information - **Have I written custom code (as opposed to using a stock example script provided in TensorFlow)**: No - **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Linux Ubuntu 20.04 - **Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on a mobile device**: - **TensorFlow installed from (source or binary)**: Binary - **TensorFlow version (use command below)**: tf-nightly - **Python version**: 3.8.10 - **Bazel version (if compiling from source)**: - **GCC/Compiler version (if compiling from source)**: - **CUDA/cuDNN version**: 12.0/8.8.1.3-1+cuda12.0 - **GPU model and memory**: H100 - **Exact command to reproduce**: pip install tf-nightly python -m pip install tf-nightly But none works ``` Defaulting to user installation because normal site-packages is not writeable ERROR: Could not find a version that satisfies the requirement tf-nightly (from versions: none) ERROR: No matching distribution found for tf-nightly WARNING: There was an error checking the latest version of pip. ``` You can collect some of this information using our environment capture script: https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh You can obtain the TensorFlow version with: ```bash python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)" ``` ### Describe the problem Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request. ### Source code / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62189/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62189/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62188
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62188/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62188/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62188/events
https://github.com/tensorflow/tensorflow/issues/62188
1,954,635,021
I_kwDOArmXAs50gV0N
62,188
can't install @tensorflow/tf-node on npm
{ "login": "h312ry", "id": 85969639, "node_id": "MDQ6VXNlcjg1OTY5NjM5", "avatar_url": "https://avatars.githubusercontent.com/u/85969639?v=4", "gravatar_id": "", "url": "https://api.github.com/users/h312ry", "html_url": "https://github.com/h312ry", "followers_url": "https://api.github.com/users/h312ry/followers", "following_url": "https://api.github.com/users/h312ry/following{/other_user}", "gists_url": "https://api.github.com/users/h312ry/gists{/gist_id}", "starred_url": "https://api.github.com/users/h312ry/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/h312ry/subscriptions", "organizations_url": "https://api.github.com/users/h312ry/orgs", "repos_url": "https://api.github.com/users/h312ry/repos", "events_url": "https://api.github.com/users/h312ry/events{/privacy}", "received_events_url": "https://api.github.com/users/h312ry/received_events", "type": "User", "site_admin": false }
[]
closed
false
null
[]
null
[ "This should be in tensorflow-js repository, not here" ]
2023-10-20T16:23:26
2023-10-22T20:08:08
2023-10-22T20:08:08
NONE
null
null
null
please help. i can't install @tensorflow/tf-node on my project node.js i have python 3.12, node.js 18 and npm ver. 10.2.1 but i can install @tensorflow/tfjs this is the error: npm WARN cleanup Failed to remove some directories [ npm WARN cleanup [ npm WARN cleanup 'D:\\xampp8\\htdocs\\testnodejs\\node_modules\\@mapbox', npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'D:\xampp8\htdocs\testnodejs\node_modules\@mapbox\node-pre-gyp\node_modules\agent-base'] { npm WARN cleanup errno: -4048, npm WARN cleanup code: 'EPERM', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: 'D:\\xampp8\\htdocs\\testnodejs\\node_modules\\@mapbox\\node-pre-gyp\\node_modules\\agent-base' npm WARN cleanup } npm WARN cleanup ] npm WARN cleanup ] npm ERR! code 1 npm ERR! path D:\xampp8\htdocs\testnodejs\node_modules\@tensorflow\tfjs-node npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/install.js npm ERR! CPU-windows-4.12.0.zip npm ERR! https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-2.9.1.zip npm ERR! node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp install --fallback-to-build npm ERR! node-pre-gyp info it worked if it ends with ok npm ERR! node-pre-gyp info using [email protected] npm ERR! node-pre-gyp info using [email protected] | win32 | x64 npm ERR! node-pre-gyp info check checked for "D:\xampp8\htdocs\testnodejs\node_modules\@tensorflow\tfjs-node\lib\napi-v8\tfjs_binding.node" (not found) npm ERR! node-pre-gyp http GET https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v8/4.12.0/CPU-windows-4.12.0.zip npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v8/4.12.0/CPU-windows-4.12.0.zip npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @tensorflow/[email protected] and [email protected] (node-v108 ABI, unknown) (falling back to source compile with node-gyp) npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v8/4.12.0/CPU-windows-4.12.0.zip npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using [email protected] npm ERR! gyp info using [email protected] | win32 | x64 npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using [email protected] npm ERR! gyp info using [email protected] | win32 | x64 npm ERR! gyp info find Python using Python version 3.12.0 found at "C:\Program Files\Python312\python.exe" npm ERR! gyp http GET https://nodejs.org/download/release/v18.18.2/node-v18.18.2-headers.tar.gz npm ERR! gyp http 200 https://nodejs.org/download/release/v18.18.2/node-v18.18.2-headers.tar.gz npm ERR! gyp http GET https://nodejs.org/download/release/v18.18.2/SHASUMS256.txt npm ERR! gyp http GET https://nodejs.org/download/release/v18.18.2/win-x64/node.lib npm ERR! gyp http 200 https://nodejs.org/download/release/v18.18.2/SHASUMS256.txt npm ERR! gyp http 200 https://nodejs.org/download/release/v18.18.2/win-x64/node.lib npm ERR! gyp info find VS using VS2022 (17.7.34202.233) found at: npm ERR! gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" npm ERR! gyp info find VS run with --verbose for detailed information npm ERR! gyp info spawn C:\Program Files\Python312\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'C:\\Users\\User\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'msvs', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'D:\\xampp8\\htdocs\\testnodejs\\node_modules\\@tensorflow\\tfjs-node\\build\\config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\\Users\\User\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\\Users\\User\\AppData\\Local\\node-gyp\\Cache\\18.18.2\\include\\node\\common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=C:\\Users\\User\\AppData\\Local\\node-gyp\\Cache\\18.18.2', npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\User\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\User\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\18.18.2\\\\<(target_arch)\\\\node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=D:\\xampp8\\htdocs\\testnodejs\\node_modules\\@tensorflow\\tfjs-node',npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'D:\\xampp8\\htdocs\\testnodejs\\node_modules\\@tensorflow\\tfjs-node\\build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! Traceback (most recent call last): npm ERR! File "C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 42, in <module> npm ERR! import gyp # noqa: E402 npm ERR! ^^^^^^^^^^ npm ERR! File "C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 9, in <module> npm ERR! import gyp.input npm ERR! File "C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 19, in <module> npm ERR! from distutils.version import StrictVersion npm ERR! ModuleNotFoundError: No module named 'distutils' npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onCpExit (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:325:16) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:517:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:292:12) npm ERR! gyp ERR! System Windows_NT 10.0.19045 npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\User\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=D:\\xampp8\\htdocs\\testnodejs\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v8\\tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=D:\\xampp8\\htdocs\\testnodejs\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v8" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=8" "--node_napi_label=napi-v8" npm ERR! gyp ERR! cwd D:\xampp8\htdocs\testnodejs\node_modules\@tensorflow\tfjs-node npm ERR! gyp ERR! node -v v18.18.2 npm ERR! gyp ERR! node-gyp -v v9.4.0 npm ERR! gyp ERR! not ok npm ERR! node-pre-gyp ERR! build error npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=D:\xampp8\htdocs\testnodejs\node_modules\@tensorflow\tfjs-node\lib\napi-v8\tfjs_binding.node --module_name=tfjs_binding --module_path=D:\xampp8\htdocs\testnodejs\node_modules\@tensorflow\tfjs-node\lib\napi-v8 --napi_version=9 --node_abi_napi=napi --napi_build_version=8 --node_napi_label=napi-v8' (1) npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (D:\xampp8\htdocs\testnodejs\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23) npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:517:28) npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1098:16) npm ERR! node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:303:5) npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19045 npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\xampp8\\htdocs\\testnodejs\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" npm ERR! node-pre-gyp ERR! cwd D:\xampp8\htdocs\testnodejs\node_modules\@tensorflow\tfjs-node npm ERR! node-pre-gyp ERR! node -v v18.18.2 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9 npm ERR! node-pre-gyp ERR! not ok npm ERR! * Downloading libtensorflow npm ERR! npm ERR! * Building TensorFlow Node.js bindings ![Screenshot_1](https://github.com/tensorflow/tensorflow/assets/85969639/8f834004-73e9-415c-9436-8a006693074e) ![Screenshot_2](https://github.com/tensorflow/tensorflow/assets/85969639/bea6901a-3557-4f09-b6d0-368ae0852487) ![Screenshot_3](https://github.com/tensorflow/tensorflow/assets/85969639/d4caa528-fbdb-4be4-a0d1-c7c9e03662f4) ![Screenshot_4](https://github.com/tensorflow/tensorflow/assets/85969639/42b7d62e-47af-4571-8d8c-18ab4c256157) ![Screenshot_5](https://github.com/tensorflow/tensorflow/assets/85969639/018b3162-a010-4939-9853-b4735f2fc360) ![Screenshot_6](https://github.com/tensorflow/tensorflow/assets/85969639/0f5fc8a0-57fd-4f6e-9699-573f82b7de04) what I missed?
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62188/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62188/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62187
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62187/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62187/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62187/events
https://github.com/tensorflow/tensorflow/issues/62187
1,954,439,209
I_kwDOArmXAs50fmAp
62,187
AddN cannot handle shapes [x,y] + [1,y] or [x,1]
{ "login": "josh0-jrg", "id": 72444432, "node_id": "MDQ6VXNlcjcyNDQ0NDMy", "avatar_url": "https://avatars.githubusercontent.com/u/72444432?v=4", "gravatar_id": "", "url": "https://api.github.com/users/josh0-jrg", "html_url": "https://github.com/josh0-jrg", "followers_url": "https://api.github.com/users/josh0-jrg/followers", "following_url": "https://api.github.com/users/josh0-jrg/following{/other_user}", "gists_url": "https://api.github.com/users/josh0-jrg/gists{/gist_id}", "starred_url": "https://api.github.com/users/josh0-jrg/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/josh0-jrg/subscriptions", "organizations_url": "https://api.github.com/users/josh0-jrg/orgs", "repos_url": "https://api.github.com/users/josh0-jrg/repos", "events_url": "https://api.github.com/users/josh0-jrg/events{/privacy}", "received_events_url": "https://api.github.com/users/josh0-jrg/received_events", "type": "User", "site_admin": false }
[ { "id": 386191887, "node_id": "MDU6TGFiZWwzODYxOTE4ODc=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response", "name": "stat:awaiting response", "color": "f4b400", "default": false, "description": "Status - Awaiting response from author" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 474725938, "node_id": "MDU6TGFiZWw0NzQ3MjU5Mzg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stale", "name": "stale", "color": "d4c5f9", "default": false, "description": "This label marks the issue/pr stale - to be closed automatically if no activity" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 5508003926, "node_id": "LA_kwDOArmXAs8AAAABSE14Vg", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/TF%202.13", "name": "TF 2.13", "color": "B13ACB", "default": false, "description": "For issues related to Tensorflow 2.13" } ]
closed
false
{ "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false }
[ { "login": "sachinprasadhs", "id": 73069040, "node_id": "MDQ6VXNlcjczMDY5MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/73069040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sachinprasadhs", "html_url": "https://github.com/sachinprasadhs", "followers_url": "https://api.github.com/users/sachinprasadhs/followers", "following_url": "https://api.github.com/users/sachinprasadhs/following{/other_user}", "gists_url": "https://api.github.com/users/sachinprasadhs/gists{/gist_id}", "starred_url": "https://api.github.com/users/sachinprasadhs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sachinprasadhs/subscriptions", "organizations_url": "https://api.github.com/users/sachinprasadhs/orgs", "repos_url": "https://api.github.com/users/sachinprasadhs/repos", "events_url": "https://api.github.com/users/sachinprasadhs/events{/privacy}", "received_events_url": "https://api.github.com/users/sachinprasadhs/received_events", "type": "User", "site_admin": false } ]
null
[ "@josh0-jrg,\r\nThank you for reporting the issue. We are currently investigating the issue, and I kindly request some time to thoroughly analyze the problem in order to offer a resolution. Thank you!", "Directly from the [documentation](https://www.tensorflow.org/api_docs/python/tf/math/add_n):\r\n> All inputs in the list must have the same shape. This op does not [broadcast](https://docs.scipy.org/doc/numpy-1.13.0/user/basics.broadcasting.html) its inputs. If you need broadcasting, use [tf.math.add](https://www.tensorflow.org/api_docs/python/tf/math/add) (or the + operator) instead.\r\n\r\nYou can explicitly broadcast your inputs using something like `tf.broadcast_to`.", "@josh0-jrg , \r\n\r\nAs per the above suggestion, you can explicitly broadcast values to certain shape and try the operation.\r\nBelow is the code and the output.\r\n\r\n```python\r\nimport tensorflow as tf\r\no=tf.newaxis\r\n\r\nnel=tf.range(1,10,1,tf.float32)\r\nnph=tf.range(5,15,1,tf.float32)\r\nnel_2D=tf.repeat(nel[:,o],tf.shape(nph)[0],axis=1)\r\n\r\[email protected]\r\ndef add_N(x,y):\r\n return tf.add_n([x,y])\r\[email protected]\r\ndef add_v2(x,y):\r\n return x+y\r\n\r\ntf.print('Shapes:\\nX= ',tf.shape(nel_2D), '\\nY[o,:] = ',tf.shape(nph[o,:]))\r\n\r\nbroadcast = tf.broadcast_to(nph[o,:], [9,10])\r\ntf.print('X + Y ',tf.shape(add_v2(nel_2D,nph[o,:])))\r\n\r\ntf.print(' tf.add_n([x,y]) fails!')\r\n\r\nadd_N(nel_2D,broadcast)\r\n```\r\n\r\n<details><summary> Output:</summary>\r\n\r\n```\r\nShapes:\r\nX= [9 10] \r\nY[o,:] = [1 10]\r\nX + Y [9 10]\r\n tf.add_n([x,y]) fails!\r\n<tf.Tensor: shape=(9, 10), dtype=float32, numpy=\r\narray([[ 6., 7., 8., 9., 10., 11., 12., 13., 14., 15.],\r\n [ 7., 8., 9., 10., 11., 12., 13., 14., 15., 16.],\r\n [ 8., 9., 10., 11., 12., 13., 14., 15., 16., 17.],\r\n [ 9., 10., 11., 12., 13., 14., 15., 16., 17., 18.],\r\n [10., 11., 12., 13., 14., 15., 16., 17., 18., 19.],\r\n [11., 12., 13., 14., 15., 16., 17., 18., 19., 20.],\r\n [12., 13., 14., 15., 16., 17., 18., 19., 20., 21.],\r\n [13., 14., 15., 16., 17., 18., 19., 20., 21., 22.],\r\n [14., 15., 16., 17., 18., 19., 20., 21., 22., 23.]], dtype=float32)>\r\n```\r\n</details>", "This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62187\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62187\">No</a>\n" ]
2023-10-20T14:44:38
2024-01-17T16:05:59
2024-01-17T16:05:56
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? Yes ### Source source ### TensorFlow version 2.13.0 ### Custom code Yes ### OS platform and distribution Windows 11, CentOs8, Ubuntu ### Mobile device _No response_ ### Python version 3.9 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? I found this behaviour when calculating hessians of my custom TensorFlow function. For performance, I manipulate some tensors with unique and gather. This pops up for hessians only so I can't think of how to manipulate my code to avoid AddN. Surely, AddN should support the same operations as Add? Output: `2.13.0 **Also repeated in 2.16.0-dev20231020** Shapes: X= [9 10] Y[o,:] = [1 10] X + Y [9 10] tf.add_n([x,y]) fails! ValueError: Dimension 0 in both shapes must be equal, but are 9 and 1. Shapes are [9,10] and [1,10]. From merging shape 0 with other shapes. for '{{node AddN}} = AddN[N=2, T=DT_FLOAT](x, y)' with input shapes: [9,10], [1,10].` ### Standalone code to reproduce the issue ```shell import tensorflow as tf o=tf.newaxis nel=tf.range(1,10,1,tf.float32) nph=tf.range(5,15,1,tf.float32) nel_2D=tf.repeat(nel[:,o],tf.shape(nph)[0],axis=1) @tf.function def add_N(x,y): return tf.add_n([x,y]) @tf.function def add_v2(x,y): return x+y tf.print('Shapes:\nX= ',tf.shape(nel_2D), '\nY[o,:] = ',tf.shape(nph[o,:])) tf.print('X + Y ',tf.shape(add_v2(nel_2D,nph[o,:]))) tf.print(' tf.add_n([x,y]) fails!') add_N(nel_2D,nph[o,:]) ``` ### Relevant log output _No response_
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62187/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62187/timeline
null
completed
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62186
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62186/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62186/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62186/events
https://github.com/tensorflow/tensorflow/pull/62186
1,954,396,421
PR_kwDOArmXAs5dY1Xa
62,186
Update wheel_verification in official to support arm64
{ "login": "MichaelHudgins", "id": 30155094, "node_id": "MDQ6VXNlcjMwMTU1MDk0", "avatar_url": "https://avatars.githubusercontent.com/u/30155094?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MichaelHudgins", "html_url": "https://github.com/MichaelHudgins", "followers_url": "https://api.github.com/users/MichaelHudgins/followers", "following_url": "https://api.github.com/users/MichaelHudgins/following{/other_user}", "gists_url": "https://api.github.com/users/MichaelHudgins/gists{/gist_id}", "starred_url": "https://api.github.com/users/MichaelHudgins/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MichaelHudgins/subscriptions", "organizations_url": "https://api.github.com/users/MichaelHudgins/orgs", "repos_url": "https://api.github.com/users/MichaelHudgins/repos", "events_url": "https://api.github.com/users/MichaelHudgins/events{/privacy}", "received_events_url": "https://api.github.com/users/MichaelHudgins/received_events", "type": "User", "site_admin": false }
[ { "id": 390482148, "node_id": "MDU6TGFiZWwzOTA0ODIxNDg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/awaiting%20review", "name": "awaiting review", "color": "bc3869", "default": false, "description": "Pull request awaiting review" }, { "id": 987666414, "node_id": "MDU6TGFiZWw5ODc2NjY0MTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/ready%20to%20pull", "name": "ready to pull", "color": "2cd643", "default": false, "description": "PR ready for merge process" }, { "id": 1169364259, "node_id": "MDU6TGFiZWwxMTY5MzY0MjU5", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/size:XS", "name": "size:XS", "color": "adafea", "default": false, "description": "CL Change Size: Extra Small" } ]
closed
false
{ "login": "MichaelHudgins", "id": 30155094, "node_id": "MDQ6VXNlcjMwMTU1MDk0", "avatar_url": "https://avatars.githubusercontent.com/u/30155094?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MichaelHudgins", "html_url": "https://github.com/MichaelHudgins", "followers_url": "https://api.github.com/users/MichaelHudgins/followers", "following_url": "https://api.github.com/users/MichaelHudgins/following{/other_user}", "gists_url": "https://api.github.com/users/MichaelHudgins/gists{/gist_id}", "starred_url": "https://api.github.com/users/MichaelHudgins/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MichaelHudgins/subscriptions", "organizations_url": "https://api.github.com/users/MichaelHudgins/orgs", "repos_url": "https://api.github.com/users/MichaelHudgins/repos", "events_url": "https://api.github.com/users/MichaelHudgins/events{/privacy}", "received_events_url": "https://api.github.com/users/MichaelHudgins/received_events", "type": "User", "site_admin": false }
[ { "login": "MichaelHudgins", "id": 30155094, "node_id": "MDQ6VXNlcjMwMTU1MDk0", "avatar_url": "https://avatars.githubusercontent.com/u/30155094?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MichaelHudgins", "html_url": "https://github.com/MichaelHudgins", "followers_url": "https://api.github.com/users/MichaelHudgins/followers", "following_url": "https://api.github.com/users/MichaelHudgins/following{/other_user}", "gists_url": "https://api.github.com/users/MichaelHudgins/gists{/gist_id}", "starred_url": "https://api.github.com/users/MichaelHudgins/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MichaelHudgins/subscriptions", "organizations_url": "https://api.github.com/users/MichaelHudgins/orgs", "repos_url": "https://api.github.com/users/MichaelHudgins/repos", "events_url": "https://api.github.com/users/MichaelHudgins/events{/privacy}", "received_events_url": "https://api.github.com/users/MichaelHudgins/received_events", "type": "User", "site_admin": false } ]
null
[]
2023-10-20T14:20:49
2023-10-20T19:23:44
2023-10-20T19:23:43
COLLABORATOR
null
false
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/pulls/62186", "html_url": "https://github.com/tensorflow/tensorflow/pull/62186", "diff_url": "https://github.com/tensorflow/tensorflow/pull/62186.diff", "patch_url": "https://github.com/tensorflow/tensorflow/pull/62186.patch", "merged_at": "2023-10-20T19:23:43" }
Update wheel_verification in official to support arm64
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62186/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62186/timeline
null
null
true
https://api.github.com/repos/tensorflow/tensorflow/issues/62185
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62185/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62185/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62185/events
https://github.com/tensorflow/tensorflow/pull/62185
1,954,368,970
PR_kwDOArmXAs5dYvh3
62,185
Correct new wheel verification to account for arm64
{ "login": "MichaelHudgins", "id": 30155094, "node_id": "MDQ6VXNlcjMwMTU1MDk0", "avatar_url": "https://avatars.githubusercontent.com/u/30155094?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MichaelHudgins", "html_url": "https://github.com/MichaelHudgins", "followers_url": "https://api.github.com/users/MichaelHudgins/followers", "following_url": "https://api.github.com/users/MichaelHudgins/following{/other_user}", "gists_url": "https://api.github.com/users/MichaelHudgins/gists{/gist_id}", "starred_url": "https://api.github.com/users/MichaelHudgins/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MichaelHudgins/subscriptions", "organizations_url": "https://api.github.com/users/MichaelHudgins/orgs", "repos_url": "https://api.github.com/users/MichaelHudgins/repos", "events_url": "https://api.github.com/users/MichaelHudgins/events{/privacy}", "received_events_url": "https://api.github.com/users/MichaelHudgins/received_events", "type": "User", "site_admin": false }
[ { "id": 1169364259, "node_id": "MDU6TGFiZWwxMTY5MzY0MjU5", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/size:XS", "name": "size:XS", "color": "adafea", "default": false, "description": "CL Change Size: Extra Small" } ]
closed
false
{ "login": "MichaelHudgins", "id": 30155094, "node_id": "MDQ6VXNlcjMwMTU1MDk0", "avatar_url": "https://avatars.githubusercontent.com/u/30155094?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MichaelHudgins", "html_url": "https://github.com/MichaelHudgins", "followers_url": "https://api.github.com/users/MichaelHudgins/followers", "following_url": "https://api.github.com/users/MichaelHudgins/following{/other_user}", "gists_url": "https://api.github.com/users/MichaelHudgins/gists{/gist_id}", "starred_url": "https://api.github.com/users/MichaelHudgins/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MichaelHudgins/subscriptions", "organizations_url": "https://api.github.com/users/MichaelHudgins/orgs", "repos_url": "https://api.github.com/users/MichaelHudgins/repos", "events_url": "https://api.github.com/users/MichaelHudgins/events{/privacy}", "received_events_url": "https://api.github.com/users/MichaelHudgins/received_events", "type": "User", "site_admin": false }
[ { "login": "MichaelHudgins", "id": 30155094, "node_id": "MDQ6VXNlcjMwMTU1MDk0", "avatar_url": "https://avatars.githubusercontent.com/u/30155094?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MichaelHudgins", "html_url": "https://github.com/MichaelHudgins", "followers_url": "https://api.github.com/users/MichaelHudgins/followers", "following_url": "https://api.github.com/users/MichaelHudgins/following{/other_user}", "gists_url": "https://api.github.com/users/MichaelHudgins/gists{/gist_id}", "starred_url": "https://api.github.com/users/MichaelHudgins/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MichaelHudgins/subscriptions", "organizations_url": "https://api.github.com/users/MichaelHudgins/orgs", "repos_url": "https://api.github.com/users/MichaelHudgins/repos", "events_url": "https://api.github.com/users/MichaelHudgins/events{/privacy}", "received_events_url": "https://api.github.com/users/MichaelHudgins/received_events", "type": "User", "site_admin": false } ]
null
[ "Close infavor of doing an in repo fork" ]
2023-10-20T14:06:54
2023-10-20T14:19:08
2023-10-20T14:19:08
COLLABORATOR
null
false
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/pulls/62185", "html_url": "https://github.com/tensorflow/tensorflow/pull/62185", "diff_url": "https://github.com/tensorflow/tensorflow/pull/62185.diff", "patch_url": "https://github.com/tensorflow/tensorflow/pull/62185.patch", "merged_at": null }
Correct new wheel verification to account for arm64
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62185/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62185/timeline
null
null
true
https://api.github.com/repos/tensorflow/tensorflow/issues/62184
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62184/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62184/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62184/events
https://github.com/tensorflow/tensorflow/issues/62184
1,954,297,292
I_kwDOArmXAs50fDXM
62,184
core dumped Error with tf.raw_ops.TensorScatterUpdate
{ "login": "Gwihwan-Go", "id": 83144588, "node_id": "MDQ6VXNlcjgzMTQ0NTg4", "avatar_url": "https://avatars.githubusercontent.com/u/83144588?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Gwihwan-Go", "html_url": "https://github.com/Gwihwan-Go", "followers_url": "https://api.github.com/users/Gwihwan-Go/followers", "following_url": "https://api.github.com/users/Gwihwan-Go/following{/other_user}", "gists_url": "https://api.github.com/users/Gwihwan-Go/gists{/gist_id}", "starred_url": "https://api.github.com/users/Gwihwan-Go/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Gwihwan-Go/subscriptions", "organizations_url": "https://api.github.com/users/Gwihwan-Go/orgs", "repos_url": "https://api.github.com/users/Gwihwan-Go/repos", "events_url": "https://api.github.com/users/Gwihwan-Go/events{/privacy}", "received_events_url": "https://api.github.com/users/Gwihwan-Go/received_events", "type": "User", "site_admin": false }
[ { "id": 404586594, "node_id": "MDU6TGFiZWw0MDQ1ODY1OTQ=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20tensorflower", "name": "stat:awaiting tensorflower", "color": "f4b400", "default": false, "description": "Status - Awaiting response from tensorflower" }, { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" }, { "id": 1097547147, "node_id": "MDU6TGFiZWwxMDk3NTQ3MTQ3", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:ops", "name": "comp:ops", "color": "0052cc", "default": false, "description": "OPs related issues" }, { "id": 1478826728, "node_id": "MDU6TGFiZWwxNDc4ODI2NzI4", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/comp:core", "name": "comp:core", "color": "024391", "default": false, "description": "issues related to core part of tensorflow" } ]
open
false
{ "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false }
[ { "login": "SuryanarayanaY", "id": 116063290, "node_id": "U_kgDOBur8Og", "avatar_url": "https://avatars.githubusercontent.com/u/116063290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SuryanarayanaY", "html_url": "https://github.com/SuryanarayanaY", "followers_url": "https://api.github.com/users/SuryanarayanaY/followers", "following_url": "https://api.github.com/users/SuryanarayanaY/following{/other_user}", "gists_url": "https://api.github.com/users/SuryanarayanaY/gists{/gist_id}", "starred_url": "https://api.github.com/users/SuryanarayanaY/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SuryanarayanaY/subscriptions", "organizations_url": "https://api.github.com/users/SuryanarayanaY/orgs", "repos_url": "https://api.github.com/users/SuryanarayanaY/repos", "events_url": "https://api.github.com/users/SuryanarayanaY/events{/privacy}", "received_events_url": "https://api.github.com/users/SuryanarayanaY/received_events", "type": "User", "site_admin": false } ]
null
[ "Hi @GwiHwan-Go ,\r\n\r\nI have replicated the issue with tf-nightly and found checkfail as reported.\r\n<img width=\"1512\" alt=\"Screenshot 2023-10-23 at 9 54 32 AM\" src=\"https://github.com/tensorflow/tensorflow/assets/116063290/3820084c-8e06-4c9e-8aa7-0ac807ea4432\">\r\n\r\nPlease report the security related issues through proper [channel](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md#reporting-process) as mentioned in [SECURITY.md](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md).\r\n\r\n" ]
2023-10-20T13:29:03
2023-10-24T08:05:22
null
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? Yes ### Source source ### TensorFlow version 2.15.0-dev20231005 ### Custom code Yes ### OS platform and distribution Ubuntu 22.04.3 LTS (x86_64) ### Mobile device _No response_ ### Python version 3.9.17 ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? while using the tf.raw_ops.TensorScatterUpdate, I encountered a comre dumped error with below parameters. ### Standalone code to reproduce the issue ```shell import tensorflow as tf print(tf.__version__) args = {'tensor': tf.random.uniform([4]), 'indices': tf.random.uniform([4, 4, 4], 0, 256, dtype=tf.int32), 'updates': tf.random.uniform([4])} res = tf.raw_ops.TensorScatterUpdate(**args) print(res) ``` ### Relevant log output ```shell To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2023-10-20 21:24:05.155348: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT 2.15.0-dev20231005 2023-10-20 21:24:07.182885: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1924] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 3350 MB memory: -> device: 0, name: NVIDIA GeForce RTX 2070, pci bus id: 0000:02:00.0, compute capability: 7.5 2023-10-20 21:24:07.183565: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1924] Created device /job:localhost/replica:0/task:0/device:GPU:1 with 6826 MB memory: -> device: 1, name: NVIDIA GeForce RTX 2070, pci bus id: 0000:04:00.0, compute capability: 7.5 2023-10-20 21:24:07.184101: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1924] Created device /job:localhost/replica:0/task:0/device:GPU:2 with 6826 MB memory: -> device: 2, name: NVIDIA GeForce RTX 2070, pci bus id: 0000:83:00.0, compute capability: 7.5 2023-10-20 21:24:07.184626: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1924] Created device /job:localhost/replica:0/task:0/device:GPU:3 with 6826 MB memory: -> device: 3, name: NVIDIA GeForce RTX 2070, pci bus id: 0000:84:00.0, compute capability: 7.5 2023-10-20 21:24:07.292391: F tensorflow/core/framework/tensor_shape.cc:357] Check failed: d < dims() (1 vs. 1) Aborted (core dumped) ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62184/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62184/timeline
null
null
false
https://api.github.com/repos/tensorflow/tensorflow/issues/62183
https://api.github.com/repos/tensorflow/tensorflow
https://api.github.com/repos/tensorflow/tensorflow/issues/62183/labels{/name}
https://api.github.com/repos/tensorflow/tensorflow/issues/62183/comments
https://api.github.com/repos/tensorflow/tensorflow/issues/62183/events
https://github.com/tensorflow/tensorflow/issues/62183
1,953,929,927
I_kwDOArmXAs50dprH
62,183
TensorShape is (None, None, None) on images
{ "login": "ngbusca", "id": 4727509, "node_id": "MDQ6VXNlcjQ3Mjc1MDk=", "avatar_url": "https://avatars.githubusercontent.com/u/4727509?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ngbusca", "html_url": "https://github.com/ngbusca", "followers_url": "https://api.github.com/users/ngbusca/followers", "following_url": "https://api.github.com/users/ngbusca/following{/other_user}", "gists_url": "https://api.github.com/users/ngbusca/gists{/gist_id}", "starred_url": "https://api.github.com/users/ngbusca/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ngbusca/subscriptions", "organizations_url": "https://api.github.com/users/ngbusca/orgs", "repos_url": "https://api.github.com/users/ngbusca/repos", "events_url": "https://api.github.com/users/ngbusca/events{/privacy}", "received_events_url": "https://api.github.com/users/ngbusca/received_events", "type": "User", "site_admin": false }
[ { "id": 473172988, "node_id": "MDU6TGFiZWw0NzMxNzI5ODg=", "url": "https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug", "name": "type:bug", "color": "159b2e", "default": false, "description": "Bug" } ]
closed
false
{ "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false }
[ { "login": "sushreebarsa", "id": 84765720, "node_id": "MDQ6VXNlcjg0NzY1NzIw", "avatar_url": "https://avatars.githubusercontent.com/u/84765720?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sushreebarsa", "html_url": "https://github.com/sushreebarsa", "followers_url": "https://api.github.com/users/sushreebarsa/followers", "following_url": "https://api.github.com/users/sushreebarsa/following{/other_user}", "gists_url": "https://api.github.com/users/sushreebarsa/gists{/gist_id}", "starred_url": "https://api.github.com/users/sushreebarsa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sushreebarsa/subscriptions", "organizations_url": "https://api.github.com/users/sushreebarsa/orgs", "repos_url": "https://api.github.com/users/sushreebarsa/repos", "events_url": "https://api.github.com/users/sushreebarsa/events{/privacy}", "received_events_url": "https://api.github.com/users/sushreebarsa/received_events", "type": "User", "site_admin": false } ]
null
[ "The following preprocess function doesn't work either:\r\n\r\n```\r\ndef preprocess(file_name):\r\n x = tf.io.read_file(file_name)\r\n x = tf.io.decode_jpeg(x)\r\n \r\n new_size = tf.cast(tf.divide(x.shape,2))[:2]\r\n tf.print(new_size)\r\n x = tf.image.resize(x, new_size)\r\n x = tf.image.random_crop(x, (32,32,3))\r\n \r\n return x, tf.zeros_like(x)\r\n```\r\n\r\n```\r\nValueError: in user code:\r\n\r\n File \"/tmp/ipykernel_583425/4093202739.py\", line 8, in preprocess *\r\n new_size = tf.cast(tf.divide(x.shape,2))[:2]\r\n\r\n ValueError: Cannot convert a partially known TensorShape (None, None, None) to a Tensor.\r\n\r\n```", "@ngbusca If instead of `x.shape`, if you use `x_shape = tf.shape(x)`, does it help you out ? \r\n\r\nSo, \r\n```\r\ndef preprocess(file_name):\r\n x = tf.io.read_file(file_name)\r\n x = tf.io.decode_jpeg(x)\r\n \r\n nrows, ncols,_ = x.shape\r\n \r\n x = tf.image.resize(x, (nrows//2, ncols//2))\r\n \r\n x = tf.image.random_crop(x, (32,32,3))\r\n \r\n return x, tf.zeros_like(x)\r\n```\r\nbecomes \r\n\r\n```\r\ndef preprocess(file_name):\r\n x = tf.io.read_file(file_name)\r\n x = tf.io.decode_jpeg(x)\r\n \r\n x_shape = tf.shape(x)\r\n \r\n x = tf.image.resize(x, (x_shape[0]//2, x_shape[1]//2))\r\n\r\n \r\n x = tf.image.random_crop(x, (32,32,3))\r\n \r\n return x, tf.zeros_like(x)\r\n```\r\n", "Hi @ujjwalnur yes, amazing this works:\r\n\r\n```\r\ndef preprocess(file_name):\r\n x = tf.io.read_file(file_name)\r\n x = tf.io.decode_jpeg(x)\r\n\r\n new_size = tf.cast(tf.divide(tf.shape(x),2), tf.int32)[:2]\r\n \r\n x = tf.image.resize(x, new_size)\r\n x = tf.image.random_crop(x, (32,32,3))\r\n \r\n return x, tf.zeros_like(x)\r\n```\r\n\r\nIs `x.shape` expected to behave differently from `tf.shape(x)` ?", "@ngbusca \r\n\r\n`x.shape` is trying to give you the static shape of the tensor which is not known. All preprocessing stages of a dataset run in graph mode. So, `x.shape` is `None`. `tf.shape` gives you the dynamic shape which can be computed during runtime and so the error disappears.", "Thanks, I'll close the issue", "Are you satisfied with the resolution of your issue?\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62183\">Yes</a>\n<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62183\">No</a>\n" ]
2023-10-20T09:50:13
2023-10-20T12:10:52
2023-10-20T12:10:50
NONE
null
null
null
### Issue type Bug ### Have you reproduced the bug with TensorFlow Nightly? Yes ### Source source ### TensorFlow version 2.13 ### Custom code Yes ### OS platform and distribution _No response_ ### Mobile device _No response_ ### Python version _No response_ ### Bazel version _No response_ ### GCC/compiler version _No response_ ### CUDA/cuDNN version _No response_ ### GPU model and memory _No response_ ### Current behavior? An I/O pipeline for images using Dataset reads images into tensor but the shape is (None, None, None), preventing some applications that need the tensor shape further down in preprocessing (for example, resizing the image by a factor). In the example below I can get by by recovering the image dimensions with a trick but it feels very *very* hacky. Is there a reason why the shape should be None? ### Standalone code to reproduce the issue ```shell def preprocess(file_name): x = tf.io.read_file(file_name) x = tf.io.decode_jpeg(x) nrows, ncols,_ = x.shape x = tf.image.resize(x, (nrows//2, ncols//2)) x = tf.image.random_crop(x, (32,32,3)) return x, tf.zeros_like(x) def preprocess_workaround(file_name): x = tf.io.read_file(file_name) x = tf.io.decode_jpeg(x) nrows = tf.math.reduce_sum(tf.ones_like(x[:,0], dtype=tf.int32)) ncols = tf.math.reduce_sum(tf.ones_like(x[0,:], dtype=tf.int32)) x = tf.image.resize(x, (nrows//2, ncols//2)) x = tf.image.random_crop(x, (32,32,3)) return x, tf.zeros_like(x) model = tf.keras.models.Sequential() model.add(tf.keras.Input(shape=(32,32,3))) model.add(tf.keras.layers.Conv2D(3, (3,3), padding='same')) model.summary() files = glob.glob("/mnt/ng/ncl/acquisition/stitches/20231019/row1/??/1/crop.jpg") print(len(files)) ## crashes with the output below ds = tf.data.Dataset.from_tensor_slices(files).map(preprocess).batch(1) ## the following works: ## ds = tf.data.Dataset.from_tensor_slices(files).map(preprocess_workaround).batch(1) model.fit(ds) ``` ``` ### Relevant log output ```shell --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /tmp/ipykernel_583425/761276435.py in <module> 1 files = glob.glob("/mnt/ng/ncl/acquisition/stitches/20231019/row1/??/1/crop.jpg") 2 print(len(files)) ----> 3 ds = tf.data.Dataset.from_tensor_slices(files).map(preprocess).batch(1) 4 model.fit(ds) ~/anaconda3/lib/python3.9/site-packages/tensorflow/python/data/ops/dataset_ops.py in map(self, map_func, num_parallel_calls, deterministic, name) 2292 warnings.warn("The `deterministic` argument has no effect unless the " 2293 "`num_parallel_calls` argument is specified.") -> 2294 return MapDataset(self, map_func, preserve_cardinality=True, name=name) 2295 else: 2296 return ParallelMapDataset( ~/anaconda3/lib/python3.9/site-packages/tensorflow/python/data/ops/dataset_ops.py in __init__(self, input_dataset, map_func, use_inter_op_parallelism, preserve_cardinality, use_legacy_function, name) 5497 self._use_inter_op_parallelism = use_inter_op_parallelism 5498 self._preserve_cardinality = preserve_cardinality -> 5499 self._map_func = structured_function.StructuredFunctionWrapper( 5500 map_func, 5501 self._transformation_name(), ~/anaconda3/lib/python3.9/site-packages/tensorflow/python/data/ops/structured_function.py in __init__(self, func, transformation_name, dataset, input_classes, input_shapes, input_types, input_structure, add_to_graph, use_legacy_function, defun_kwargs) 261 fn_factory = trace_tf_function(defun_kwargs) 262 --> 263 self._function = fn_factory() 264 # There is no graph to add in eager mode. 265 add_to_graph &= not context.executing_eagerly() ~/anaconda3/lib/python3.9/site-packages/tensorflow/python/eager/polymorphic_function/tracing_compiler.py in get_concrete_function(self, *args, **kwargs) 224 `tf.Tensor` or `tf.TensorSpec`. 225 """ --> 226 concrete_function = self._get_concrete_function_garbage_collected( 227 *args, **kwargs) 228 concrete_function._garbage_collector.release() # pylint: disable=protected-access ~/anaconda3/lib/python3.9/site-packages/tensorflow/python/eager/polymorphic_function/tracing_compiler.py in _get_concrete_function_garbage_collected(self, *args, **kwargs) 190 191 with self._lock: --> 192 concrete_function, _ = self._maybe_define_concrete_function(args, kwargs) 193 seen_names = set() 194 captured = object_identity.ObjectIdentitySet( ~/anaconda3/lib/python3.9/site-packages/tensorflow/python/eager/polymorphic_function/tracing_compiler.py in _maybe_define_concrete_function(self, args, kwargs) 155 kwargs = {} 156 --> 157 return self._maybe_define_function(args, kwargs) 158 159 def _get_concrete_function_internal_garbage_collected(self, *args, **kwargs): ~/anaconda3/lib/python3.9/site-packages/tensorflow/python/eager/polymorphic_function/tracing_compiler.py in _maybe_define_function(self, args, kwargs) 358 args, kwargs = generalized_func_key._placeholder_value() # pylint: disable=protected-access 359 --> 360 concrete_function = self._create_concrete_function(args, kwargs) 361 362 graph_capture_container = concrete_function.graph._capture_func_lib # pylint: disable=protected-access ~/anaconda3/lib/python3.9/site-packages/tensorflow/python/eager/polymorphic_function/tracing_compiler.py in _create_concrete_function(self, args, kwargs) 282 arg_names = base_arg_names + missing_arg_names 283 concrete_function = monomorphic_function.ConcreteFunction( --> 284 func_graph_module.func_graph_from_py_func( 285 self._name, 286 self._python_function, ~/anaconda3/lib/python3.9/site-packages/tensorflow/python/framework/func_graph.py in func_graph_from_py_func(name, python_func, args, kwargs, signature, func_graph, autograph, autograph_options, add_control_dependencies, arg_names, op_return_value, collections, capture_by_value, acd_record_initial_resource_uses) 1281 _, original_func = tf_decorator.unwrap(python_func) 1282 -> 1283 func_outputs = python_func(*func_args, **func_kwargs) 1284 1285 # invariant: `func_outputs` contains only Tensors, CompositeTensors, ~/anaconda3/lib/python3.9/site-packages/tensorflow/python/data/ops/structured_function.py in wrapped_fn(*args) 238 attributes=defun_kwargs) 239 def wrapped_fn(*args): # pylint: disable=missing-docstring --> 240 ret = wrapper_helper(*args) 241 ret = structure.to_tensor_list(self._output_structure, ret) 242 return [ops.convert_to_tensor(t) for t in ret] ~/anaconda3/lib/python3.9/site-packages/tensorflow/python/data/ops/structured_function.py in wrapper_helper(*args) 169 if not _should_unpack(nested_args): 170 nested_args = (nested_args,) --> 171 ret = autograph.tf_convert(self._func, ag_ctx)(*nested_args) 172 ret = variable_utils.convert_variables_to_tensors(ret) 173 if _should_pack(ret): ~/anaconda3/lib/python3.9/site-packages/tensorflow/python/autograph/impl/api.py in wrapper(*args, **kwargs) 690 except Exception as e: # pylint:disable=broad-except 691 if hasattr(e, 'ag_error_metadata'): --> 692 raise e.ag_error_metadata.to_exception(e) 693 else: 694 raise ~/anaconda3/lib/python3.9/site-packages/tensorflow/python/autograph/impl/api.py in wrapper(*args, **kwargs) 687 try: 688 with conversion_ctx: --> 689 return converted_call(f, args, kwargs, options=options) 690 except Exception as e: # pylint:disable=broad-except 691 if hasattr(e, 'ag_error_metadata'): ~/anaconda3/lib/python3.9/site-packages/tensorflow/python/autograph/impl/api.py in converted_call(f, args, kwargs, caller_fn_scope, options) 437 try: 438 if kwargs is not None: --> 439 result = converted_f(*effective_args, **kwargs) 440 else: 441 result = converted_f(*effective_args) /tmp/__autograph_generated_filecu6im70c.py in tf__preprocess(file_name) 11 x = ag__.converted_call(ag__.ld(tf).io.decode_jpeg, (ag__.ld(x),), None, fscope) 12 (nrows, ncols, _) = ag__.ld(x).shape ---> 13 x = ag__.converted_call(ag__.ld(tf).image.resize, (ag__.ld(x), (ag__.ld(nrows) // 2, ag__.ld(ncols) // 2)), None, fscope) 14 x = ag__.converted_call(ag__.ld(tf).image.random_crop, (ag__.ld(x), (32, 32)), None, fscope) 15 try: TypeError: in user code: File "/tmp/ipykernel_583425/4207213119.py", line 7, in preprocess * x = tf.image.resize(x, (nrows//2, ncols//2)) TypeError: unsupported operand type(s) for //: 'NoneType' and 'int' ```
{ "url": "https://api.github.com/repos/tensorflow/tensorflow/issues/62183/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/tensorflow/tensorflow/issues/62183/timeline
null
completed
false