MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / AssignOutputRange

Method AssignOutputRange

paddle/phi/core/kernel_context.cc:94–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void KernelContext::AssignOutputRange(std::pair<int, int>&& range, size_t idx) {
95 if (idx < output_range_.size()) {
96 output_range_[idx] = std::move(range);
97 } else if (idx == output_range_.size()) {
98 output_range_.emplace_back(range);
99 } else {
100 PADDLE_THROW(common::errors::PreconditionNotMet(
101 "Invalid idx when trying to set InputRange, "
102 "index is `%d`, it is greater than the size(%d) of InputRange.",
103 idx,
104 output_range_.size()));
105 }
106}
107
108const std::pair<int, int>& KernelContext::InputRangeAt(size_t idx) const {
109 return input_range_.at(idx);

Callers 3

BuildPhiKernelContextMethod · 0.80
TESTFunction · 0.80

Calls 2

sizeMethod · 0.45
emplace_backMethod · 0.45

Tested by 1

TESTFunction · 0.64