Skip to content

Conversation

@cpuhrsch
Copy link
Contributor

No description provided.

@cpuhrsch cpuhrsch changed the title Change vml.h to support sizes greater than 2**32 - 1 [DRAFT!] Change vml.h to support sizes greater than 2**32 - 1 Feb 20, 2019
Copy link
Contributor

@soumith soumith left a comment

Choose a reason for hiding this comment

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

what happens here if MKL_INT is int64_t? will it silently fail, or does it work fine?

If there's silent failure, can you static_assert

@gchanan
Copy link
Contributor

gchanan commented Feb 20, 2019

can we add a test? (how expensive is it?)

@cpuhrsch
Copy link
Contributor Author

@soumith - I think we'd need to worry about size_t, but for int64_t the max value should then cause it always stick to the first branch.

There's a bunch of stuff left to do here, including benchmarks on the impact of writing these branches (which I'd be surprised if there are any).

A static assert is still a good idea. In general, we should move all includes of mkl.h into a single location and reference our own header. There are some implicit settings one can do by defining variables before the include. This can then also include the static assert, which is a good way to check that PyTorch is only built with the lp64 version (as oppposed to ilp64).

@gchanan - Since this is very specific to MKL VML and it's referenced in a single location, I'm not sure it's worth adding this to the tests we run for every built.

@gchanan
Copy link
Contributor

gchanan commented Feb 20, 2019

@gchanan - Since this is very specific to MKL VML and it's referenced in a single location, I'm not sure it's worth adding this to the tests we run for every built.

We need nightlies!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@cpuhrsch has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@cpuhrsch has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@cpuhrsch
Copy link
Contributor Author

cpuhrsch commented Feb 20, 2019

I ran some performance regression tests and the difference seems to be within the noise, so performance wise this should be fine.

@cpuhrsch
Copy link
Contributor Author

@pytorchbot rebase this please

1 similar comment
@cpuhrsch
Copy link
Contributor Author

@pytorchbot rebase this please

@cpuhrsch cpuhrsch changed the title [DRAFT!] Change vml.h to support sizes greater than 2**32 - 1 Change vml.h to support sizes greater than 2**32 - 1 Feb 21, 2019
@cpuhrsch cpuhrsch requested a review from soumith February 21, 2019 21:37
Copy link
Contributor

Choose a reason for hiding this comment

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

ship this, but we should add a global setting to allow building / linking against MKL_INT=int64_t as well, it just has to be non-default. Send a patch to do that in a follow-up PR.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@cpuhrsch has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

Approved via ghapprove D14154997

@cpuhrsch
Copy link
Contributor Author

Thanks. Will merge soon.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@cpuhrsch has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@cpuhrsch has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@cpuhrsch is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@cpuhrsch has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@cpuhrsch has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Mar 2, 2019
Summary: Pull Request resolved: pytorch/pytorch#17280

Differential Revision: D14154997

Pulled By: cpuhrsch

fbshipit-source-id: c19b15d18da59c9ee87e82765d3244d2a4ef6729
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.

6 participants