remove inputvarname in operator; test=develop

add_cudnn_lstm
phlrain 6 years ago
parent cf1fe61004
commit 92f5be1d82

@ -174,14 +174,6 @@ class ExecutionContext {
return op_.Inputs(name).size();
}
const std::string InputVarName(const std::string& name) const {
return op_.Input(name);
}
const std::string OutputVarName(const std::string& name) const {
return op_.Output(name);
}
size_t OutputSize(const std::string& name) const {
return op_.Outputs(name).size();
}

@ -292,7 +292,7 @@ class CudnnLSTMGPUKernel : public framework::OpKernel<T> {
// multi-devices before the first running.
// use parent scope to make cache persistable
auto *scope = const_cast<framework::Scope *>(ctx.scope().parent());
auto cache_var_name = ctx.InputVarName("Cache");
auto cache_var_name = ctx.Inputs("Cache")[0];
cache_var = scope->Var(cache_var_name);
}
CudnnRNNCache *cudnn_rnn_cache = nullptr;

Loading…
Cancel
Save