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

Method AssignInputRange

paddle/phi/core/kernel_context.cc:80–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void KernelContext::AssignInputRange(std::pair<int, int>&& range, size_t idx) {
81 if (idx < input_range_.size()) {
82 input_range_[idx] = std::move(range);
83 } else if (idx == input_range_.size()) {
84 input_range_.emplace_back(range);
85 } else {
86 PADDLE_THROW(common::errors::PreconditionNotMet(
87 "Invalid idx when trying to set InputRange, "
88 "index is `%d`, it is greater than the size(%d) of InputRange.",
89 idx,
90 input_range_.size()));
91 }
92}
93
94void KernelContext::AssignOutputRange(std::pair<int, int>&& range, size_t idx) {
95 if (idx < output_range_.size()) {

Callers 3

BuildPhiKernelContextMethod · 0.80
TESTFunction · 0.80

Calls 2

sizeMethod · 0.45
emplace_backMethod · 0.45

Tested by 1

TESTFunction · 0.64