Closed eiwqueqie closed 5 years ago
You change something in example? On what OS and compiler you run?
Oh, I see. I have 2 GPUs, and want to run 2 sessions at the same time.
I added TF_ImportGraphDefOptionsSetDefaultDevice(opts, "/gpu:1");
before TF_GraphImportGraphDef(graph, buffer, opts, status);
in tf_utils.cpp
.
When I delete it, it run correctly. Maybe I need to try more in these cases. Thank you.
Try build for gpu from release page https://github.com/Neargye/tensorflow.
My OS is Windows 10. I‘m sure it is GPU only lib from this page Install TensorFlow for C. And all input tensors are rechecked to confirm their shapes and data types are right. Finally it is found that only when I specify a device in my own code, it doesn't work.
Unfortunately, I did not try to run on GPU using this function TF_ImportGraphDefOptionsSetDefaultDevice
.
When I run
session_run.cpp
, it occurs an error "TF_INVALID_ARGUMENT". What's wrong?