import tensorflow as tf
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '0'
os.environ['TF_CPP_MIN_VLOG_LEVEL'] = '3'
from tensorflow import logging
logging.set_verbosity(logging.INFO)
with tf.device("/fpga:0"):
result = tf.user_ops.vect_add(4, 0)
# result = tf.user_ops.vect_add([4, 3], [2, 1])
#a = tf.constant([1.0, 2.0], name='a')
#b = tf.constant([2.0, 3.0], name='b')
#result = tf.add(a, b)
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
print(sess.run(result))