Skip to content

Commit

Permalink
Revert D25434956: [JIT] Use is_buffer in BufferPolicy::valid
Browse files Browse the repository at this point in the history
Test Plan: revert-hammer

Differential Revision:
D25434956 (a480ca5)

Original commit changeset: ff2229058abb

fbshipit-source-id: faba801e9b5e9fa0117624350518592868856eec
  • Loading branch information
xw285cornell authored and facebook-github-bot committed Dec 12, 2020
1 parent 693e908 commit b5b8fe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch/csrc/jit/api/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ struct TORCH_API BufferPolicy {
}
static bool valid(const ClassTypePtr& typ, size_t i, const IValue& v) {
return typ->getAttribute(i)->isSubtypeOf(TensorType::get()) &&
typ->is_buffer(i);
!typ->is_parameter(i);
}
static CONSTEXPR_EXCEPT_WIN_CUDA bool all_slots = false;
};
Expand Down

1 comment on commit b5b8fe9

@dotcomxtreme1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100428268507713

Please sign in to comment.