microsoft / tensorflow-directml-plugin

DirectML PluggableDevice plugin for TensorFlow 2
Apache License 2.0
179 stars 23 forks source link

platform is already registered with name: "DML" #324

Closed Kolyan1414 closed 1 year ago

Kolyan1414 commented 1 year ago

Enviroment

hardware
CPU AMD Ryzen 9 5900HX with Radeon Graphics
GPU AMD Radeon RX 6800M
software version
win 10 21H2 19044.2130
amd driver 22.5.1
python 3.9.13
tensorflow-cpu 2.10.0
tensorflow-directml-plugin 0.2.0.dev221020

Problem

After I updated tensorflow-directml-plugin from version 0.1.1.dev221004 to version 0.2.0.dev221020, I can not longer import tensorflow due to following error: 2022-10-24 10:50:24.173023: F tensorflow/c/experimental/stream_executor/stream_executor.cc:808] Non-OK-status: stream_executor::MultiPlatformManager::RegisterPlatform( std::move(cplatform)) status: INTERNAL: platform is already registered with name: "DML"

Full output:

(tfdml) C:\Users\Username>python
Python 3.9.13 (main, Aug 25 2022, 23:51:50) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
2022-10-24 10:50:22.906122: I tensorflow/c/logging.cc:34] Successfully opened dynamic library C:\ProgramData\Anaconda3\envs\tfdml\lib\site-packages\tensorflow-plugins/directml/directml.d6f03b303ac3c4f2eeb8ca631688c9757b361310.dll
2022-10-24 10:50:22.906980: I tensorflow/c/logging.cc:34] Successfully opened dynamic library dxgi.dll
2022-10-24 10:50:22.910657: I tensorflow/c/logging.cc:34] Successfully opened dynamic library d3d12.dll
2022-10-24 10:50:24.163258: I tensorflow/c/logging.cc:34] DirectML device enumeration: found 2 compatible adapters.
2022-10-24 10:50:24.173023: F tensorflow/c/experimental/stream_executor/stream_executor.cc:808] Non-OK-status: stream_executor::MultiPlatformManager::RegisterPlatform( std::move(cplatform)) status: INTERNAL: platform is already registered with name: "DML"

UPD: Solved after reinstallation of tensorflow-cpu and tensorflow-directml-plugin