Summary
tci::save does not write the tensor to the exact path the caller supplied when that path lacks a recognized extension. A subsequent tci::load against the same path then throws "could not find file", breaking the save → load roundtrip. This affects both conformance tests that exercise tci::save / tci::load.
Reproduction
The conformance tests use a path without an extension on purpose, to keep the spec backend-neutral:
std::string filepath = "/tmp/tcict_test_roundtrip"; // no extension
tci::save(ctx, tensor, filepath);
auto loaded = tci::load<TenT>(ctx, filepath); // throws: file not found
Both test_save_load_roundtrip (io_operations.h) and test_load_data_integrity (io_operations.h) fail with:
io_operations.h:32: unexpected exception: tci::load could not find file: /tmp/tcict_test_roundtrip
io_operations.h:62: unexpected exception: tci::load could not find file: /tmp/tcict_test_load_integrity
The test removes any stale file before save, so the failure is not a leftover-file issue. The save call returns without throwing, but no file appears at the supplied path.
Suspected cause
Recent cytnx commit 6fb958a fix(io): remove stale rename after Save for non-.cytn paths is in the same area; the save path may be writing to <filepath>.cytnx (or similar) and not exposing the resulting filename to the caller.
Repro environment
Same as #(exp-real bug above): cytnx a60fb58, tcict pin 13f2f297, macOS / Homebrew toolchain.
Surfaced by
Both real (cytnx_double, cytnx_float) and complex (cytnx_complex128, cytnx_complex64) instances reproduce — this is not a type-specific issue. Hits all 4 type variants once the bulk-macros runner is in place (8 failing test cases total).
Summary
tci::savedoes not write the tensor to the exact path the caller supplied when that path lacks a recognized extension. A subsequenttci::loadagainst the same path then throws "could not find file", breaking the save → load roundtrip. This affects both conformance tests that exercisetci::save/tci::load.Reproduction
The conformance tests use a path without an extension on purpose, to keep the spec backend-neutral:
Both
test_save_load_roundtrip(io_operations.h) andtest_load_data_integrity(io_operations.h) fail with:The test removes any stale file before save, so the failure is not a leftover-file issue. The save call returns without throwing, but no file appears at the supplied path.
Suspected cause
Recent cytnx commit
6fb958a fix(io): remove stale rename after Save for non-.cytn pathsis in the same area; the save path may be writing to<filepath>.cytnx(or similar) and not exposing the resulting filename to the caller.Repro environment
Same as #(exp-real bug above): cytnx a60fb58, tcict pin 13f2f297, macOS / Homebrew toolchain.
Surfaced by
Both real (
cytnx_double,cytnx_float) and complex (cytnx_complex128,cytnx_complex64) instances reproduce — this is not a type-specific issue. Hits all 4 type variants once the bulk-macros runner is in place (8 failing test cases total).