Skip to content
This repository was archived by the owner on Jun 11, 2026. It is now read-only.
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
2 changes: 1 addition & 1 deletion src/python/ksc/cgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def entry_point_cpp_type(t, use_torch):
return scalar_type_to_cpp_map[t.kind]
elif t.is_tuple:
return (
"ks::Tuple<"
"std::tuple<"
+ ", ".join(
entry_point_cpp_type(child, use_torch) for child in t.tuple_elems()
)
Expand Down
14 changes: 7 additions & 7 deletions src/runtime/knossos-entry-points.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,23 @@ struct Converter
};

template<typename ...KsElementTypes, typename ...EntryPointElementTypes>
struct Converter<ks::Tuple<KsElementTypes...>, ks::Tuple<EntryPointElementTypes...>>
struct Converter<ks::Tuple<KsElementTypes...>, std::tuple<EntryPointElementTypes...>>
{
template<size_t ...Indices>
static ks::Tuple<KsElementTypes...> to_ks_impl(ks::Tuple<EntryPointElementTypes...> arg, std::index_sequence<Indices...>) {
return ks::make_Tuple(convert_argument<KsElementTypes>(ks::get<Indices>(arg))...);
static ks::Tuple<KsElementTypes...> to_ks_impl(std::tuple<EntryPointElementTypes...> arg, std::index_sequence<Indices...>) {
return ks::make_Tuple(convert_argument<KsElementTypes>(std::get<Indices>(arg))...);
}

static ks::Tuple<KsElementTypes...> to_ks(ks::Tuple<EntryPointElementTypes...> arg) {
static ks::Tuple<KsElementTypes...> to_ks(std::tuple<EntryPointElementTypes...> arg) {
return to_ks_impl(arg, std::index_sequence_for<EntryPointElementTypes...>{});
}

template<size_t ...Indices>
static ks::Tuple<EntryPointElementTypes...> from_ks_impl(ks::Tuple<KsElementTypes...> ret, std::index_sequence<Indices...>) {
return ks::make_Tuple(convert_return_value<EntryPointElementTypes>(ks::get<Indices>(ret))...);
static std::tuple<EntryPointElementTypes...> from_ks_impl(ks::Tuple<KsElementTypes...> ret, std::index_sequence<Indices...>) {
return std::make_tuple(convert_return_value<EntryPointElementTypes>(ks::get<Indices>(ret))...);
}

static ks::Tuple<EntryPointElementTypes...> from_ks(ks::Tuple<KsElementTypes...> ret) {
static std::tuple<EntryPointElementTypes...> from_ks(ks::Tuple<KsElementTypes...> ret) {
return from_ks_impl(ret, std::index_sequence_for<KsElementTypes...>{});
}
};
Expand Down