Closed drhagen closed 10 months ago
Ugh, this complicates the code a lot for very little benefit. I can see why TACO never properly supported it. The porcelain functions can still convert all floats to order-0 tensors and return floats when appropriate (e.g. x @ y
).
Scalars in tensor expressions should be interpreted as
float
s. The Tensora compiler could generate code that acceptsdouble
s, but TACO will not. We could shim the TACO code so thatevaluate_taco
still acceptsfloat
s, but that sounds like a source of ambiguity.Here are the steps needed to implement this:
generate_c_code_tensora
generate C code that takesdouble
sgenerate_c_code_taco
fail on any scalar formatPureTensorMethod.__call__
handle inputs and outputs that are scalar arguments. Should allowint
andfloat
as inputs. Should return a Pythonfloat
as an output.