MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ validate_input()

bool MayaFlux::Yantra::TensorConverter::validate_input ( const input_type & input) const
nodiscardoverride

True when the input holds a valid tensor the configured conversion accepts.

Definition at line 7 of file TensorConverter.cpp.

8{
9 if (!input.data)
10 return false;
11
12 const auto view = input.data->view();
13 if (!view)
14 return false;
15
16 const auto& cfg = config<TensorConversionConfig>();
17 return Kakshya::diagnose_conversion(view->spec(), cfg.target, cfg.quantization).empty();
18}
std::string diagnose_conversion(const TensorSpec &source, TensorDType target, const std::optional< TensorQuantization > &quantization)
Empty when a tensor can be converted to a type, otherwise the reason it cannot.

References MayaFlux::Yantra::ComputeOperation< std::shared_ptr< Kakshya::TensorContainer > >::config(), and MayaFlux::Kakshya::diagnose_conversion().

Here is the call graph for this function: