Skip to content

[wip] Error checking for KernelFunction::callUnboxed()#26482

Closed
smessmer wants to merge 29 commits intogh/smessmer/51/basefrom
gh/smessmer/51/head
Closed

[wip] Error checking for KernelFunction::callUnboxed()#26482
smessmer wants to merge 29 commits intogh/smessmer/51/basefrom
gh/smessmer/51/head

Conversation

@smessmer
Copy link
Contributor

@smessmer smessmer commented Sep 19, 2019

Stack from ghstack:

Add some error checking that KernelFunction::callUnboxed() has the correct types.
This got unblocked by the switch to C++14.

Differential Revision: D17485438

Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)

[ghstack-poisoned]
@pytorchbot pytorchbot added the module: internals Related to internal abstractions in c10 and ATen label Sep 19, 2019
@smessmer smessmer mentioned this pull request Sep 19, 2019
Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 19, 2019
Pull Request resolved: #26482

Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.
ghstack-source-id: 90441834

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)
Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 21, 2019
Pull Request resolved: #26482

Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.
ghstack-source-id: 90552751

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)
Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 22, 2019
Pull Request resolved: #26482

Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.
ghstack-source-id: 90557232

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)
Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)

[ghstack-poisoned]
This was referenced Sep 25, 2019
smessmer added a commit that referenced this pull request Sep 25, 2019
Pull Request resolved: #26482

Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.
ghstack-source-id: 90714327

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)
Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 25, 2019
Pull Request resolved: #26482

Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.
ghstack-source-id: 90752806

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)
Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 27, 2019
Pull Request resolved: #26482

Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.
ghstack-source-id: 90902388

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)
Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)

[ghstack-poisoned]
Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Oct 14, 2019
Pull Request resolved: #26482

Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.
ghstack-source-id: 91875464

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)
Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)

[ghstack-poisoned]
This was referenced Oct 22, 2019
smessmer added a commit that referenced this pull request Oct 22, 2019
Pull Request resolved: #26482

Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.
ghstack-source-id: 92357308

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)
Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)

[ghstack-poisoned]
Add some error checking that KernelFunction::callUnboxed() has the correct types.
This only works when RTTI is enabled. Without RTTI, this error checking is disabled.

Differential Revision: [D17485438](https://our.internmc.facebook.com/intern/diff/D17485438/)

[ghstack-poisoned]
@smessmer
Copy link
Contributor Author

superseded by #38361

@smessmer smessmer closed this May 12, 2020
smessmer added a commit that referenced this pull request May 14, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request May 15, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request May 15, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request May 15, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request May 18, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request May 18, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request May 19, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request May 19, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 3, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 8, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 10, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 11, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 11, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
@facebook-github-bot facebook-github-bot deleted the gh/smessmer/51/head branch June 12, 2020 14:16
smessmer added a commit that referenced this pull request Jun 12, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 13, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 13, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 15, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 15, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 16, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 16, 2020
…ght signature"


Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 16, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 17, 2020
…ght signature"


Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 17, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 18, 2020
…ght signature"


Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 18, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 18, 2020
…ght signature"


Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Jun 18, 2020
Rather than segfaulting, we should show a good error message when in op.call<Return, Args...>(...) the Return type or Args types mismatch the kernel.

This adds an assertion comparing two std::type_index to the call path, but that should be fast. Hashing the function signature is also in the call path and not strictly constexpr, but I checked on godbolt that GCC >=5 and Clang >=3.8 optimize it away and make it constexpr, i.e. it's not part of the assembly.

supersedes #26482

Differential Revision: [D21534052](https://our.internmc.facebook.com/intern/diff/D21534052/)

[ghstack-poisoned]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: internals Related to internal abstractions in c10 and ATen

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants