Description
test_contract_dot_product performs a full contraction (dot product) and asserts:
auto c_shape = tci::shape(ctx, c);
TCICT_ASSERT(c_shape.size() == 1);
The TCI v1 spec states "Empty gamma yields a scalar", but the representation of a zeroth-order (scalar) tensor is ambiguous. Backends may represent it as:
shape = {} (order 0, shape.size() == 0)
shape = {1} (order 1, shape.size() == 1)
The current test assumes the latter, but the CUDA-X backend produces the former.
Questions
- Should the TCI spec clarify the canonical representation of scalar tensors?
- Should the conformance test accept both representations?
Affected tests
test_contract_dot_product (linear_algebra.h:299)
Description
test_contract_dot_productperforms a full contraction (dot product) and asserts:The TCI v1 spec states "Empty gamma yields a scalar", but the representation of a zeroth-order (scalar) tensor is ambiguous. Backends may represent it as:
shape = {}(order 0,shape.size() == 0)shape = {1}(order 1,shape.size() == 1)The current test assumes the latter, but the CUDA-X backend produces the former.
Questions
Affected tests
test_contract_dot_product(linear_algebra.h:299)