Skip to content

Port vision to AIX #8913

@KamathForAIX

Description

@KamathForAIX

AIX is a Unix-based operating system used in Power Enterprise Hardware. We have recently ported pytorch (CPU only) to AIX and will also want to have vision in AIX for our users.

Our changes are minimum, and we would like to raise a PR for the same to be part of the vision package community.

We only saw one place where we had an issue in the code.

When we used the MNIST dataset, we encountered an extra swap which resulted in an error as shown below.

 File "//pytorch_testing/test_MNIST.py", line 12, in <module>
    dataset = MNIST(root = 'data/', download = True)
  File "/opt/freeware/lib64/python3.9/site-packages/torchvision/datasets/mnist.py", line 105, in __init__
    self.data, self.targets = self._load_data()
  File "/opt/freeware/lib64/python3.9/site-packages/torchvision/datasets/mnist.py", line 124, in _load_data
    data = read_image_file(os.path.join(self.raw_folder, image_file))
  File "/opt/freeware/lib64/python3.9/site-packages/torchvision/datasets/mnist.py", line 555, in read_image_file
    x = read_sn3_pascalvincent_tensor(path, strict=False)
  File "/opt/freeware/lib64/python3.9/site-packages/torchvision/datasets/mnist.py", line 525, in read_sn3_pascalvincent_tensor
    assert 1 <= n 

If we block an extra swap which was for a big endian platform we do not have this problem which this PR does.

Rest are okay :)

Kindly let us know if we can be part of this package and also what you think about this changes in the PR which will be raised soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions