Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion backends/vulkan/test/op_tests/utils/aten_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
OPT_MEMORY_FORMAT = "::std::optional<at::MemoryFormat>"
OPT_SCALAR_TYPE = "::std::optional<at::ScalarType>"
STRING = "std::string_view"
OLD_STRING = "c10::string_view"
TWO_TENSOR_TUPLE = "::std::tuple<at::Tensor,at::Tensor>"
THREE_TENSOR_TUPLE = "::std::tuple<at::Tensor,at::Tensor,at::Tensor>"
TENSOR_VECTOR = "::std::vector<at::Tensor>"
7 changes: 4 additions & 3 deletions backends/vulkan/test/op_tests/utils/gen_computegraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
BOOL,
DOUBLE,
INT,
OLD_STRING,
OPT_AT_DOUBLE_ARRAY_REF,
OPT_AT_INT_ARRAY_REF,
OPT_AT_TENSOR,
Expand Down Expand Up @@ -122,7 +121,9 @@ def __init__(
ctype = cpp.argumenttype_type(
arg.type, mutable=arg.is_write, binds=arg.name
)
cpp_type = ctype.cpp_type(strip_ref=True)
cpp_type = ctype.cpp_type(strip_ref=True).replace(
"c10::string_view", STRING
)

self.args.append(
ATenArg(name=arg.name, cpp_type=cpp_type, default=arg.default)
Expand Down Expand Up @@ -494,7 +495,7 @@ def create_value_for( # noqa: C901
or ref.src_cpp_type == OPT_MEMORY_FORMAT
):
ret_str += "add_none(); \n"
elif ref.src_cpp_type == STRING or ref.src_cpp_type == OLD_STRING:
elif ref.src_cpp_type == STRING:
ret_str += f"add_string(std::string({ref.src_cpp_name})); \n"
elif ref.src_cpp_type == TWO_TENSOR_TUPLE:
ret_str += f"add_value_list({{{ref.name}_first, {ref.name}_second}}); \n"
Expand Down
5 changes: 2 additions & 3 deletions backends/vulkan/test/op_tests/utils/gen_correctness_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
BOOL,
DOUBLE,
INT,
OLD_STRING,
OPT_AT_DOUBLE_ARRAY_REF,
OPT_AT_INT_ARRAY_REF,
OPT_AT_TENSOR,
Expand Down Expand Up @@ -156,7 +155,7 @@ def call_data_gen_fn(self, arg: Argument, data: Any, terminate: bool = True) ->

def create_input_data(self, arg: Argument, data: Any) -> str: # noqa: C901
ctype = cpp.argumenttype_type(arg.type, mutable=arg.is_write, binds=arg.name)
cpp_type = ctype.cpp_type(strip_ref=True)
cpp_type = ctype.cpp_type(strip_ref=True).replace("c10::string_view", STRING)

# Short cut exit for TENSORLIST, because it needs multiple lines of
# construction, deviates from the rest.
Expand Down Expand Up @@ -218,7 +217,7 @@ def create_input_data(self, arg: Argument, data: Any) -> str: # noqa: C901
ret_str += "std::nullopt;"
else:
ret_str += f"{str(data)};"
elif cpp_type == STRING or cpp_type == OLD_STRING:
elif cpp_type == STRING:
ret_str += f'std::string_view("{data}");'
elif (
cpp_type == OPT_SCALAR_TYPE
Expand Down
1 change: 0 additions & 1 deletion exir/verification/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <c10/core/ScalarType.h>
#include <c10/macros/Macros.h>
#include <c10/util/C++17.h>
#include <c10/util/Optional.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <torch/extension.h> // @manual=//caffe2:torch_extension
Expand Down
Loading