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 autoto get started.- This will also create a virtual environment in
.venv/.
- This will also create a virtual environment in
- The main
torch.Tensorsubclass is found insrc/complex_tensor/complex_tensor.py. - Operations are implemented in the
src/complex_tensor/ops/directory._common.pydefines some basic utility functions.aten.pydefines overloads fortorch.ops.aten.prims.pydoes 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
OpInfos intorch.testing._internal.common_methods_invocations.op_dbare tested. - Exceptions are noted in-tree with a
TODO. - A warning is emitted during
pytestnoting 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.