Skip to content

Commit 673ece4

Browse files
committed
Remove XLATensor from LookupCachedCompile
1 parent fcf8d66 commit 673ece4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

torch_xla/csrc/xla_graph_executor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ XLAGraphExecutor::PostOrderData XLAGraphExecutor::RunPostOrder(
850850
}
851851

852852
XLAGraphExecutor::ComputationCache::TypePtr
853-
XLAGraphExecutor::LookupCachedCompile(const std::vector<XLATensorPtr>& tensors,
853+
XLAGraphExecutor::LookupCachedCompile(
854854
const torch::lazy::hash_t& hash) {
855855
ComputationCache::TypePtr cached_computation =
856856
GetComputationCache()->Get(hash);
@@ -873,7 +873,7 @@ std::shared_ptr<XLAGraphExecutor::Async> XLAGraphExecutor::TryRunCachedSync(
873873
PostOrderData* po_data,
874874
const std::vector<torch::lazy::BackendDataPtr>& tensor_data_vec) {
875875
ComputationCache::TypePtr cached_computation =
876-
LookupCachedCompile(*tensors, coll->hash);
876+
LookupCachedCompile(coll->hash);
877877
if (cached_computation == nullptr) {
878878
return nullptr;
879879
}

torch_xla/csrc/xla_graph_executor.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,12 @@ class XLAGraphExecutor : public torch::lazy::LazyGraphExecutor {
261261
PostOrderData RunPostOrder(const std::vector<torch::lazy::Value>& ir_values,
262262
SyncTensorCollection* coll);
263263

264-
// We don't use the upstream LookupCachedCompile since we need XLATensorPtr and
264+
// We don't use the upstream LookupCachedCompile since
265265
// our CachedComputation is different from upstream.
266266
ComputationCache::TypePtr LookupCachedCompile(
267-
const std::vector<XLATensorPtr>& tensors,
268267
const torch::lazy::hash_t& hash);
269268

270-
// We don't use the upstream TryRunCachedSync since we need XLATensorPtr and
269+
// We don't use the upstream TryRunCachedSync since
271270
// our CachedComputation is different from upstream.
272271
std::shared_ptr<Async> TryRunCachedSync(
273272
std::vector<XLATensorPtr>* tensors, SyncTensorCollection* coll,

0 commit comments

Comments
 (0)