---
title: 开发验证
description: "执行以下命令进行验证。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengai/ecosystemEnable/tensorFlow/kunpengtensorflow_16_0006.html
sourcePath: /source/zh/kunpengai/ecosystemEnable/tensorFlow/kunpengtensorflow_16_0006.html
indexId: c8298bff37c72e039f126e7b17e16bbfe24f0fdcd53503bf1a67aebbc0c9f3e778
---
# 开发验证

执行以下命令进行验证。

```
python3 - <<'PY'
import tensorflow as tf  

print("tensorflow_version=" + tf.__version__) 
print("physical_gpus=" + repr(tf.config.list_physical_devices("GPU"))) 
print("built_with_cuda=" + str(tf.test.is_built_with_cuda()))  
assert tf.config.list_physical_devices("GPU") 
assert tf.test.is_built_with_cuda()  
with tf.device("/GPU:0"):     
    a = tf.constant([[1.0, 2.0], [3.0, 4.0]])     
    b = tf.constant([[1.0, 2.0], [3.0, 4.0]])     
    c = tf.matmul(a, b)  

print("tensorflow_gpu_matmul=" + str(c.numpy().tolist())) 
PY
```

预期输出如下信息：

```
physical_gpus=[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')] 
built_with_cuda=True 
tensorflow_gpu_matmul=[[7.0, 10.0], [15.0, 22.0]]
```
