Skip to content

Fix for gh-1180: missing F-contiguous flags after calling squeeze #1181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2023

Conversation

oleksandr-pavlyk
Copy link
Contributor

Closes gh-1180

Utility determining contiguity flags of the newly constructed array was not setting F-contiguous flags where it should have in a special case of 1D array.

In [1]: import dpctl.tensor as dpt, dpctl

In [2]: x = dpt.ones((1,3,1))

In [3]: y = dpt.squeeze(x)

In [4]: x.flags, y.flags
Out[4]:
(  C_CONTIGUOUS : True
   F_CONTIGUOUS : True
   WRITABLE : True,
   C_CONTIGUOUS : True
   F_CONTIGUOUS : True
   WRITABLE : True)
  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you opening the PR as a draft?

Utility determining contiguity flags of the newly constructed array
was not setting F-contiguous flags where it should have in a special
case of 1D array.
@github-actions
Copy link

@coveralls
Copy link
Collaborator

Coverage Status

Coverage: 83.263%. Remained the same when pulling 005b569 on fix-gh-1180 into e7fc039 on master.

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.3dev1=py310h76be34b_5 ran successfully.
Passed: 120
Failed: 887
Skipped: 109

Copy link
Collaborator

@antonwolfy antonwolfy left a comment

Choose a reason for hiding this comment

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

I've checked the affected scenario, no more issue. Thank you @oleksandr-pavlyk !

@oleksandr-pavlyk oleksandr-pavlyk merged commit 37497b2 into master Apr 21, 2023
@oleksandr-pavlyk oleksandr-pavlyk deleted the fix-gh-1180 branch April 21, 2023 21:18
@github-actions
Copy link

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.3dev1=py310h76be34b_5 ran successfully.
Passed: 120
Failed: 887
Skipped: 109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dpt.squeeze() returns array without F-contigious flag
3 participants