Skip to content

Add fallback to TensorCPU if there are unsupported types for IDEEP Tensor #9667

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

Closed
wants to merge 1 commit into from

Conversation

yinghai
Copy link
Contributor

@yinghai yinghai commented Jul 20, 2018

Summary: MKL-DNN doesn't support 64-bit integger (https://github.com/intel/mkl-dnn/blob/cfee61bf81322b1ca315d5ed6cb9a9419618426b/include/mkldnn_types.h#L62-L75). So force converting from TensorCPU<long> to s32 Ideep tensor will cause memory issue. This diff gives an alternative solution, where we just fall through to TensorCPU. The reasoning is that since MKL-DNN doesn't support 64 bit integer tensor, downstream ops have to be in CPUConext. So there is no reason force converting to ideep tensor and back.

Differential Revision: D8943544

@yinghai yinghai changed the title All fallback to TensorCPU if there are unsupported types for IDEEP Tensor Add fallback to TensorCPU if there are unsupported types for IDEEP Tensor Jul 21, 2018
@yinghai yinghai added the caffe2 label Jul 21, 2018
…nsor (pytorch#9667)

Summary:
Pull Request resolved: pytorch#9667

MKL-DNN doesn't support 64-bit integger (https://github.com/intel/mkl-dnn/blob/cfee61bf81322b1ca315d5ed6cb9a9419618426b/include/mkldnn_types.h#L62-L75). So force converting from `TensorCPU<long>` to `s32` Ideep tensor will cause memory issue. This diff gives an alternative solution, where we just fall through to TensorCPU. The reasoning is that since MKL-DNN doesn't support 64 bit integer tensor, downstream ops have to be in CPUConext. So there is no reason force converting to ideep tensor and back.

Differential Revision: D8943544

fbshipit-source-id: 492fa39199d915579a8baf942305f92a231127cd
@yinghai
Copy link
Contributor Author

yinghai commented Jul 23, 2018

Test failures are due to infra error..

jramseyer pushed a commit to jramseyer/pytorch that referenced this pull request Jul 30, 2018
…nsor (pytorch#9667)

Summary:
Pull Request resolved: pytorch#9667

MKL-DNN doesn't support 64-bit integger (https://github.com/intel/mkl-dnn/blob/cfee61bf81322b1ca315d5ed6cb9a9419618426b/include/mkldnn_types.h#L62-L75). So force converting from `TensorCPU<long>` to `s32` Ideep tensor will cause memory issue. This diff gives an alternative solution, where we just fall through to TensorCPU. The reasoning is that since MKL-DNN doesn't support 64 bit integer tensor, downstream ops have to be in CPUConext. So there is no reason force converting to ideep tensor and back.

Reviewed By: pjh5

Differential Revision: D8943544

fbshipit-source-id: f514903cda27e34b8887271c9df56c8220895116
goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
…nsor (pytorch#9667)

Summary:
Pull Request resolved: pytorch#9667

MKL-DNN doesn't support 64-bit integger (https://github.com/intel/mkl-dnn/blob/cfee61bf81322b1ca315d5ed6cb9a9419618426b/include/mkldnn_types.h#L62-L75). So force converting from `TensorCPU<long>` to `s32` Ideep tensor will cause memory issue. This diff gives an alternative solution, where we just fall through to TensorCPU. The reasoning is that since MKL-DNN doesn't support 64 bit integer tensor, downstream ops have to be in CPUConext. So there is no reason force converting to ideep tensor and back.

Reviewed By: pjh5

Differential Revision: D8943544

fbshipit-source-id: f514903cda27e34b8887271c9df56c8220895116
@ezyang ezyang added the merged label Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants