remove dispatch key (#33266)

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/33266

Test Plan: Imported from OSS

Differential Revision: D19907697

Pulled By: anjali411

fbshipit-source-id: 99fc06b7c41229e8d9ed4271de62247cda12ee6e
diff --git a/c10/core/TensorOptions.h b/c10/core/TensorOptions.h
index a393f1d..49d6024 100644
--- a/c10/core/TensorOptions.h
+++ b/c10/core/TensorOptions.h
@@ -348,18 +348,12 @@
         switch (device().type()) {
           case DeviceType::CPU: {
             auto dtype_tmp = typeMetaToScalarType(dtype());
-            if (isComplexType(dtype_tmp)) {
-              return DispatchKey::ComplexCPUTensorId;
-            }
             if (isQIntType(dtype_tmp)) {
               return DispatchKey::QuantizedCPUTensorId;
             }
             return DispatchKey::CPUTensorId;
             }
           case DeviceType::CUDA:
-            if (isComplexType(typeMetaToScalarType(dtype()))) {
-              return DispatchKey::ComplexCUDATensorId;
-            }
             return DispatchKey::CUDATensorId;
           case DeviceType::MKLDNN:
             return DispatchKey::MKLDNNTensorId;