Skip to content

Commit 242f2c0

Browse files
dbortfacebook-github-bot
authored andcommitted
Delete deprecated non_const_buffer methods from Program (#4272)
Summary: Pull Request resolved: #4272 `MethodMeta` is the new way to get this information. Reviewed By: tarun292 Differential Revision: D59782278 fbshipit-source-id: 1e1df006ee95886aa80b9704bfda488e1ad93dcf
1 parent ef640bf commit 242f2c0

2 files changed

Lines changed: 0 additions & 57 deletions

File tree

runtime/executor/program.cpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -340,33 +340,6 @@ Result<const void*> Program::get_constant_buffer_data(
340340
}
341341
}
342342

343-
Result<int64_t> Program::get_non_const_buffer_size(
344-
size_t buffer_index,
345-
const char* method_name) const {
346-
auto plan = get_execution_plan(internal_program_, method_name);
347-
if (!plan.ok()) {
348-
return plan.error();
349-
}
350-
auto non_const_buffer_sizes = plan.get()->non_const_buffer_sizes();
351-
if (buffer_index >= non_const_buffer_sizes->size()) {
352-
ET_LOG(
353-
Error,
354-
"invalid buffer index %zu for size %zu",
355-
buffer_index,
356-
(size_t)non_const_buffer_sizes->size());
357-
return Error::InvalidArgument;
358-
}
359-
return (*(plan.get()->non_const_buffer_sizes()))[buffer_index];
360-
}
361-
362-
Result<size_t> Program::num_non_const_buffers(const char* method_name) const {
363-
auto plan = get_execution_plan(internal_program_, method_name);
364-
if (!plan.ok()) {
365-
return plan.error();
366-
}
367-
return plan.get()->non_const_buffer_sizes()->size();
368-
}
369-
370343
Result<const char*> Program::get_output_flattening_encoding(
371344
const char* method_name) const {
372345
auto plan = get_execution_plan(internal_program_, method_name);

runtime/executor/program.h

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -135,36 +135,6 @@ class Program final {
135135
*/
136136
Result<MethodMeta> method_meta(const char* method_name) const;
137137

138-
/**
139-
* DEPRECATED: Use MethodMeta instead.
140-
*
141-
* Get the size of the buffer with index buffer_index. Note that this function
142-
* does not return the correct value for index 0 which denotes constant
143-
* memory. Only index >= 1 should be used to retrieve the size of
144-
* non-constant pools.
145-
* @param[in] buffer_index the index of the buffer in the non_const_buffer
146-
* list
147-
* @param[in] method_name The name of the method to retrieve buffer
148-
* information from.
149-
* @return The size of the non_constant buffer corresponding to buffer_index,
150-
* or Error if it cannot be retrieved.
151-
*/
152-
__ET_DEPRECATED Result<int64_t> get_non_const_buffer_size(
153-
size_t buffer_index,
154-
const char* method_name = "forward") const;
155-
156-
/**
157-
* DEPRECATED: Use MethodMeta instead.
158-
*
159-
* Get the number of non_constant buffers.
160-
* @param[in] method_name The name of the method to get the buffer amounts
161-
* for.
162-
* @return The number of non_constant buffers, or Error if it cannot be
163-
* retrieved.
164-
*/
165-
__ET_DEPRECATED Result<size_t> num_non_const_buffers(
166-
const char* method_name = "forward") const;
167-
168138
/**
169139
* DEPRECATED: Get the pytree encoding string for the output. Deprecated as
170140
* this functionality will eventually move out of the core program into a

0 commit comments

Comments
 (0)