Skip to content

Add a script to convert a logical tensor to a physical tensor - #29

Open
tnakaike wants to merge 1 commit into
torch-spyre:mainfrom
tnakaike:nakaike/spyre-layout-script
Open

tnakaike wants to merge 1 commit into
torch-spyre:mainfrom
tnakaike:nakaike/spyre-layout-script

Conversation

@tnakaike

Copy link
Copy Markdown

This PR adds a script to convert a logical tensor to a physical tensor on Spyre.

As for now, this script depends on a fork of torch-spyre which can be installed same as an original torch-spyre.

The following is a basic usage.

$ python3 ./scripts/convert_to_spyre_layout.py --shape 32 128
logical      shape=(32, 128)  dtype=torch.float16
device_size  [2, 32, 64]
stride_map   [64, 128, 1]
device_dtype DataFormats.SEN169_FP16
physical     shape=(2, 32, 64)  dtype=torch.float16
round-trip   OK (exact) (recovered shape=(32, 128))

Signed-off-by: Takuya Nakaike <nakaike@jp.ibm.com>
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.

1 participant