Skip to content

Support more dtypes in pad_nd #7842

Closed

Description

@function2-llx

To be brief, I just have no idea why torch.bool (and other integer dtypes except for torch.int32) is considered to be not supported by PyTorch (it seems to work for me with PyTorch 2.3). I will be glad to add a PR.

if mode in {"constant", "reflect", "edge", "replicate", "wrap", "circular"} and img.dtype not in {
torch.int16,
torch.int64,
torch.bool,
torch.uint8,
}:

Activity

  1. changed the title [-]Support `torch.float32` in `pad_nd`[/-] [+]Support more dtypes in `pad_nd`[/+] on Jun 12, 2024
  2. shubham-61969 commented on Dec 24, 2025

    @shubham-61969
    Contributor

    Hi @function2-llx @KumoLiu ,

    I’d like to explore this issue and work on adding support for additional dtypes in
    pad_nd. I’ve gone through the contributing guidelines, and since this issue is
    labeled as “Contribution wanted”, I’d like to take it up.

    This will be my first time working with the MONAI repository. I’ll validate the
    behavior with recent PyTorch versions and follow up with a PR if everything looks
    good.

  3. added 2 commits that reference this issue on Feb 22, 2026
    790cdaa
    7aac845
  4. added a commit that references this issue on Feb 23, 2026
    1149b50
  5. added 2 commits that reference this issue on Feb 24, 2026
    4f77be6
    8045b8f
  6. added a commit that references this issue on May 25, 2026
    8b93894
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions