Skip to content

torch.bcomplex32 shell dtype. - #173783

Closed
hameerabbasi wants to merge 13 commits into
mainfrom
hameerabbasi/bcomplex32
Closed

hameerabbasi wants to merge 13 commits into
mainfrom
hameerabbasi/bcomplex32

Conversation

@hameerabbasi

@hameerabbasi hameerabbasi commented Jan 29, 2026 •

Copy link
Copy Markdown
Collaborator

@pytorch-bot pytorch-bot Bot added ciflow/inductor module: cpu CPU specific problem (e.g., perf, algorithm) labels Jan 29, 2026
@pytorch-bot

pytorch-bot Bot commented Jan 29, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/173783

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 2 Unrelated Failures

As of commit 961ec29 with merge base e8fdac8 (image):

NEW FAILURE - The following job has failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following job failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@hameerabbasi
hameerabbasi force-pushed the hameerabbasi/bcomplex32 branch 2 times, most recently from 8626d6b to 9602874 Compare January 29, 2026 13:16
@hameerabbasi hameerabbasi added module: complex Related to complex number support in PyTorch and removed module: cpu CPU specific problem (e.g., perf, algorithm) ciflow/inductor labels Jan 29, 2026
@pytorch-bot pytorch-bot Bot added ciflow/inductor module: cpu CPU specific problem (e.g., perf, algorithm) labels Jan 29, 2026
@hameerabbasi hameerabbasi added the release notes: complex release notes category label Jan 29, 2026
@hameerabbasi
hameerabbasi force-pushed the hameerabbasi/bcomplex32 branch 7 times, most recently from bb469ef to cfd4d49 Compare February 2, 2026 11:19
@hameerabbasi
hameerabbasi force-pushed the hameerabbasi/bcomplex32 branch from cfd4d49 to 22e8cde Compare February 2, 2026 12:11
Comment thread c10/core/ScalarType.h
Comment on lines -219 to 222
// BFloat16 has range equivalent to Float,
// so we map it to ComplexFloat.
return ScalarType::ComplexFloat;
return ScalarType::BComplex32;
case ScalarType::Half:

@hameerabbasi hameerabbasi Feb 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is technically bc-breaking, makes it so that complex(bfloat16, bfloat16) -> bcomplex32. It was previously complex64.

@hameerabbasi hameerabbasi Feb 3, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems one weird consequence of this is op(bfloat16, python_complex_scalar) doesn't work anymore, as it tries to compute in bcomplex32.

@hameerabbasi
hameerabbasi force-pushed the hameerabbasi/bcomplex32 branch from 22e8cde to 11ba0e7 Compare February 2, 2026 16:09
@hameerabbasi hameerabbasi added the module: bc-breaking Related to a BC-breaking change label Feb 2, 2026
@pytorch-bot pytorch-bot Bot added the topic: bc breaking topic category label Feb 2, 2026
}

_real_to_complex_dtype_map = {
torch.float16: torch.complex32,
torch.bfloat16: torch.complex64,
torch.bfloat16: torch.bcomplex32,

@hameerabbasi hameerabbasi Feb 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is related to the same BC break mentioned in #173783 (comment)

@hameerabbasi
hameerabbasi force-pushed the hameerabbasi/bcomplex32 branch from 86f76c9 to 6a04945 Compare February 3, 2026 07:21
@hameerabbasi

hameerabbasi commented Feb 3, 2026 •

Copy link
Copy Markdown
Collaborator Author

6a04945 and 949adf5 show some of the testing fixes needed due to the BC break described in #173783 (comment).

@hameerabbasi
hameerabbasi force-pushed the hameerabbasi/bcomplex32 branch from b9b68ef to 7b141cc Compare February 3, 2026 16:28
@hameerabbasi
hameerabbasi marked this pull request as ready for review February 4, 2026 12:49
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Successfully rebased hameerabbasi/bcomplex32 onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout hameerabbasi/bcomplex32 && git pull --rebase)

@hameerabbasi

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge -i

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged while ignoring the following 41 checks: pull / linux-jammy-aarch64-py3.10 / test-osdc (default, 3, 5, mt-l-arm64g4-16-62), pull / linux-jammy-aarch64-py3.10 / test-osdc (default, 5, 5, mt-l-arm64g4-16-62), pull / linux-jammy-py3.14-clang18 / test-osdc (crossref, 1, 2, mt-l-x86iavx512-8-64), pull / linux-jammy-py3.14-clang18 / test-osdc (default, 3, 5, mt-l-x86iavx512-16-128), pull / linux-jammy-py3.14-clang18 / test-osdc (default, 5, 5, mt-l-x86iavx512-16-128), pull / linux-jammy-py3.10-clang18 / test-osdc (default, 3, 5, mt-l-x86iavx512-16-128), pull / linux-jammy-py3.10-clang18 / test-osdc (default, 5, 5, mt-l-x86iavx512-16-128), pull / linux-jammy-py3.10-clang18 / test-osdc (crossref, 2, 2, mt-l-x86iavx512-8-64), pull / linux-jammy-py3.14t-clang18 / test-osdc (default, 5, 5, mt-l-x86iavx512-16-128), pull / linux-jammy-py3.14t-clang18 / test-osdc (crossref, 1, 2, mt-l-x86iavx512-8-64), pull / linux-docs / build-docs-cpp-false, pull / linux-docs / build-docs-python-false, pull / linux-jammy-py3.10-gcc11 / test-osdc (default, 5, 5, mt-l-x86iavx512-16-128), pull / linux-jammy-py3.10-gcc11 / test-osdc (default, 3, 5, mt-l-x86iavx512-16-128), pull / linux-jammy-py3.10-clang18-asan / test-osdc (default, 7, 7, mt-l-x86iavx512-16-128), pull / linux-jammy-py3.10-clang18-asan / test-osdc (default, 6, 7, mt-l-x86iavx512-16-128), trunk / win-vs2022-cuda13.0-py3 / build, trunk / win-vs2022-cpu-py3 / build, trunk / macos-py3-arm64 / test (default, 1, 3, macos-m1-stable), trunk / linux-jammy-aarch64-py3.10 / test-osdc (default, 1, 5, mt-l-arm64g3-16-62), trunk / linux-jammy-aarch64-py3.10 / test-osdc (default, 4, 5, mt-l-arm64g3-16-62), trunk / linux-jammy-aarch64-py3.10 / test (default, 3, 5, linux.arm64.m7g.4xlarge), trunk / linux-jammy-aarch64-py3.10 / test (default, 2, 5, linux.arm64.m7g.4xlarge), trunk / linux-jammy-aarch64-py3.10 / test-osdc (default, 3, 5, mt-l-arm64g3-16-62), trunk / linux-jammy-aarch64-py3.10 / test (default, 5, 5, linux.arm64.m7g.4xlarge), trunk / linux-jammy-rocm-py3.10-mi355 / test (default, 3, 10, linux.rocm.gpu.gfx950.1), trunk / linux-jammy-rocm-py3.10-mi355 / test (default, 6, 10, linux.rocm.gpu.gfx950.1), trunk / linux-jammy-rocm-py3.10-mi355 / test (default, 10, 10, linux.rocm.gpu.gfx950.1), trunk / linux-jammy-rocm-py3.10-mi355 / test (default, 5, 10, linux.rocm.gpu.gfx950.1), trunk / linux-jammy-rocm-py3.10-mi355 / test (default, 2, 10, linux.rocm.gpu.gfx950.1), trunk / linux-jammy-rocm-py3.10-mi355 / test (default, 7, 10, linux.rocm.gpu.gfx950.1), trunk / linux-jammy-rocm-py3.10-mi355 / test (distributed, 4, 4, linux.rocm.gpu.gfx950.2), trunk / linux-jammy-rocm-py3.10-mi355 / test (default, 1, 10, linux.rocm.gpu.gfx950.1), trunk / linux-jammy-rocm-py3.10-mi355 / test (default, 8, 10, linux.rocm.gpu.gfx950.1), trunk / linux-jammy-rocm-py3.10-mi355 / test (distributed, 1, 4, linux.rocm.gpu.gfx950.2), trunk / linux-jammy-rocm-py3.10-mi355 / test (default, 9, 10, linux.rocm.gpu.gfx950.1), torchtitan-test / torchtitan-x-pytorch-test / test (torchtitan_models_integration, 1, 1, linux.g5.48xlarge.nvidia.gpu), torchtitan-test / torchtitan-x-pytorch-test / test-osdc (torchtitan_models_integration, 1, 1, mt-l-x86aavx2-189-704-a10g-8), torchtitan-test / torchtitan-x-pytorch-test / test-osdc (torchtitan_features_integration, 1, 1, mt-l-x86aavx2-189-704-a10g-8), torchtitan-test / torchtitan-x-pytorch-test / test (torchtitan_features_integration, 1, 1, linux.g5.48xlarge.nvidia.gpu), Meta Internal-Only Changes Check

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@hameerabbasi

Copy link
Copy Markdown
Collaborator Author

@pytorchbot rebase

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Successfully rebased hameerabbasi/bcomplex32 onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout hameerabbasi/bcomplex32 && git pull --rebase)

@hameerabbasi

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge -i

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged while ignoring the following 1 checks: Meta Internal-Only Changes Check

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: 1 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

@hameerabbasi

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge -i

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command
For more information see pytorch-bot wiki.

@hameerabbasi hameerabbasi mentioned this pull request Jun 10, 2026
4 tasks done
@hameerabbasi

Copy link
Copy Markdown
Collaborator Author

Superseded by #186928

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

Labels

ci-no-td Do not run TD on this PR ciflow/inductor ciflow/torchtitan Run TorchTitan integration tests ciflow/trunk Trigger trunk jobs on your pull request Merged merging module: bc-breaking Related to a BC-breaking change module: complex Related to complex number support in PyTorch module: cpu CPU specific problem (e.g., perf, algorithm) module: inductor open source release notes: complex release notes category Reverted topic: bc breaking topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants