在来自 tf.matmul 的 GPU 上分析代码时出现分段错误。当我不分析代码时,代码运行正常。
代码:
import tensorflow as tf
from tensorflow.keras import Sequential
from tensorflow.keras.layers import Reshape,Dense
import numpy as np
tf.debugging.set_log_device_placement(True)
options = tf.profiler.experimental.ProfilerOptions(host_tracer_level = 3,
python_tracer_level = 1,
device_tracer_level = 1)
tf.profiler.experimental.start('logdir3',options=options)
with tf.profiler.experimental.Profile('logdir'):
# Create some tensors
a = tf.constant([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]])
b = tf.constant([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]])
c = tf.matmul(a, b)
tf.profiler.experimental.stop()
版本:
NVIDIA-SMI 450.51.06
驱动版本:450.51.06
CUDA 版本:11.0
# PIP LIST | grep tens
tensorboard 2.9.1 pypi_0 pypi
tensorboard-data-server 0.6.1 pypi_0 pypi
tensorboard-plugin-profile 2.11.2 pypi_0 pypi
tensorboard-plugin-wit 1.8.1 pypi_0 pypi
tensorflow 2.9.0 (or 2.11) pypi_0 pypi
tensorflow-estimator 2.9.0 pypi_0 pypi
tensorflow-io-gcs-filesystem 0.32.0 pypi_0 pypi
# conda list
cuda-nvcc 12.1.66 0 nvidia
cudatoolkit 11.2.2 he111cf0_8 nvidia
cudnn 8.1.0.77 h90431f1_0 conda-forge