Пример #1
0
def _to_input_sig(inputs):
    if isinstance(inputs, rules.TypeSignature):
        return inputs
    else:
        in_type = [validate_type(x) for x in inputs]
        return rules.TypeSignature([rules.value_typed_as(x)
                                    for x in in_type])
Пример #2
0
def _to_input_sig(inputs):
    if isinstance(inputs, rules.TypeSignature):
        return inputs
    else:
        in_type = [validate_type(x) for x in inputs]
        return rules.TypeSignature([rules.value_typed_as(x)
                                    for x in in_type])
Пример #3
0
def _operation_type_conversion(inputs, output):
    in_type = [validate_type(x) for x in inputs]
    in_values = [rules.value_typed_as(_convert_types(x)) for x in in_type]
    out_type = validate_type(output)
    out_value = rules.shape_like_flatargs(out_type)
    return (in_values, out_value)
Пример #4
0
def _operation_type_conversion(inputs, output):
    in_type = [ir._validate_type(x) for x in inputs]
    in_values = [rules.value_typed_as(_convert_types(x)) for x in in_type]
    out_type = ir._validate_type(output)
    out_value = rules.shape_like_flatargs(out_type)
    return (in_values, out_value)