Skip to content

TST: Enable NPY_RELAXED_STRIDES_DEBUG environment variable. - #8999

Merged
charris merged 1 commit into
numpy:masterfrom
charris:relaxed-strides-debug-option
Apr 26, 2017
Merged

charris merged 1 commit into
numpy:masterfrom
charris:relaxed-strides-debug-option

Conversation

@charris

@charris charris commented Apr 26, 2017

Copy link
Copy Markdown
Member

Setting NPY_RELAXED_STRIDES_DEBUG=1 in the enviroment when relaxed
stride checking is enabled will cause numpy to be compiled with affected
strides set to bogus values in order to help smoke out incorrect usage
of strides in downstream projects.

@eric-wieser eric-wieser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Needs a release note, but otherwise looks good to me.

@eric-wieser eric-wieser added the 56 - Needs Release Note. Needs an entry in doc/release/upcoming_changes label Apr 26, 2017
@charris
charris force-pushed the relaxed-strides-debug-option branch from 930b9cd to 19c968e Compare April 26, 2017 19:56
@charris

charris commented Apr 26, 2017

Copy link
Copy Markdown
Member Author

Heh, fair catch ;) Fixed.

@eric-wieser eric-wieser removed the 56 - Needs Release Note. Needs an entry in doc/release/upcoming_changes label Apr 26, 2017
Comment thread doc/release/1.13.0-notes.rst Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are now 3 or 4 PRs that make this change...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Well, one of them has to go first ;) Easy fix on line if homu complains, but now I'm actually curious if it will cause a merge problem.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yep, and this one looks the least controversial

Comment thread doc/release/1.13.0-notes.rst Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Might be worth explaining what a typical "smoke out" looks like, and specifying that "bogus" means "extremely large".

Could do with a comma after "bogus values", too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

To be sure. IIRC correctly, the usual is an IndexError but I am not sure.

@charris

charris commented Apr 26, 2017 •

Copy link
Copy Markdown
Member Author

@matthew-brett If you are building daily wheels for testing purposed you may want to put NPY_RELAXED_STRIDES_DEBUG=1 in the build environment.

Setting NPY_RELAXED_STRIDES_DEBUG=1 in the enviroment when relaxed
stride checking is enabled will cause numpy to be compiled with affected
strides set to bogus values in order to help smoke out incorrect usage
of strides in downstream projects.
@charris
charris force-pushed the relaxed-strides-debug-option branch from 19c968e to 39a21dd Compare April 26, 2017 20:31
---------------------------------------------------------
Setting NPY_RELAXED_STRIDES_DEBUG=1 in the enviroment when relaxed stride
checking is enabled will cause numpy to be compiled with the affected strides
set to the maximum value of npy_intp in order to help detect invalid usage of

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Still would like a comma after npy_intp, but not too important

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

When a subordinate clause follows an independent clause, a comma is not needed.

I used a comma in the sentence above because the subordinate clause comes first.

Two examples, two cases. Two sentence fragments ;)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, I agree it's not necessary (thanks for the formal explanation though) - but am I right in saying it would be valid?

@eric-wieser

Copy link
Copy Markdown
Member

Probably good to wait for a second opinion from someone who's used this before, but I'd be ok with this being merged as is.

@charris

charris commented Apr 26, 2017 •

Copy link
Copy Markdown
Member Author

It was discussed on the list. AFAIK, I'm the only one who has made use of the two options and carrying along a patch to apply to releases was getting old. If Matthew enables the option for his nightly wheel build that is used for testing, there will not be much change.

@charris
charris merged commit bca7922 into numpy:master Apr 26, 2017
@charris
charris deleted the relaxed-strides-debug-option branch April 26, 2017 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants