Skip to content

Commit

Permalink
Fix structured kernel codegen (#49244)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #49244

see https://fb.quip.com/ceEdANd5iVsO

RegisterMkldnnCPU kernels incorrectly used makeUnboxedOnly() calls to register add_.Tensor kernels. This is because the codegen incorrectly thought they're not c10-full.
This PR fixes that.
ghstack-source-id: 118411117

Test Plan: After this PR, RegisterMkldnnCPU doesn't contain the makeUnboxedOnly() calls anymore.

Reviewed By: ezyang

Differential Revision: D25500246

fbshipit-source-id: 8a8c2be9c4f4a5ce7eaae94257c2f8cbd176e92e
  • Loading branch information
smessmer authored and facebook-github-bot committed Dec 11, 2020
1 parent 2a3bb1c commit 1cb5aa6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/codegen/gen.py
Expand Up @@ -471,6 +471,7 @@ def gen_one(f: NativeFunction) -> Optional[str]:

return list(mapMaybe(gen_one, g.functions()))

@method_with_native_function
def gen_unstructured(self, f: NativeFunction) -> Optional[str]:
# for mypy type refinement; would be fixed by TODO on target
assert self.target is not Target.DECLARATION
Expand Down

0 comments on commit 1cb5aa6

Please sign in to comment.