issues about the Quickstart for TensorFlow Users tutorial
- Dominant language
- C++
- Stars
- 933
- Forks
- 169
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I'm trying the Quickstart for TensorFlow Users in https://github.com/alibaba/BladeDISC/blob/main/docs/quickstart.md#quickstart-for-tensorflow-users. It seems that there is an obvious mistake in the simple demo:
````
g = tf.Graph()
with g.as_default():
# reduce_sum((x + y) * c) ^ 2
x = tf.placeholder(shape=[None, None], dtype=tf.float32, name="x")
y = tf.placeholder(shape=[None, None], dtype=tf.float32, name="y")
c = tf.constant([[1], [2]], dtype=tf.float32, shape=(2, 1), name="c")
t1 = x + y
t2 = tf.matmul(t1, c)
t3 = tf.reduce_sum(t2)
ret = t3 * t3
with tf.Session() as s:
np_x = np.ones([10, 10]).astype(np.float32)
np_y = np.ones([10, 10]).astype(np.float32)
r = s.run(ret, {x: np_x, y: np_y})
print("x.shape={}, y.shape={}, ret={}".format(np_x.shape, np_y.shape, r))
````
The sizes of the inputs of the matmul op are incompatible: In[0]: [10,10], In[1]: [2,1]
Another problem which is more important that I encounter is that this demo runs very slowly in the bladedisc docker. I build the bladedisc docker following this doc: https://github.com/alibaba/BladeDISC/blob/main/docs/install_with_docker.md. The docker tag is latest-runtime-tensorflow1.15. In this docker container, the above demo takes more than 3 mins to finish with the disc disabled, and more than 6 mins with the disc enabled. It is slower with disc enabled. However, in another docker container on the same machine, which is also an environment of tensorflow 1.15 and cuda 11.0, the demo finishs within 5 seconds with disc disabled. Does anyone else encounter similar problem with this docker image?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Quickstart for TensorFlow Users section in docs/quickstart.md and reproduce the demo using the TensorFlow 1.15 latest-runtime-tensorflow1.15 container described in docs/install_with_docker.md. Compare runs with DISC enabled and disabled against the other TensorFlow 1.15/CUDA 11.0 container. Done means the example's matmul inputs are compatible and the container performance discrepancy is explained or fixed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, tensorflow
- Domain
- documentation, machine-learning, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100