Skip to content

device: drop btasUMTensorVarray support - #615

Open
ajay-mk wants to merge 7 commits into
masterfrom
ajay/feature/remove-btas-um-tensor
Open

ajay-mk wants to merge 7 commits into
masterfrom
ajay/feature/remove-btas-um-tensor

Conversation

@ajay-mk

@ajay-mk ajay-mk commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Follow-up promised in ValeevGroup/tiledarray#554: removes the BTAS-based unified-memory tile (btasUMTensorVarray), which TA::UMTensor replaces.

Change

  • Removed: device/btas_um_tensor.h and .cpp, the btasUMTensorVarray and device_um_btas_varray aliases in fwd.h, and the TA_DEVICE_LEGACY_UM_CONVERSION switch (read only in that header).
  • Tests: tensor_um.cpp and expressions_device_um.cpp tested only the BTAS tile and are removed. The five librett_um_tensor* cases in librett.cpp (ranks 2 to 6) now permute UMTensor<double> tiles. They use double rather than int, because only BLAS element types take the device (librett) path.
  • Examples: ta_dense_device and ta_vector_device are removed, since ta_dense_um_tensor and ta_vector_um_tensor cover them. ta_cc_abcd_device, ta_reduce_device and device_task now use UMTensor.
  • AGENTS.md: no longer mentions btas_um_tensor.h or the legacy switch, and says GPU unified-memory arrays use TA::UMTensor.
  • Also removed: device/btas.h and device/um_storage.h, whose only user was the BTAS tile.
  • Ported after rebase: tests/disk_tile.cpp (added to master after this PR was opened) uses UMTensor for its disk-backed device cases. const_block_is_a_view moved to the UMTensor device suite. The librett UM cases now check that permute takes the device path.

Downstream impact

This is a source and archive break for GPU users:

  • TA::btasUMTensorVarray, TA::device_um_btas_varray and the <TiledArray/device/btas_um_tensor.h>, <TiledArray/device/btas.h> and <TiledArray/device/um_storage.h> headers are gone. Code naming them (e.g. MPQC GPU builds) must switch to TA::UMTensor<T> from <TiledArray/device/tensor.h>.
  • Archives of Tile<btasUMTensorVarray<T>> arrays cannot be read back as UMTensor arrays, and nothing marks the format, so a mismatched load is not rejected cleanly.

@ajay-mk
ajay-mk added this pull request to stack #616 November 12, 2026 16:57
Base automatically changed from ajay/feature/umtensor to master November 12, 2026 18:57
ajay-mk and others added 7 commits November 12, 2026 13:58
disk_tile.cpp landed on master after the BTAS UM tile was dropped here and
still used btasUMTensorVarray, so the device build of ta_test did not compile.
UMTensor::permute falls back to the host for element types without device
kernels or under a Host execution space; the value checks alone would not
notice that librett was never called.
The case went away with expressions_device_um.cpp; it is the only device
check that a const preserve_lobound block hands its consumers the array's
own tiles rather than copies.
Their only user was the BTAS UM tile.
@evaleev
evaleev force-pushed the ajay/feature/remove-btas-um-tensor branch from bf3cf35 to 52f6479 Compare November 12, 2026 19:34
@ajay-mk
ajay-mk marked this pull request as ready for review November 12, 2026 19:52

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants