DeepRec-AI / DeepRec

DeepRec is a high-performance recommendation deep learning framework based on TensorFlow. It is hosted in incubation in LF AI & Data Foundation.
Apache License 2.0
1.05k stars 354 forks source link

CUDA Graph open fail #940

Open tuanzhangCS opened 1 year ago

tuanzhangCS commented 1 year ago

System information

Describe the current behavior My usage is:

SessionOptions options;
options.config.mutable_gpu_options()->set_cuda_graph_enable_jit(true);
auto status = tensorflow::LoadSavedModel(options, tensorflow::RunOptions(), model_path, {"serve"}, &bundle);
for (int i = 0; i < loops; ++i) {
   status = bundle.session->Run(inputs, out_names, {}, &outputs);
}

But I can't observe cudaGraph used in nsight system.

image

Describe the expected behavior Some sub graph can run by cuda Graph.

Are there any examples of using cuda Graph?

tuanzhangCS commented 1 year ago

I found that because I didn't compile DeepRec with XLA. After I fix it, there will be cudaGraphLaunch in the graph when running. But sometimes the results are random error, why?

candyzone commented 1 year ago

session run error or random results?

tuanzhangCS commented 1 year ago

session run error or random results?

Random results.