Subclass of torch.Tensor
for working with complex numbers.
For now, the development setup uses the CPU version of PyTorch only.
- Install
uv
- Run the tests with
uv run pytest -n auto
to get started.- This will also create a virtual environment in
.venv/
.
- This will also create a virtual environment in
- The main
torch.Tensor
subclass is found insrc/complex_tensor/complex_tensor.py
. - Operations are implemented in the
src/complex_tensor/ops/
directory._common.py
defines some basic utility functions.aten.py
defines overloads fortorch.ops.aten
.prims.py
does the same fortorch.ops.prims
.- Currently, this directory is empty.
- Tests are located in
src/complex_tensor/test
.- Testing currently needs to be expanded; currently only tests which provide
OpInfo
s intorch.testing._internal.common_methods_invocations.op_db
are tested. - Exceptions are noted in-tree with a
TODO
. - A warning is emitted during
pytest
noting the missing ops.
- Testing currently needs to be expanded; currently only tests which provide
This repository is currently WIP, which means not all ops are implemented, but many common ones are.