microsoft / tensorflow-directml-plugin

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

`PluggableGraphOptimizer failed: NOT_FOUND: Op type not registered '_CopyFromGpuToHost'` #344

Open Neizvestnyj opened 1 year ago

Neizvestnyj commented 1 year ago

When I run large model, I get this error, how I can catch this and fix.

2022-12-24 01:32:58.490091: I tensorflow/core/grappler/optimizers/custom_graph_optimizer_registry.cc:114] Plugin optimizer for device_type GPU is enabled.
2022-12-24 01:33:00.202302: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:954] PluggableGraphOptimizer failed: NOT_FOUND: Op type not registered '_CopyFromGpuToHost' in binary running on DESKTOP-NEIZVES. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
2022-12-24 01:33:00.248437: E tensorflow/core/grappler/optimizers/tfg_optimizer_hook.cc:134] tfg_optimizer{tfg-consolidate-attrs,tfg-toposort,tfg-shape-inference{graph-version=0},tfg-prepare-attrs-export} failed: INVALID_ARGUMENT: Unable to find OpDef for _CopyFromHostToGpu
    when importing GraphDef to MLIR module in GrapplerHook
2022-12-24 01:33:00.588281: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:954] PluggableGraphOptimizer failed: NOT_FOUND: Op type not registered '_CopyFromGpuToHost' in binary running on DESKTOP-NEIZVES. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
2022-12-24 01:33:00.611022: E tensorflow/core/grappler/optimizers/tfg_optimizer_hook.cc:134] tfg_optimizer{tfg-consolidate-attrs,tfg-functional-to-region,tfg.func(tfg-cf-sink),tfg-region-to-functional{force-control-capture=true},tfg-lift-legacy-call,symbol-privatize{},symbol-dce,tfg-prepare-attrs-export} failed: INVALID_ARGUMENT: Unable to find OpDef for _CopyFromGpuToHost
    when importing GraphDef to MLIR module in GrapplerHook
2022-12-24 01:33:00.616783: E tensorflow/core/grappler/optimizers/tfg_optimizer_hook.cc:134] tfg_optimizer{tfg-consolidate-attrs,tfg-functional-to-region,tfg.func(tfg-cf-sink),tfg-region-to-functional{force-control-capture=true},tfg-lift-legacy-call,symbol-privatize{},symbol-dce,tfg-prepare-attrs-export} failed: INVALID_ARGUMENT: Unable to find OpDef for _CopyFromGpuToHost
    when importing GraphDef to MLIR module in GrapplerHook
2022-12-24 01:33:00.645922: W tensorflow/core/common_runtime/process_function_library_runtime.cc:941] Ignoring multi-device function optimization failure: NOT_FOUND: Op type not registered '_CopyFromGpuToHost' in binary running on DESKTOP-NEIZVES. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.

Process finished with exit code -1073740791 (0xC0000409)