MCPcopy Create free account
hub / github.com/NVIDIA/cutlass / arg_as_SplitKModeID

Function arg_as_SplitKModeID

tools/profiler/src/problem_space.cpp:1045–1068  ·  view source on GitHub ↗

Lexically casts an argument to an int64 if it is defined. Returns true if not null.

Source from the content-addressed store, hash-verified

1043
1044/// Lexically casts an argument to an int64 if it is defined. Returns true if not null.
1045bool arg_as_SplitKModeID(
1046 library::SplitKMode &split_k_mode,
1047 KernelArgument::Value const *value_ptr) {
1048
1049 if (value_ptr->not_null) {
1050 if (value_ptr->argument->description->type == ArgumentTypeID::kEnumerated) {
1051
1052 split_k_mode = library::from_string<library::SplitKMode>(
1053 static_cast<EnumeratedTypeArgument::EnumeratedTypeValue const *>(value_ptr)->element);
1054
1055 if (split_k_mode == library::SplitKMode::kInvalid) {
1056 throw std::runtime_error(
1057 "arg_as_SplitKModeID() - illegal cast.");
1058 }
1059 }
1060 else {
1061
1062 throw std::runtime_error(
1063 "arg_as_SplitKModeID() - illegal cast.");
1064 }
1065 return true;
1066 }
1067 return false;
1068}
1069
1070/// Lexically casts an argument to an int64 if it is defined. Returns true if not null.
1071bool arg_as_SplitKModeID(

Callers

nothing calls this directly

Calls 3

argument_indexMethod · 0.80
getMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected