Merge remote-tracking branch 'aosp/upstream-master' into mymerge

Test: mm
Test: NeuralNetworksTest_static
Change-Id: I6a6ee38a47a0c42a98802fe7c4b10774c3f055a4
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..3dc4640
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+cc_library_headers {
+    name: "tensorflow_headers",
+    export_include_dirs: ["."],
+    vendor_available: true,
+}
+
+subdirs = ["tensorflow/contrib/lite"]
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..1c3cd95
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,29 @@
+name: "TensorFlow"
+description:
+    "TensorFlow is an open source software library for numerical computation "
+    "using data flow graphs. The graph nodes represent mathematical operations, "
+    "while the graph edges represent the multidimensional data arrays (tensors) "
+    "that flow between them. This flexible architecture lets you deploy "
+    "computation to one or more CPUs or GPUs in a desktop, server, or mobile "
+    "device without rewriting code. TensorFlow also includes TensorBoard, a "
+    "data visualization toolkit. "
+    " "
+    "TensorFlow was originally developed by researchers and engineers working "
+    "on the Google Brain team within Google's Machine Intelligence Research "
+    "organization for the purposes of conducting machine learning and deep "
+    "neural networks research. The system is general enough to be applicable in "
+    "a wide variety of other domains, as well."
+
+third_party {
+  url {
+    type: HOMEPAGE
+    value: "https://github.com/tensorflow/tensorflow"
+  }
+  url {
+    type: GIT
+    value: "https://github.com/tensorflow/tensorflow"
+  }
+  version: "1.4.0"
+  last_upgrade_date { year: 2017 month: 11 day: 13 }
+  license_type: NOTICE
+}
diff --git a/third_party/boringssl/BUILD b/MODULE_LICENSE_APACHE2
similarity index 100%
rename from third_party/boringssl/BUILD
rename to MODULE_LICENSE_APACHE2
diff --git a/third_party/nccl/LICENSE b/NOTICE
similarity index 98%
rename from third_party/nccl/LICENSE
rename to NOTICE
index 146d9b7..15ae421 100644
--- a/third_party/nccl/LICENSE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2018 The TensorFlow Authors.  All rights reserved.
+Copyright 2017 The TensorFlow Authors.  All rights reserved.
 
                                  Apache License
                            Version 2.0, January 2004
@@ -188,7 +188,7 @@
       same "printed page" as the copyright notice for easier
       identification within third-party archives.
 
-   Copyright 2018, The TensorFlow Authors.
+   Copyright 2017, The TensorFlow Authors.
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
diff --git a/tensorflow/contrib/lite/Android.bp b/tensorflow/contrib/lite/Android.bp
new file mode 100644
index 0000000..8301f92
--- /dev/null
+++ b/tensorflow/contrib/lite/Android.bp
@@ -0,0 +1,87 @@
+// Copyright (C) 2017 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+cc_defaults {
+    name: "tflite_defaults",
+    header_libs: [
+        "tensorflow_headers",
+    ],
+    cflags: [
+        "-Wall",
+        "-Werror",
+        "-Wextra",
+        "-Wno-unused-parameter",
+    ],
+}
+
+cc_library_static {
+    name: "libtflite_context",
+    defaults: ["tflite_defaults"],
+    srcs: ["context.c"],
+    cflags: [
+        "-Wno-typedef-redefinition",
+    ],
+}
+
+cc_library_static {
+    name: "libtflite_framework",
+    defaults: ["tflite_defaults"],
+    rtti: true,
+    srcs: [
+        "allocation.cc",
+        "arena_planner.cc",
+        "error_reporter.cc",
+        "graph_info.cc",
+        "interpreter.cc",
+        "model.cc",
+        "nnapi_delegate.cc",
+        "optional_debug_tools.cc",
+        "simple_memory_arena.cc",
+        "string_util.cc",
+        "util.cc",
+        "kernels/eigen_support.cc",
+        "kernels/gemm_support.cc",
+    ],
+    header_libs: [
+        "libeigen",
+        "flatbuffer_headers",
+        "gemmlowp_headers",
+    ],
+    cflags: [
+        "-Wno-extern-c-compat",
+        "-Wno-mismatched-tags",
+        "-Wno-sign-compare",
+        "-Wno-unused-lambda-capture",
+    ],
+}
+
+cc_library_shared {
+    name: "libtflite",
+    defaults: ["tflite_defaults"],
+    shared_libs: [
+        "libtextclassifier_hash",
+    ],
+    whole_static_libs: [
+        "libtflite_context",
+        "libtflite_framework",
+        "libtflite_kernels",
+    ],
+    stl: "libc++_static",
+}
+
+build = [
+    "tflite_static.bp",
+]
+
+subdirs = ["kernels"]
diff --git a/tensorflow/contrib/lite/kernels/Android.bp b/tensorflow/contrib/lite/kernels/Android.bp
new file mode 100644
index 0000000..b923840
--- /dev/null
+++ b/tensorflow/contrib/lite/kernels/Android.bp
@@ -0,0 +1,106 @@
+// Copyright (C) 2017 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+cc_library_static {
+    name: "libtflite_kernel_utils",
+    defaults: ["tflite_defaults"],
+    vendor_available: true,
+    srcs: [
+        "kernel_util.cc",
+        "internal/tensor_utils.cc",
+        "internal/quantization_util.cc",
+        "internal/reference/portable_tensor_utils.cc",
+        "internal/optimized/neon_tensor_utils.cc",
+    ],
+    header_libs: [
+        "gemmlowp_headers",
+    ],
+    cflags: [
+        "-Wno-extern-c-compat",
+    ]
+}
+
+cc_library_static {
+    name: "libtflite_kernels",
+    defaults: ["tflite_defaults"],
+    srcs: [
+        "activations.cc",
+        "add.cc",
+        "arg_max.cc",
+        "basic_rnn.cc",
+        "batch_to_space_nd.cc",
+	"bidirectional_sequence_rnn.cc",
+        "bidirectional_sequence_lstm.cc",
+        "cast.cc",
+        "comparisons.cc",
+        "concatenation.cc",
+        "conv.cc",
+        "depthwise_conv.cc",
+        "dequantize.cc",
+        "div.cc",
+        "embedding_lookup.cc",
+        "embedding_lookup_sparse.cc",
+        "exp.cc",
+        "floor.cc",
+        "fully_connected.cc",
+        "gather.cc",
+        "hashtable_lookup.cc",
+        "kernel_util.cc",
+        "l2norm.cc",
+        "local_response_norm.cc",
+        "lsh_projection.cc",
+        "lstm.cc",
+        "maximum_minimum.cc",
+        "mean.cc",
+        "mul.cc",
+        "pad.cc",
+        "pooling.cc",
+        "register.cc",
+        "reshape.cc",
+        "resize_bilinear.cc",
+        "skip_gram.cc",
+        "space_to_batch_nd.cc",
+        "space_to_depth.cc",
+	"split.cc",
+        "squeeze.cc",
+        "strided_slice.cc",
+        "sub.cc",
+        "svdf.cc",
+	"topk_v2.cc",
+        "transpose.cc",
+        "unidirectional_sequence_lstm.cc",
+        "unidirectional_sequence_rnn.cc",
+	"internal/kernel_utils.cc",
+        "internal/tensor_utils.cc",
+        "internal/quantization_util.cc",
+        "internal/reference/portable_tensor_utils.cc",
+        "internal/optimized/neon_tensor_utils.cc",
+    ],
+    header_libs: [
+        "flatbuffer_headers",
+        "gemmlowp_headers",
+        "libeigen",
+        "libtextclassifier_hash_headers",
+    ],
+    cflags: [
+        "-DNAMESPACE_FOR_HASH_FUNCTIONS=farmhash",
+        "-Wno-array-bounds",
+        "-Wno-extern-c-compat",
+        "-Wno-invalid-partial-specialization",
+        "-Wno-missing-field-initializers",
+        "-Wno-sign-compare",
+        "-Wno-unused-local-typedef",
+        "-Wno-unused-variable",
+    ],
+}
diff --git a/tensorflow/contrib/lite/kernels/eigen_support.cc b/tensorflow/contrib/lite/kernels/eigen_support.cc
index f1fdb42..97f5e90 100644
--- a/tensorflow/contrib/lite/kernels/eigen_support.cc
+++ b/tensorflow/contrib/lite/kernels/eigen_support.cc
@@ -14,7 +14,7 @@
 ==============================================================================*/
 #include "tensorflow/contrib/lite/kernels/eigen_support.h"
 
-#include "third_party/eigen3/Eigen/Core"
+#include "Eigen/Core"
 #include "tensorflow/contrib/lite/kernels/op_macros.h"
 
 namespace tflite {
diff --git a/tensorflow/contrib/lite/kernels/internal/common.h b/tensorflow/contrib/lite/kernels/internal/common.h
index 18601df..e126774 100644
--- a/tensorflow/contrib/lite/kernels/internal/common.h
+++ b/tensorflow/contrib/lite/kernels/internal/common.h
@@ -28,7 +28,8 @@
 #endif
 
 #if defined __GNUC__ && defined __SSE4_1__
-#define USE_NEON
+// TODO: Uncomment once NEON_2_SSE.h is imported to Android
+// #define USE_NEON
 
 #define OPTIMIZED_OPS_H__IGNORE_DEPRECATED_DECLARATIONS
 #pragma GCC diagnostic push
@@ -39,7 +40,8 @@
 #pragma GCC diagnostic ignored "-Wnarrowing"
 #pragma GCC diagnostic ignored "-Wsequence-point"
 
-#include "NEON_2_SSE.h"
+// TODO: Uncomment once NEON_2_SSE.h is imported to Android
+// #include "NEON_2_SSE.h"
 
 #pragma GCC diagnostic pop
 #endif
diff --git a/tensorflow/contrib/lite/kernels/internal/optimized/cpu_check.h b/tensorflow/contrib/lite/kernels/internal/optimized/cpu_check.h
index 3a53d3a..11fffa7 100644
--- a/tensorflow/contrib/lite/kernels/internal/optimized/cpu_check.h
+++ b/tensorflow/contrib/lite/kernels/internal/optimized/cpu_check.h
@@ -18,20 +18,15 @@
 namespace tflite {
 
 #ifdef __ANDROID__
-#include "ndk/sources/android/cpufeatures/cpu-features.h"
 
 // Runtime check for Neon support on Android.
 inline bool TestCPUFeatureNeon() {
-#ifdef __aarch64__
+#if defined(__aarch64__) || defined(__ARM_NEON__)
   // ARM-64 always has NEON support.
   return true;
 #else
-  static bool kUseAndroidNeon =
-      (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM &&
-       android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_ARMv7 &&
-       android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON);
-  return kUseAndroidNeon;
-#endif  // __aarch64__
+  return false;
+#endif
 }
 
 #elif defined USE_NEON || defined __ARM_NEON
diff --git a/tensorflow/contrib/lite/kernels/internal/optimized/eigen_spatial_convolutions.h b/tensorflow/contrib/lite/kernels/internal/optimized/eigen_spatial_convolutions.h
index ce3cde7..5726a0d 100644
--- a/tensorflow/contrib/lite/kernels/internal/optimized/eigen_spatial_convolutions.h
+++ b/tensorflow/contrib/lite/kernels/internal/optimized/eigen_spatial_convolutions.h
@@ -36,7 +36,7 @@
 #elif defined(TFLITE_REDUCE_INSTANTIATIONS_OPEN_SOURCE)
 #include "tensorflow/contrib/lite/kernels/internal/optimized/eigen_tensor_reduced_instantiations_oss.h"
 #else
-#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
+#include "unsupported/Eigen/CXX11/Tensor"
 #endif
 
 namespace Eigen {
diff --git a/tensorflow/contrib/lite/kernels/internal/optimized/eigen_tensor_reduced_instantiations_google.h b/tensorflow/contrib/lite/kernels/internal/optimized/eigen_tensor_reduced_instantiations_google.h
index d85e06a..655c8a3 100644
--- a/tensorflow/contrib/lite/kernels/internal/optimized/eigen_tensor_reduced_instantiations_google.h
+++ b/tensorflow/contrib/lite/kernels/internal/optimized/eigen_tensor_reduced_instantiations_google.h
@@ -61,37 +61,37 @@
 // We're defining this ourselves rather than using the Eigen Tensor header file
 // so that we can alter the macro definition of TENSOR_CONTRACTION_DISPATCH to
 // reduce binary size.
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/ThreadPoolInterface.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceType.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorNonBlockingThreadPool.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDimensionList.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorInitializer.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorGlobalFunctions.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/ThreadPoolInterface.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorDeviceType.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorNonBlockingThreadPool.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorDimensionList.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorInitializer.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorGlobalFunctions.h"
 
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorStats.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorStats.h"
 
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorBase.h"
 
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExpr.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorArgMax.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorExpr.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorArgMax.h"
 
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorConcatenation.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionMappers.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionBlocking.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorConcatenation.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorContractionMappers.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorContractionBlocking.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h"
 #undef TENSOR_CONTRACTION_DISPATCH
 #define TENSOR_CONTRACTION_DISPATCH(METHOD, ALIGNMENT, ARGS)    \
   if (this->m_lhs_inner_dim_contiguous &&                       \
@@ -102,42 +102,42 @@
     eigen_assert(false && "Unsupported contraction formats");   \
   }
 
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionCuda.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorConversion.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorConvolution.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorFFT.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorPatch.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorVolumePatch.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorInflation.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorLayoutSwap.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorPadding.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorShuffling.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorStriding.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorCustomOp.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvalTo.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorScan.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorContractionCuda.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorConversion.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorConvolution.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorFFT.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorPatch.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorVolumePatch.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorInflation.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorLayoutSwap.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorPadding.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorShuffling.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorStriding.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorCustomOp.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorEvalTo.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorScan.h"
 
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h"
 
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/Tensor.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorFixedSize.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMap.h"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorRef.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/Tensor.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorFixedSize.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorMap.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorRef.h"
 
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h"
 
-#include "third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorIO.h"
+#include "unsupported/Eigen/CXX11/src/Tensor/TensorIO.h"
 
 #include "Eigen/src/Core/util/ReenableStupidWarnings.h"
 #endif  // TENSORFLOW_CONTRIB_LITE_KERNELS_INTERNAL_OPTIMIZED_EIGEN_TENSOR_REDUCED_INSTANTIATIONS_H
diff --git a/tensorflow/contrib/lite/kernels/internal/optimized/eigen_tensor_reduced_instantiations_oss.h b/tensorflow/contrib/lite/kernels/internal/optimized/eigen_tensor_reduced_instantiations_oss.h
index d34708b..3141cd3 100644
--- a/tensorflow/contrib/lite/kernels/internal/optimized/eigen_tensor_reduced_instantiations_oss.h
+++ b/tensorflow/contrib/lite/kernels/internal/optimized/eigen_tensor_reduced_instantiations_oss.h
@@ -150,7 +150,9 @@
 #include "unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h"
 #include "unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h"
 #include "unsupported/Eigen/CXX11/src/Tensor/TensorScan.h"
-#include "unsupported/Eigen/CXX11/src/Tensor/TensorTrace.h"
+// No TensorTrace.h exsists in current Eigen project in Android.
+// TODO: uncomment once Eigen got updated.
+// #include "unsupported/Eigen/CXX11/src/Tensor/TensorTrace.h"
 #include "unsupported/Eigen/CXX11/src/Tensor/TensorSycl.h"
 #include "unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h"
 #include "unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h"
diff --git a/tensorflow/contrib/lite/kernels/internal/optimized/optimized_ops.h b/tensorflow/contrib/lite/kernels/internal/optimized/optimized_ops.h
index 3d6042c..b14f18d 100644
--- a/tensorflow/contrib/lite/kernels/internal/optimized/optimized_ops.h
+++ b/tensorflow/contrib/lite/kernels/internal/optimized/optimized_ops.h
@@ -25,8 +25,8 @@
 #include <tuple>
 #include <type_traits>
 
-#include "third_party/eigen3/Eigen/Core"
-#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
+#include "Eigen/Core"
+#include "unsupported/Eigen/CXX11/Tensor"
 #include "fixedpoint/fixedpoint.h"
 #include "public/gemmlowp.h"
 #include "tensorflow/contrib/lite/kernels/internal/common.h"
diff --git a/tensorflow/contrib/lite/kernels/internal/reference/reference_ops.h b/tensorflow/contrib/lite/kernels/internal/reference/reference_ops.h
index d41ade4..d5abf90 100644
--- a/tensorflow/contrib/lite/kernels/internal/reference/reference_ops.h
+++ b/tensorflow/contrib/lite/kernels/internal/reference/reference_ops.h
@@ -23,7 +23,7 @@
 #include <memory>
 #include <type_traits>
 
-#include "third_party/eigen3/Eigen/Core"
+#include "Eigen/Core"
 #include "fixedpoint/fixedpoint.h"
 #include "public/gemmlowp.h"
 #include "tensorflow/contrib/lite/kernels/internal/common.h"
diff --git a/tensorflow/contrib/lite/kernels/lsh_projection.cc b/tensorflow/contrib/lite/kernels/lsh_projection.cc
index 0ee3577..af5d971 100644
--- a/tensorflow/contrib/lite/kernels/lsh_projection.cc
+++ b/tensorflow/contrib/lite/kernels/lsh_projection.cc
@@ -64,7 +64,7 @@
 #include "tensorflow/contrib/lite/context.h"
 #include "tensorflow/contrib/lite/kernels/kernel_util.h"
 #include "tensorflow/contrib/lite/kernels/op_macros.h"
-#include <farmhash.h>
+#include "util/hash/farmhash.h"
 
 namespace tflite {
 namespace ops {
@@ -127,7 +127,7 @@
     memcpy(key.get(), &seed, seed_size);
     memcpy(key.get() + seed_size, input_ptr, input_item_bytes);
 
-    int64_t hash_signature = ::util::Fingerprint64(key.get(), key_bytes);
+    int64_t hash_signature = farmhash::Fingerprint64(key.get(), key_bytes);
     double running_value = static_cast<double>(hash_signature);
     input_ptr += input_item_bytes;
     if (weight == nullptr) {
diff --git a/tensorflow/contrib/lite/kernels/register.cc b/tensorflow/contrib/lite/kernels/register.cc
index f91d188..98c5e18 100644
--- a/tensorflow/contrib/lite/kernels/register.cc
+++ b/tensorflow/contrib/lite/kernels/register.cc
@@ -144,11 +144,13 @@
   AddBuiltin(BuiltinOperator_LESS, Register_LESS());
   AddBuiltin(BuiltinOperator_FLOOR, Register_FLOOR());
 
+#if 0
   // TODO(andrewharp, ahentz): Move these somewhere more appropriate so that
   // custom ops aren't always included by default.
   AddCustom("Mfcc", tflite::ops::custom::Register_MFCC());
   AddCustom("AudioSpectrogram",
             tflite::ops::custom::Register_AUDIO_SPECTROGRAM());
+#endif
 }
 
 TfLiteRegistration* BuiltinOpResolver::FindOp(
diff --git a/tensorflow/contrib/lite/nnapi_delegate.cc b/tensorflow/contrib/lite/nnapi_delegate.cc
index 6a78f30..175101a 100644
--- a/tensorflow/contrib/lite/nnapi_delegate.cc
+++ b/tensorflow/contrib/lite/nnapi_delegate.cc
@@ -91,6 +91,10 @@
         nn_type = ANEURALNETWORKS_TENSOR_QUANT8_ASYMM;
         scale = tensor->params.scale;
         zeroPoint = tensor->params.zero_point;
+        if (scale <= 0.0f) {
+            // internal tensor, not valid for NNAPI
+            continue;
+        }
         break;
       case kTfLiteInt32:
         nn_type = ANEURALNETWORKS_TENSOR_INT32;
diff --git a/tensorflow/contrib/lite/string.h b/tensorflow/contrib/lite/string_tflite.h
similarity index 100%
rename from tensorflow/contrib/lite/string.h
rename to tensorflow/contrib/lite/string_tflite.h
diff --git a/tensorflow/contrib/lite/string_util.h b/tensorflow/contrib/lite/string_util.h
index 57f129b..08a20ce 100644
--- a/tensorflow/contrib/lite/string_util.h
+++ b/tensorflow/contrib/lite/string_util.h
@@ -43,7 +43,7 @@
 #include <vector>
 
 #include "tensorflow/contrib/lite/context.h"
-#include "tensorflow/contrib/lite/string.h"
+#include "tensorflow/contrib/lite/string_tflite.h"
 
 namespace tflite {
 
diff --git a/tensorflow/contrib/lite/tflite_static.bp b/tensorflow/contrib/lite/tflite_static.bp
new file mode 100644
index 0000000..910a0d3
--- /dev/null
+++ b/tensorflow/contrib/lite/tflite_static.bp
@@ -0,0 +1,115 @@
+// Copyright (C) 2017 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Create a static version for apps to use.
+cc_library_static {
+    name: "libtflite_static",
+    sdk_version: "current",
+    rtti: true,
+    srcs: [
+        "allocation.cc",
+        "arena_planner.cc",
+        "context.c",
+        "error_reporter.cc",
+	"graph_info.cc",
+        "interpreter.cc",
+        "model.cc",
+        "nnapi_delegate.cc",
+        "optional_debug_tools.cc",
+        "simple_memory_arena.cc",
+        "string_util.cc",
+        "util.cc",
+        "kernels/activations.cc",
+        "kernels/add.cc",
+        "kernels/arg_max.cc",
+        "kernels/basic_rnn.cc",
+        "kernels/batch_to_space_nd.cc",
+        "kernels/bidirectional_sequence_rnn.cc",
+        "kernels/bidirectional_sequence_lstm.cc",
+        "kernels/cast.cc",
+        "kernels/comparisons.cc",
+        "kernels/concatenation.cc",
+        "kernels/conv.cc",
+        "kernels/depthwise_conv.cc",
+        "kernels/dequantize.cc",
+        "kernels/div.cc",
+        "kernels/eigen_support.cc",
+        "kernels/exp.cc",
+        "kernels/embedding_lookup.cc",
+        "kernels/embedding_lookup_sparse.cc",
+        "kernels/floor.cc",
+        "kernels/fully_connected.cc",
+        "kernels/gather.cc",
+        "kernels/gemm_support.cc",
+        "kernels/hashtable_lookup.cc",
+        "kernels/kernel_util.cc",
+        "kernels/l2norm.cc",
+        "kernels/local_response_norm.cc",
+        "kernels/lsh_projection.cc",
+        "kernels/lstm.cc",
+        "kernels/maximum_minimum.cc",
+        "kernels/mean.cc",
+        "kernels/mul.cc",
+        "kernels/pad.cc",
+        "kernels/pooling.cc",
+        "kernels/register.cc",
+        "kernels/reshape.cc",
+        "kernels/resize_bilinear.cc",
+        "kernels/skip_gram.cc",
+        "kernels/space_to_batch_nd.cc",
+        "kernels/space_to_depth.cc",
+	"kernels/split.cc",
+        "kernels/squeeze.cc",
+        "kernels/strided_slice.cc",
+        "kernels/sub.cc",
+        "kernels/svdf.cc",
+	"kernels/topk_v2.cc",
+        "kernels/transpose.cc",
+        "kernels/unidirectional_sequence_lstm.cc",
+        "kernels/unidirectional_sequence_rnn.cc",
+        "kernels/internal/kernel_utils.cc",
+        "kernels/internal/tensor_utils.cc",
+        "kernels/internal/quantization_util.cc",
+        "kernels/internal/reference/portable_tensor_utils.cc",
+        "kernels/internal/optimized/neon_tensor_utils.cc",
+    ],
+    include_dirs: [
+        "external/eigen",
+        "external/flatbuffers/include",
+        "external/gemmlowp",
+        "external/libtextclassifier",
+        "external/tensorflow",
+    ],
+    whole_static_libs: [
+        "libtextclassifier_hash_static",
+    ],
+    cflags: [
+        "-DNAMESPACE_FOR_HASH_FUNCTIONS=farmhash",
+        "-Wall",
+        "-Werror",
+        "-Wextra",
+        "-Wno-array-bounds",
+        "-Wno-extern-c-compat",
+        "-Wno-invalid-partial-specialization",
+        "-Wno-mismatched-tags",
+        "-Wno-missing-field-initializers",
+        "-Wno-sign-compare",
+        "-Wno-typedef-redefinition",
+        "-Wno-unused-lambda-capture",
+        "-Wno-unused-local-typedef",
+        "-Wno-unused-parameter",
+        "-Wno-unused-variable",
+    ],
+    stl: "libc++_static",
+}
diff --git a/third_party/BUILD b/third_party/BUILD
deleted file mode 100644
index fe756e1..0000000
--- a/third_party/BUILD
+++ /dev/null
@@ -1 +0,0 @@
-licenses(["notice"])  # Apache 2.0
diff --git a/third_party/arm_neon_2_x86_sse.BUILD b/third_party/arm_neon_2_x86_sse.BUILD
deleted file mode 100644
index 6c641a7..0000000
--- a/third_party/arm_neon_2_x86_sse.BUILD
+++ /dev/null
@@ -1,16 +0,0 @@
-# Description:
-#   NEON2SSE - a header file redefining ARM Neon intrinsics in terms of SSE intrinsics
-#              allowing neon code to compile and run on x64/x86 workstantions.
-
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"])  # 3-Clause BSD
-
-exports_files([
-    "LICENSE",
-])
-
-cc_library(
-    name = "arm_neon_2_x86_sse",
-    hdrs = ["NEON_2_SSE.h"],
-)
diff --git a/third_party/astor.BUILD b/third_party/astor.BUILD
deleted file mode 100644
index 58fe9ac..0000000
--- a/third_party/astor.BUILD
+++ /dev/null
@@ -1,24 +0,0 @@
-# Description:
-#   AST round-trip manipulation for Python.
-
-licenses(["notice"])  # New BSD
-
-exports_files(["LICENSE"])
-
-py_library(
-    name = "astor",
-    srcs = [
-        "astor/__init__.py",
-        "astor/code_gen.py",
-        "astor/codegen.py",
-        "astor/file_util.py",
-        "astor/node_util.py",
-        "astor/op_util.py",
-        "astor/rtrip.py",
-        "astor/source_repr.py",
-        "astor/string_repr.py",
-        "astor/tree_walk.py",
-    ],
-    srcs_version = "PY2AND3",
-    visibility = ["//visibility:public"],
-)
diff --git a/third_party/aws.BUILD b/third_party/aws.BUILD
deleted file mode 100644
index 2dc9219..0000000
--- a/third_party/aws.BUILD
+++ /dev/null
@@ -1,89 +0,0 @@
-# Description:
-#   AWS C++ SDK
-
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"])  # Apache 2.0
-
-exports_files(["LICENSE"])
-
-load("@org_tensorflow//third_party:common.bzl", "template_rule")
-
-cc_library(
-    name = "aws",
-    srcs = select({
-        "@org_tensorflow//tensorflow:linux_x86_64": glob([
-            "aws-cpp-sdk-core/source/platform/linux-shared/*.cpp",
-        ]),
-        "@org_tensorflow//tensorflow:darwin": glob([
-            "aws-cpp-sdk-core/source/platform/linux-shared/*.cpp",
-        ]),
-        "@org_tensorflow//tensorflow:linux_ppc64le": glob([
-            "aws-cpp-sdk-core/source/platform/linux-shared/*.cpp",
-        ]),
-        "@org_tensorflow//tensorflow:raspberry_pi_armeabi": glob([
-            "aws-cpp-sdk-core/source/platform/linux-shared/*.cpp",
-        ]),
-        "//conditions:default": [],
-    }) + glob([
-        "aws-cpp-sdk-core/include/**/*.h",
-        "aws-cpp-sdk-core/source/*.cpp",
-        "aws-cpp-sdk-core/source/auth/**/*.cpp",
-        "aws-cpp-sdk-core/source/config/**/*.cpp",
-        "aws-cpp-sdk-core/source/client/**/*.cpp",
-        "aws-cpp-sdk-core/source/external/**/*.cpp",
-        "aws-cpp-sdk-core/source/internal/**/*.cpp",
-        "aws-cpp-sdk-core/source/http/*.cpp",
-        "aws-cpp-sdk-core/source/http/curl/**/*.cpp",
-        "aws-cpp-sdk-core/source/http/standard/**/*.cpp",
-        "aws-cpp-sdk-core/source/utils/*.cpp",
-        "aws-cpp-sdk-core/source/utils/base64/**/*.cpp",
-        "aws-cpp-sdk-core/source/utils/json/**/*.cpp",
-        "aws-cpp-sdk-core/source/utils/logging/**/*.cpp",
-        "aws-cpp-sdk-core/source/utils/memory/**/*.cpp",
-        "aws-cpp-sdk-core/source/utils/stream/**/*.cpp",
-        "aws-cpp-sdk-core/source/utils/threading/**/*.cpp",
-        "aws-cpp-sdk-core/source/utils/xml/**/*.cpp",
-        "aws-cpp-sdk-core/source/utils/crypto/*.cpp",
-        "aws-cpp-sdk-core/source/utils/crypto/factory/**/*.cpp",
-        "aws-cpp-sdk-s3/include/**/*.h",
-        "aws-cpp-sdk-s3/source/**/*.cpp",
-    ]),
-    hdrs = [
-        "aws-cpp-sdk-core/include/aws/core/SDKConfig.h",
-    ],
-    defines = select({
-        "@org_tensorflow//tensorflow:linux_x86_64": [
-            "PLATFORM_LINUX",
-            "ENABLE_CURL_CLIENT",
-            "ENABLE_NO_ENCRYPTION",
-        ],
-        "@org_tensorflow//tensorflow:darwin": [
-            "PLATFORM_APPLE",
-            "ENABLE_CURL_CLIENT",
-            "ENABLE_NO_ENCRYPTION",
-        ],
-        "@org_tensorflow//tensorflow:linux_ppc64le": [
-            "PLATFORM_LINUX",
-            "ENABLE_CURL_CLIENT",
-            "ENABLE_NO_ENCRYPTION",
-        ],
-        "//conditions:default": [],
-    }),
-    includes = [
-        "aws-cpp-sdk-core/include/",
-        "aws-cpp-sdk-s3/include/",
-    ],
-    deps = [
-        "@curl",
-    ],
-)
-
-template_rule(
-    name = "SDKConfig_h",
-    src = "aws-cpp-sdk-core/include/aws/core/SDKConfig.h.in",
-    out = "aws-cpp-sdk-core/include/aws/core/SDKConfig.h",
-    substitutions = {
-        "cmakedefine": "define",
-    },
-)
diff --git a/third_party/backports_weakref.BUILD b/third_party/backports_weakref.BUILD
deleted file mode 100644
index 0adfc5f..0000000
--- a/third_party/backports_weakref.BUILD
+++ /dev/null
@@ -1,22 +0,0 @@
-# Description:
-#   Backport of new features in Python's weakref module.
-
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"])  # Python 2.0
-
-py_library(
-    name = "org_python_pypi_backports_weakref",
-    srcs = [
-        "backports/__init__.py",
-        "backports/weakref.py",
-    ],
-    srcs_version = "PY2AND3",
-)
-
-genrule(
-    name = "license",
-    srcs = ["@org_python_license"],
-    outs = ["LICENSE"],
-    cmd = "cp $< $@",
-)
diff --git a/third_party/clang_toolchain/BUILD b/third_party/clang_toolchain/BUILD
deleted file mode 100644
index e69de29..0000000
--- a/third_party/clang_toolchain/BUILD
+++ /dev/null
diff --git a/third_party/clang_toolchain/cc_configure_clang.bzl b/third_party/clang_toolchain/cc_configure_clang.bzl
deleted file mode 100644
index 1181110..0000000
--- a/third_party/clang_toolchain/cc_configure_clang.bzl
+++ /dev/null
@@ -1,27 +0,0 @@
-""" Downloads clang and configures the crosstool using bazel's autoconf."""
-
-load("@bazel_tools//tools/cpp:cc_configure.bzl", "cc_autoconf_impl")
-load(":download_clang.bzl", "download_clang")
-
-_TF_DOWNLOAD_CLANG = "TF_DOWNLOAD_CLANG"
-_TF_NEED_CUDA = "TF_NEED_CUDA"
-
-def _cc_clang_autoconf(repo_ctx):
-  if repo_ctx.os.environ.get(_TF_DOWNLOAD_CLANG) != "1":
-    return
-  if repo_ctx.os.environ.get(_TF_NEED_CUDA) == "1":
-    # Clang is handled separately for CUDA configs.
-    # See cuda_configure.bzl for more details.
-    return
-
-  download_clang(repo_ctx, out_folder='extra_tools')
-  overriden_tools = {'gcc': 'extra_tools/bin/clang'}
-  cc_autoconf_impl(repo_ctx, overriden_tools)
-
-cc_download_clang_toolchain = repository_rule(
-    environ = [
-        _TF_DOWNLOAD_CLANG,
-        _TF_NEED_CUDA,
-    ],
-    implementation = _cc_clang_autoconf,
-)
diff --git a/third_party/clang_toolchain/download_clang.bzl b/third_party/clang_toolchain/download_clang.bzl
deleted file mode 100644
index 54d383d..0000000
--- a/third_party/clang_toolchain/download_clang.bzl
+++ /dev/null
@@ -1,54 +0,0 @@
-""" Helpers to download a recent clang release."""
-
-def _get_platform_folder(os_name):
-  os_name = os_name.lower()
-  if os_name.startswith('windows'):
-    return 'Win'
-  if os_name.startswith('mac os'):
-    return 'Mac'
-  if not os_name.startswith('linux'):
-    fail('Unknown platform')
-  return 'Linux_x64'
-
-def _download_chromium_clang(repo_ctx, platform_folder, package_version, sha256,
-                             out_folder):
-  cds_url = 'https://commondatastorage.googleapis.com/chromium-browser-clang'
-  cds_file = 'clang-%s.tgz' % package_version
-  cds_full_url = '{0}/{1}/{2}'.format(cds_url, platform_folder, cds_file)
-  repo_ctx.download_and_extract(cds_full_url, output=out_folder, sha256=sha256)
-
-def download_clang(repo_ctx, out_folder):
-  """ Download a fresh clang release and put it into out_folder.
-
-  Clang itself will be located in 'out_folder/bin/clang'.
-  We currently download one of the latest releases of clang by the
-  Chromium project (see
-  https://chromium.googlesource.com/chromium/src/+/master/docs/clang.md).
-
-  Args:
-    repo_ctx: An instance of repository_context object.
-    out_folder: A folder to extract the compiler into.
-  """
-  # TODO(ibiryukov): we currently download and extract some extra tools in the
-  # clang release (e.g., sanitizers). We should probably remove the ones
-  # we don't need and document the ones we want provide in addition to clang.
-
-  # Latest CLANG_REVISION and CLANG_SUB_REVISION of the Chromiums's release
-  # can be found in https://chromium.googlesource.com/chromium/src/tools/clang/+/master/scripts/update.py
-  CLANG_REVISION = '321529'
-  CLANG_SUB_REVISION = 2
-
-  package_version = '%s-%s' % (CLANG_REVISION, CLANG_SUB_REVISION)
-
-  checksums = {
-      'Linux_x64':
-          '76d4eb1ad011e3127c4a9de9b9f5d4ac624b5a9395c4d7395c9e0a487b13daf6',
-      'Mac':
-          '4b2a7a65ac1ee892b318c723eec8771f514bb306f346aa8216bb0006f19d87b7',
-      'Win':
-          'eba51bb8f84af41a85903113666bd21c22709010c39c4cb19dc20cf1ed14581b',
-  }
-
-  platform_folder = _get_platform_folder(repo_ctx.os.name)
-  _download_chromium_clang(repo_ctx, platform_folder, package_version,
-                           checksums[platform_folder], out_folder)
diff --git a/third_party/com_google_absl.BUILD b/third_party/com_google_absl.BUILD
deleted file mode 100644
index 8fca145..0000000
--- a/third_party/com_google_absl.BUILD
+++ /dev/null
@@ -1,5 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"])  # Apache
-
-exports_files(["LICENSE"])
diff --git a/third_party/common.bzl b/third_party/common.bzl
deleted file mode 100644
index db981a5..0000000
--- a/third_party/common.bzl
+++ /dev/null
@@ -1,43 +0,0 @@
-# Rule for simple expansion of template files. This performs a simple
-# search over the template file for the keys in substitutions,
-# and replaces them with the corresponding values.
-#
-# Typical usage:
-#   load("/tools/build_rules/template_rule", "expand_header_template")
-#   template_rule(
-#       name = "ExpandMyTemplate",
-#       src = "my.template",
-#       out = "my.txt",
-#       substitutions = {
-#         "$VAR1": "foo",
-#         "$VAR2": "bar",
-#       }
-#   )
-#
-# Args:
-#   name: The name of the rule.
-#   template: The template file to expand
-#   out: The destination of the expanded file
-#   substitutions: A dictionary mapping strings to their substitutions
-
-def template_rule_impl(ctx):
-  ctx.template_action(
-      template = ctx.file.src,
-      output = ctx.outputs.out,
-      substitutions = ctx.attr.substitutions,
-  )
-
-template_rule = rule(
-    attrs = {
-        "src": attr.label(
-            mandatory = True,
-            allow_files = True,
-            single_file = True,
-        ),
-        "substitutions": attr.string_dict(mandatory = True),
-        "out": attr.output(mandatory = True),
-    },
-    # output_to_genfiles is required for header files.
-    output_to_genfiles = True,
-    implementation = template_rule_impl,
-)
diff --git a/third_party/cub.BUILD b/third_party/cub.BUILD
deleted file mode 100644
index 29159c9..0000000
--- a/third_party/cub.BUILD
+++ /dev/null
@@ -1,26 +0,0 @@
-# Description: CUB library which is a set of primitives for GPU programming.
-
-package(
-    default_visibility = ["//visibility:public"],
-)
-
-licenses(["notice"])  # BSD
-
-exports_files(["LICENSE.TXT"])
-
-load("@local_config_cuda//cuda:build_defs.bzl", "cuda_default_copts", "if_cuda")
-
-filegroup(
-    name = "cub_header_files",
-    srcs = glob([
-        "cub/**",
-    ]),
-)
-
-cc_library(
-    name = "cub",
-    hdrs = if_cuda([":cub_header_files"]),
-    deps = [
-        "@local_config_cuda//cuda:cuda_headers",
-    ],
-)
diff --git a/third_party/curl.BUILD b/third_party/curl.BUILD
deleted file mode 100644
index 4def6f9..0000000
--- a/third_party/curl.BUILD
+++ /dev/null
@@ -1,695 +0,0 @@
-# Description:
-#   curl is a tool for talking to web servers.
-
-licenses(["notice"])  # MIT/X derivative license
-
-exports_files(["COPYING"])
-
-CURL_WIN_COPTS = [
-    "/Iexternal/curl/lib",
-    "/DHAVE_CONFIG_H",
-    "/DCURL_DISABLE_FTP",
-    "/DCURL_DISABLE_NTLM",
-    "/DCURL_DISABLE_PROXY",
-    "/DHAVE_LIBZ",
-    "/DHAVE_ZLIB_H",
-    # Defining _USING_V110_SDK71_ is hackery to defeat curl's incorrect
-    # detection of what OS releases we can build on with VC 2012. This
-    # may not be needed (or may have to change) if the WINVER setting
-    # changes in //third_party/msvc/vc_12_0/CROSSTOOL.
-    "/D_USING_V110_SDK71_",
-]
-
-CURL_WIN_SRCS = [
-    "lib/asyn-thread.c",
-    "lib/inet_ntop.c",
-    "lib/system_win32.c",
-    "lib/vtls/schannel.c",
-    "lib/idn_win32.c",
-]
-
-cc_library(
-    name = "curl",
-    srcs = [
-        "include/curl_config.h",
-        "lib/amigaos.h",
-        "lib/arpa_telnet.h",
-        "lib/asyn.h",
-        "lib/asyn-ares.c",
-        "lib/base64.c",
-        "lib/config-win32.h",
-        "lib/conncache.c",
-        "lib/conncache.h",
-        "lib/connect.c",
-        "lib/connect.h",
-        "lib/content_encoding.c",
-        "lib/content_encoding.h",
-        "lib/cookie.c",
-        "lib/cookie.h",
-        "lib/curl_addrinfo.c",
-        "lib/curl_addrinfo.h",
-        "lib/curl_base64.h",
-        "lib/curl_des.h",
-        "lib/curl_endian.h",
-        "lib/curl_fnmatch.c",
-        "lib/curl_fnmatch.h",
-        "lib/curl_gethostname.c",
-        "lib/curl_gethostname.h",
-        "lib/curl_gssapi.h",
-        "lib/curl_hmac.h",
-        "lib/curl_ldap.h",
-        "lib/curl_md4.h",
-        "lib/curl_md5.h",
-        "lib/curl_memory.h",
-        "lib/curl_memrchr.c",
-        "lib/curl_memrchr.h",
-        "lib/curl_multibyte.c",
-        "lib/curl_multibyte.h",
-        "lib/curl_ntlm_core.h",
-        "lib/curl_ntlm_wb.h",
-        "lib/curl_printf.h",
-        "lib/curl_rtmp.c",
-        "lib/curl_rtmp.h",
-        "lib/curl_sasl.c",
-        "lib/curl_sasl.h",
-        "lib/curl_sec.h",
-        "lib/curl_setup.h",
-        "lib/curl_setup_once.h",
-        "lib/curl_sspi.c",
-        "lib/curl_sspi.h",
-        "lib/curl_threads.c",
-        "lib/curl_threads.h",
-        "lib/curlx.h",
-        "lib/dict.h",
-        "lib/dotdot.c",
-        "lib/dotdot.h",
-        "lib/easy.c",
-        "lib/easyif.h",
-        "lib/escape.c",
-        "lib/escape.h",
-        "lib/file.h",
-        "lib/fileinfo.c",
-        "lib/fileinfo.h",
-        "lib/formdata.c",
-        "lib/formdata.h",
-        "lib/ftp.h",
-        "lib/ftplistparser.h",
-        "lib/getenv.c",
-        "lib/getinfo.c",
-        "lib/getinfo.h",
-        "lib/gopher.h",
-        "lib/hash.c",
-        "lib/hash.h",
-        "lib/hmac.c",
-        "lib/hostasyn.c",
-        "lib/hostcheck.c",
-        "lib/hostcheck.h",
-        "lib/hostip.c",
-        "lib/hostip.h",
-        "lib/hostip4.c",
-        "lib/hostip6.c",
-        "lib/hostsyn.c",
-        "lib/http.c",
-        "lib/http.h",
-        "lib/http2.c",
-        "lib/http2.h",
-        "lib/http_chunks.c",
-        "lib/http_chunks.h",
-        "lib/http_digest.c",
-        "lib/http_digest.h",
-        "lib/http_negotiate.h",
-        "lib/http_ntlm.h",
-        "lib/http_proxy.c",
-        "lib/http_proxy.h",
-        "lib/if2ip.c",
-        "lib/if2ip.h",
-        "lib/imap.h",
-        "lib/inet_ntop.h",
-        "lib/inet_pton.c",
-        "lib/inet_pton.h",
-        "lib/krb5.c",
-        "lib/llist.c",
-        "lib/llist.h",
-        "lib/md4.c",
-        "lib/md5.c",
-        "lib/memdebug.c",
-        "lib/memdebug.h",
-        "lib/mprintf.c",
-        "lib/multi.c",
-        "lib/multihandle.h",
-        "lib/multiif.h",
-        "lib/netrc.c",
-        "lib/netrc.h",
-        "lib/non-ascii.h",
-        "lib/nonblock.c",
-        "lib/nonblock.h",
-        "lib/nwlib.c",
-        "lib/nwos.c",
-        "lib/parsedate.c",
-        "lib/parsedate.h",
-        "lib/pingpong.h",
-        "lib/pipeline.c",
-        "lib/pipeline.h",
-        "lib/pop3.h",
-        "lib/progress.c",
-        "lib/progress.h",
-        "lib/rawstr.c",
-        "lib/rawstr.h",
-        "lib/rtsp.c",
-        "lib/rtsp.h",
-        "lib/security.c",
-        "lib/select.c",
-        "lib/select.h",
-        "lib/sendf.c",
-        "lib/sendf.h",
-        "lib/setup-os400.h",
-        "lib/setup-vms.h",
-        "lib/share.c",
-        "lib/share.h",
-        "lib/sigpipe.h",
-        "lib/slist.c",
-        "lib/slist.h",
-        "lib/smb.h",
-        "lib/smtp.h",
-        "lib/sockaddr.h",
-        "lib/socks.c",
-        "lib/socks.h",
-        "lib/speedcheck.c",
-        "lib/speedcheck.h",
-        "lib/splay.c",
-        "lib/splay.h",
-        "lib/ssh.h",
-        "lib/strdup.c",
-        "lib/strdup.h",
-        "lib/strequal.c",
-        "lib/strequal.h",
-        "lib/strerror.c",
-        "lib/strerror.h",
-        "lib/strtok.c",
-        "lib/strtok.h",
-        "lib/strtoofft.c",
-        "lib/strtoofft.h",
-        "lib/system_win32.h",
-        "lib/telnet.h",
-        "lib/tftp.h",
-        "lib/timeval.c",
-        "lib/timeval.h",
-        "lib/transfer.c",
-        "lib/transfer.h",
-        "lib/url.c",
-        "lib/url.h",
-        "lib/urldata.h",
-        "lib/vauth/cleartext.c",
-        "lib/vauth/cram.c",
-        "lib/vauth/digest.c",
-        "lib/vauth/digest.h",
-        "lib/vauth/ntlm.h",
-        "lib/vauth/oauth2.c",
-        "lib/vauth/vauth.c",
-        "lib/vauth/vauth.h",
-        "lib/version.c",
-        "lib/vtls/axtls.h",
-        "lib/vtls/cyassl.h",
-        "lib/vtls/darwinssl.h",
-        "lib/vtls/gskit.h",
-        "lib/vtls/gtls.h",
-        "lib/vtls/mbedtls.h",
-        "lib/vtls/nssg.h",
-        "lib/vtls/openssl.h",
-        "lib/vtls/polarssl.h",
-        "lib/vtls/polarssl_threadlock.h",
-        "lib/vtls/schannel.h",
-        "lib/vtls/vtls.c",
-        "lib/vtls/vtls.h",
-        "lib/warnless.c",
-        "lib/warnless.h",
-        "lib/wildcard.c",
-        "lib/wildcard.h",
-        "lib/x509asn1.h",
-    ] + select({
-        "@org_tensorflow//tensorflow:darwin": [
-            "lib/vtls/darwinssl.c",
-        ],
-        "@org_tensorflow//tensorflow:ios": [
-            "lib/vtls/darwinssl.c",
-        ],
-        "@org_tensorflow//tensorflow:windows": CURL_WIN_SRCS,
-        "@org_tensorflow//tensorflow:windows_msvc": CURL_WIN_SRCS,
-        "//conditions:default": [
-            "lib/vtls/openssl.c",
-        ],
-    }),
-    hdrs = [
-        "include/curl/curl.h",
-        "include/curl/curlbuild.h",
-        "include/curl/curlrules.h",
-        "include/curl/curlver.h",
-        "include/curl/easy.h",
-        "include/curl/mprintf.h",
-        "include/curl/multi.h",
-        "include/curl/stdcheaders.h",
-        "include/curl/typecheck-gcc.h",
-    ],
-    copts = select({
-        "@org_tensorflow//tensorflow:windows": CURL_WIN_COPTS,
-        "@org_tensorflow//tensorflow:windows_msvc": CURL_WIN_COPTS,
-        "//conditions:default": [
-            "-Iexternal/curl/lib",
-            "-D_GNU_SOURCE",
-            "-DHAVE_CONFIG_H",
-            "-DCURL_DISABLE_FTP",
-            "-DCURL_DISABLE_NTLM",  # turning it off in configure is not enough
-            "-DHAVE_LIBZ",
-            "-DHAVE_ZLIB_H",
-            "-Wno-string-plus-int",
-        ],
-    }) + select({
-        "@org_tensorflow//tensorflow:darwin": [
-            "-fno-constant-cfstrings",
-        ],
-        "@org_tensorflow//tensorflow:windows": [
-            # See curl.h for discussion of write size and Windows
-            "/DCURL_MAX_WRITE_SIZE=16384",
-        ],
-        "@org_tensorflow//tensorflow:windows_msvc": [
-            # See curl.h for discussion of write size and Windows
-            "/DCURL_MAX_WRITE_SIZE=16384",
-        ],
-        "//conditions:default": [
-            "-DCURL_MAX_WRITE_SIZE=65536",
-        ],
-    }),
-    defines = ["CURL_STATICLIB"],
-    includes = ["include"],
-    linkopts = select({
-        "@org_tensorflow//tensorflow:android": [
-            "-pie",
-        ],
-        "@org_tensorflow//tensorflow:darwin": [
-            "-Wl,-framework",
-            "-Wl,CoreFoundation",
-            "-Wl,-framework",
-            "-Wl,Security",
-        ],
-        "@org_tensorflow//tensorflow:ios": [],
-        "@org_tensorflow//tensorflow:windows": [
-            "-DEFAULTLIB:ws2_32.lib",
-            "-DEFAULTLIB:advapi32.lib",
-            "-DEFAULTLIB:crypt32.lib",
-            "-DEFAULTLIB:Normaliz.lib",
-        ],
-        "@org_tensorflow//tensorflow:windows_msvc": [
-            "-DEFAULTLIB:ws2_32.lib",
-            "-DEFAULTLIB:advapi32.lib",
-            "-DEFAULTLIB:crypt32.lib",
-            "-DEFAULTLIB:Normaliz.lib",
-        ],
-        "//conditions:default": [
-            "-lrt",
-        ],
-    }),
-    visibility = ["//visibility:public"],
-    deps = [
-        "@zlib_archive//:zlib",
-    ] + select({
-        "@org_tensorflow//tensorflow:ios": [],
-        "@org_tensorflow//tensorflow:windows": [],
-        "@org_tensorflow//tensorflow:windows_msvc": [],
-        "//conditions:default": [
-            "@boringssl//:ssl",
-        ],
-    }),
-)
-
-CURL_BIN_WIN_COPTS = [
-    "/Iexternal/curl/lib",
-    "/DHAVE_CONFIG_H",
-    "/DCURL_DISABLE_LIBCURL_OPTION",
-]
-
-cc_binary(
-    name = "curl_bin",
-    srcs = [
-        "lib/config-win32.h",
-        "src/slist_wc.c",
-        "src/slist_wc.h",
-        "src/tool_binmode.c",
-        "src/tool_binmode.h",
-        "src/tool_bname.c",
-        "src/tool_bname.h",
-        "src/tool_cb_dbg.c",
-        "src/tool_cb_dbg.h",
-        "src/tool_cb_hdr.c",
-        "src/tool_cb_hdr.h",
-        "src/tool_cb_prg.c",
-        "src/tool_cb_prg.h",
-        "src/tool_cb_rea.c",
-        "src/tool_cb_rea.h",
-        "src/tool_cb_see.c",
-        "src/tool_cb_see.h",
-        "src/tool_cb_wrt.c",
-        "src/tool_cb_wrt.h",
-        "src/tool_cfgable.c",
-        "src/tool_cfgable.h",
-        "src/tool_convert.c",
-        "src/tool_convert.h",
-        "src/tool_dirhie.c",
-        "src/tool_dirhie.h",
-        "src/tool_doswin.c",
-        "src/tool_doswin.h",
-        "src/tool_easysrc.c",
-        "src/tool_easysrc.h",
-        "src/tool_formparse.c",
-        "src/tool_formparse.h",
-        "src/tool_getparam.c",
-        "src/tool_getparam.h",
-        "src/tool_getpass.c",
-        "src/tool_getpass.h",
-        "src/tool_help.c",
-        "src/tool_help.h",
-        "src/tool_helpers.c",
-        "src/tool_helpers.h",
-        "src/tool_homedir.c",
-        "src/tool_homedir.h",
-        "src/tool_hugehelp.c",
-        "src/tool_hugehelp.h",
-        "src/tool_libinfo.c",
-        "src/tool_libinfo.h",
-        "src/tool_main.c",
-        "src/tool_main.h",
-        "src/tool_metalink.c",
-        "src/tool_metalink.h",
-        "src/tool_mfiles.c",
-        "src/tool_mfiles.h",
-        "src/tool_msgs.c",
-        "src/tool_msgs.h",
-        "src/tool_operate.c",
-        "src/tool_operate.h",
-        "src/tool_operhlp.c",
-        "src/tool_operhlp.h",
-        "src/tool_panykey.c",
-        "src/tool_panykey.h",
-        "src/tool_paramhlp.c",
-        "src/tool_paramhlp.h",
-        "src/tool_parsecfg.c",
-        "src/tool_parsecfg.h",
-        "src/tool_sdecls.h",
-        "src/tool_setopt.c",
-        "src/tool_setopt.h",
-        "src/tool_setup.h",
-        "src/tool_sleep.c",
-        "src/tool_sleep.h",
-        "src/tool_strdup.c",
-        "src/tool_strdup.h",
-        "src/tool_urlglob.c",
-        "src/tool_urlglob.h",
-        "src/tool_util.c",
-        "src/tool_util.h",
-        "src/tool_version.h",
-        "src/tool_vms.c",
-        "src/tool_vms.h",
-        "src/tool_writeenv.c",
-        "src/tool_writeenv.h",
-        "src/tool_writeout.c",
-        "src/tool_writeout.h",
-        "src/tool_xattr.c",
-        "src/tool_xattr.h",
-    ],
-    copts = select({
-        "@org_tensorflow//tensorflow:windows": CURL_BIN_WIN_COPTS,
-        "@org_tensorflow//tensorflow:windows_msvc": CURL_BIN_WIN_COPTS,
-        "//conditions:default": [
-            "-Iexternal/curl/lib",
-            "-D_GNU_SOURCE",
-            "-DHAVE_CONFIG_H",
-            "-DCURL_DISABLE_LIBCURL_OPTION",
-            "-Wno-string-plus-int",
-        ],
-    }),
-    deps = [":curl"],
-)
-
-genrule(
-    name = "configure",
-    outs = ["include/curl_config.h"],
-    cmd = "\n".join([
-        "cat <<'EOF' >$@",
-        "#ifndef EXTERNAL_CURL_INCLUDE_CURL_CONFIG_H_",
-        "#define EXTERNAL_CURL_INCLUDE_CURL_CONFIG_H_",
-        "",
-        "#if !defined(_WIN32) && !defined(__APPLE__)",
-        "#  include <openssl/opensslv.h>",
-        "#  if defined(OPENSSL_IS_BORINGSSL)",
-        "#    define HAVE_BORINGSSL 1",
-        "#  endif",
-        "#endif",
-        "",
-        "#if defined(_WIN32)",
-        "#  include \"lib/config-win32.h\"",
-        "#  define BUILDING_LIBCURL 1",
-        "#  define CURL_DISABLE_CRYPTO_AUTH 1",
-        "#  define CURL_DISABLE_DICT 1",
-        "#  define CURL_DISABLE_FILE 1",
-        "#  define CURL_DISABLE_GOPHER 1",
-        "#  define CURL_DISABLE_IMAP 1",
-        "#  define CURL_DISABLE_LDAP 1",
-        "#  define CURL_DISABLE_LDAPS 1",
-        "#  define CURL_DISABLE_POP3 1",
-        "#  define CURL_PULL_WS2TCPIP_H 1",
-        "#  define CURL_DISABLE_SMTP 1",
-        "#  define CURL_DISABLE_TELNET 1",
-        "#  define CURL_DISABLE_TFTP 1",
-        "#  define CURL_PULL_WS2TCPIP_H 1",
-        "#  define USE_WINDOWS_SSPI 1",
-        "#  define USE_WIN32_IDN 1",
-        "#  define USE_SCHANNEL 1",
-        "#  define WANT_IDN_PROTOTYPES 1",
-        "#elif defined(__APPLE__)",
-        "#  define HAVE_FSETXATTR_6 1",
-        "#  define HAVE_SETMODE 1",
-        "#  define HAVE_SYS_FILIO_H 1",
-        "#  define HAVE_SYS_SOCKIO_H 1",
-        "#  define OS \"x86_64-apple-darwin15.5.0\"",
-        "#  define USE_DARWINSSL 1",
-        "#else",
-        "#  define CURL_CA_BUNDLE \"/etc/ssl/certs/ca-certificates.crt\"",
-        "#  define GETSERVBYPORT_R_ARGS 6",
-        "#  define GETSERVBYPORT_R_BUFSIZE 4096",
-        "#  define HAVE_BORINGSSL 1",
-        "#  define HAVE_CLOCK_GETTIME_MONOTONIC 1",
-        "#  define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1",
-        "#  define HAVE_FSETXATTR_5 1",
-        "#  define HAVE_GETHOSTBYADDR_R 1",
-        "#  define HAVE_GETHOSTBYADDR_R_8 1",
-        "#  define HAVE_GETHOSTBYNAME_R 1",
-        "#  define HAVE_GETHOSTBYNAME_R_6 1",
-        "#  define HAVE_GETSERVBYPORT_R 1",
-        "#  define HAVE_LIBSSL 1",
-        "#  define HAVE_MALLOC_H 1",
-        "#  define HAVE_MSG_NOSIGNAL 1",
-        "#  define HAVE_OPENSSL_CRYPTO_H 1",
-        "#  define HAVE_OPENSSL_ERR_H 1",
-        "#  define HAVE_OPENSSL_PEM_H 1",
-        "#  define HAVE_OPENSSL_PKCS12_H 1",
-        "#  define HAVE_OPENSSL_RSA_H 1",
-        "#  define HAVE_OPENSSL_SSL_H 1",
-        "#  define HAVE_OPENSSL_X509_H 1",
-        "#  define HAVE_RAND_EGD 1",
-        "#  define HAVE_RAND_STATUS 1",
-        "#  define HAVE_SSL_GET_SHUTDOWN 1",
-        "#  define HAVE_TERMIOS_H 1",
-        "#  define OS \"x86_64-pc-linux-gnu\"",
-        "#  define RANDOM_FILE \"/dev/urandom\"",
-        "#  define USE_OPENSSL 1",
-        "#endif",
-        "",
-        "#if !defined(_WIN32)",
-        "#  define CURL_DISABLE_DICT 1",
-        "#  define CURL_DISABLE_FILE 1",
-        "#  define CURL_DISABLE_GOPHER 1",
-        "#  define CURL_DISABLE_IMAP 1",
-        "#  define CURL_DISABLE_LDAP 1",
-        "#  define CURL_DISABLE_LDAPS 1",
-        "#  define CURL_DISABLE_POP3 1",
-        "#  define CURL_DISABLE_SMTP 1",
-        "#  define CURL_DISABLE_TELNET 1",
-        "#  define CURL_DISABLE_TFTP 1",
-        "#  define CURL_EXTERN_SYMBOL __attribute__ ((__visibility__ (\"default\")))",
-        "#  define ENABLE_IPV6 1",
-        "#  define GETHOSTNAME_TYPE_ARG2 size_t",
-        "#  define GETNAMEINFO_QUAL_ARG1 const",
-        "#  define GETNAMEINFO_TYPE_ARG1 struct sockaddr *",
-        "#  define GETNAMEINFO_TYPE_ARG2 socklen_t",
-        "#  define GETNAMEINFO_TYPE_ARG46 socklen_t",
-        "#  define GETNAMEINFO_TYPE_ARG7 int",
-        "#  define HAVE_ALARM 1",
-        "#  define HAVE_ALLOCA_H 1",
-        "#  define HAVE_ARPA_INET_H 1",
-        "#  define HAVE_ARPA_TFTP_H 1",
-        "#  define HAVE_ASSERT_H 1",
-        "#  define HAVE_BASENAME 1",
-        "#  define HAVE_BOOL_T 1",
-        "#  define HAVE_CONNECT 1",
-        "#  define HAVE_DLFCN_H 1",
-        "#  define HAVE_ERRNO_H 1",
-        "#  define HAVE_FCNTL 1",
-        "#  define HAVE_FCNTL_H 1",
-        "#  define HAVE_FCNTL_O_NONBLOCK 1",
-        "#  define HAVE_FDOPEN 1",
-        "#  define HAVE_FORK 1",
-        "#  define HAVE_FREEADDRINFO 1",
-        "#  define HAVE_FREEIFADDRS 1",
-        "#  if !defined(__ANDROID__)",
-        "#    define HAVE_FSETXATTR 1",
-        "#  endif",
-        "#  define HAVE_FTRUNCATE 1",
-        "#  define HAVE_GAI_STRERROR 1",
-        "#  define HAVE_GETADDRINFO 1",
-        "#  define HAVE_GETADDRINFO_THREADSAFE 1",
-        "#  define HAVE_GETEUID 1",
-        "#  define HAVE_GETHOSTBYADDR 1",
-        "#  define HAVE_GETHOSTBYNAME 1",
-        "#  define HAVE_GETHOSTNAME 1",
-        "#  if !defined(__ANDROID__)",
-        "#    define HAVE_GETIFADDRS 1",
-        "#  endif",
-        "#  define HAVE_GETNAMEINFO 1",
-        "#  define HAVE_GETPPID 1",
-        "#  define HAVE_GETPROTOBYNAME 1",
-        "#  define HAVE_GETPWUID 1",
-        "#  if !defined(__ANDROID__)",
-        "#    define HAVE_GETPWUID_R 1",
-        "#  endif",
-        "#  define HAVE_GETRLIMIT 1",
-        "#  define HAVE_GETTIMEOFDAY 1",
-        "#  define HAVE_GMTIME_R 1",
-        "#  if !defined(__ANDROID__)",
-        "#    define HAVE_IFADDRS_H 1",
-        "#  endif",
-        "#  define HAVE_IF_NAMETOINDEX 1",
-        "#  define HAVE_INET_ADDR 1",
-        "#  define HAVE_INET_NTOP 1",
-        "#  define HAVE_INET_PTON 1",
-        "#  define HAVE_INTTYPES_H 1",
-        "#  define HAVE_IOCTL 1",
-        "#  define HAVE_IOCTL_FIONBIO 1",
-        "#  define HAVE_IOCTL_SIOCGIFADDR 1",
-        "#  define HAVE_LIBGEN_H 1",
-        "#  define HAVE_LIBZ 1",
-        "#  define HAVE_LIMITS_H 1",
-        "#  define HAVE_LL 1",
-        "#  define HAVE_LOCALE_H 1",
-        "#  define HAVE_LOCALTIME_R 1",
-        "#  define HAVE_LONGLONG 1",
-        "#  define HAVE_MEMORY_H 1",
-        "#  define HAVE_NETDB_H 1",
-        "#  define HAVE_NETINET_IN_H 1",
-        "#  define HAVE_NETINET_TCP_H 1",
-        "#  define HAVE_NET_IF_H 1",
-        "#  define HAVE_PERROR 1",
-        "#  define HAVE_PIPE 1",
-        "#  define HAVE_POLL 1",
-        "#  define HAVE_POLL_FINE 1",
-        "#  define HAVE_POLL_H 1",
-        "#  define HAVE_POSIX_STRERROR_R 1",
-        "#  define HAVE_PWD_H 1",
-        "#  define HAVE_RECV 1",
-        "#  define HAVE_SELECT 1",
-        "#  define HAVE_SEND 1",
-        "#  define HAVE_SETJMP_H 1",
-        "#  define HAVE_SETLOCALE 1",
-        "#  define HAVE_SETRLIMIT 1",
-        "#  define HAVE_SETSOCKOPT 1",
-        "#  define HAVE_SGTTY_H 1",
-        "#  define HAVE_SIGACTION 1",
-        "#  define HAVE_SIGINTERRUPT 1",
-        "#  define HAVE_SIGNAL 1",
-        "#  define HAVE_SIGNAL_H 1",
-        "#  define HAVE_SIGSETJMP 1",
-        "#  define HAVE_SIG_ATOMIC_T 1",
-        "#  define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1",
-        "#  define HAVE_SOCKET 1",
-        "#  define HAVE_SOCKETPAIR 1",
-        "#  define HAVE_STDBOOL_H 1",
-        "#  define HAVE_STDINT_H 1",
-        "#  define HAVE_STDIO_H 1",
-        "#  define HAVE_STDLIB_H 1",
-        "#  define HAVE_STRCASECMP 1",
-        "#  define HAVE_STRDUP 1",
-        "#  define HAVE_STRERROR_R 1",
-        "#  define HAVE_STRINGS_H 1",
-        "#  define HAVE_STRING_H 1",
-        "#  define HAVE_STRNCASECMP 1",
-        "#  define HAVE_STRSTR 1",
-        "#  define HAVE_STRTOK_R 1",
-        "#  define HAVE_STRTOLL 1",
-        "#  define HAVE_STRUCT_SOCKADDR_STORAGE 1",
-        "#  define HAVE_STRUCT_TIMEVAL 1",
-        "#  define HAVE_SYS_IOCTL_H 1",
-        "#  define HAVE_SYS_PARAM_H 1",
-        "#  define HAVE_SYS_POLL_H 1",
-        "#  define HAVE_SYS_RESOURCE_H 1",
-        "#  define HAVE_SYS_SELECT_H 1",
-        "#  define HAVE_SYS_SOCKET_H 1",
-        "#  define HAVE_SYS_STAT_H 1",
-        "#  define HAVE_SYS_TIME_H 1",
-        "#  define HAVE_SYS_TYPES_H 1",
-        "#  define HAVE_SYS_UIO_H 1",
-        "#  define HAVE_SYS_UN_H 1",
-        "#  define HAVE_SYS_WAIT_H 1",
-        "#  define HAVE_SYS_XATTR_H 1",
-        "#  define HAVE_TIME_H 1",
-        "#  define HAVE_UNAME 1",
-        "#  define HAVE_UNISTD_H 1",
-        "#  define HAVE_UTIME 1",
-        "#  define HAVE_UTIME_H 1",
-        "#  define HAVE_VARIADIC_MACROS_C99 1",
-        "#  define HAVE_VARIADIC_MACROS_GCC 1",
-        "#  define HAVE_WRITABLE_ARGV 1",
-        "#  define HAVE_WRITEV 1",
-        "#  define HAVE_ZLIB_H 1",
-        "#  define LT_OBJDIR \".libs/\"",
-        "#  define PACKAGE \"curl\"",
-        "#  define PACKAGE_BUGREPORT \"a suitable curl mailing list: https://curl.haxx.se/mail/\"",
-        "#  define PACKAGE_NAME \"curl\"",
-        "#  define PACKAGE_STRING \"curl -\"",
-        "#  define PACKAGE_TARNAME \"curl\"",
-        "#  define PACKAGE_URL \"\"",
-        "#  define PACKAGE_VERSION \"-\"",
-        "#  define RECV_TYPE_ARG1 int",
-        "#  define RECV_TYPE_ARG2 void *",
-        "#  define RECV_TYPE_ARG3 size_t",
-        "#  define RECV_TYPE_ARG4 int",
-        "#  define RECV_TYPE_RETV ssize_t",
-        "#  define RETSIGTYPE void",
-        "#  define SELECT_QUAL_ARG5",
-        "#  define SELECT_TYPE_ARG1 int",
-        "#  define SELECT_TYPE_ARG234 fd_set *",
-        "#  define SELECT_TYPE_ARG5 struct timeval *",
-        "#  define SELECT_TYPE_RETV int",
-        "#  define SEND_QUAL_ARG2 const",
-        "#  define SEND_TYPE_ARG1 int",
-        "#  define SEND_TYPE_ARG2 void *",
-        "#  define SEND_TYPE_ARG3 size_t",
-        "#  define SEND_TYPE_ARG4 int",
-        "#  define SEND_TYPE_RETV ssize_t",
-        "#  define SIZEOF_INT 4",
-        "#  define SIZEOF_LONG 8",
-        "#  define SIZEOF_OFF_T 8",
-        "#  define SIZEOF_SHORT 2",
-        "#  define SIZEOF_SIZE_T 8",
-        "#  define SIZEOF_TIME_T 8",
-        "#  define SIZEOF_VOIDP 8",
-        "#  define STDC_HEADERS 1",
-        "#  define STRERROR_R_TYPE_ARG3 size_t",
-        "#  define TIME_WITH_SYS_TIME 1",
-        "#  define VERSION \"-\"",
-        "#  ifndef _DARWIN_USE_64_BIT_INODE",
-        "#    define _DARWIN_USE_64_BIT_INODE 1",
-        "#  endif",
-        "#endif",
-        "",
-        "#endif  // EXTERNAL_CURL_INCLUDE_CURL_CONFIG_H_",
-        "EOF",
-    ]),
-)
diff --git a/third_party/cython.BUILD b/third_party/cython.BUILD
deleted file mode 100644
index a8e72a1..0000000
--- a/third_party/cython.BUILD
+++ /dev/null
@@ -1,28 +0,0 @@
-# Modified version of @cython//:BUILD.bazel
-
-py_library(
-    name = "cython_lib",
-    srcs = glob(
-        ["Cython/**/*.py"],
-        exclude = [
-            "**/Tests/*.py",
-        ],
-    ) + ["cython.py"],
-    data = glob([
-        "Cython/**/*.pyx",
-        "Cython/Utility/*.*",
-        "Cython/Includes/**/*.pxd",
-    ]),
-    srcs_version = "PY2AND3",
-    visibility = ["//visibility:public"],
-)
-
-# May not be named "cython", since that conflicts with Cython/ on OSX
-py_binary(
-    name = "cython_binary",
-    srcs = ["cython.py"],
-    main = "cython.py",
-    srcs_version = "PY2AND3",
-    visibility = ["//visibility:public"],
-    deps = ["cython_lib"],
-)
diff --git a/third_party/double_conversion.BUILD b/third_party/double_conversion.BUILD
deleted file mode 100644
index 9f90521..0000000
--- a/third_party/double_conversion.BUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# Bazel(http://bazel.io) BUILD file
-
-licenses(["notice"])
-
-exports_files(["LICENSE"])
-
-cc_library(
-    name = "double-conversion",
-    srcs = [
-        "double-conversion/bignum.cc",
-        "double-conversion/bignum-dtoa.cc",
-        "double-conversion/cached-powers.cc",
-        "double-conversion/diy-fp.cc",
-        "double-conversion/double-conversion.cc",
-        "double-conversion/fast-dtoa.cc",
-        "double-conversion/fixed-dtoa.cc",
-        "double-conversion/strtod.cc",
-        "double-conversion/utils.h",
-    ],
-    hdrs = [
-        "double-conversion/bignum.h",
-        "double-conversion/bignum-dtoa.h",
-        "double-conversion/cached-powers.h",
-        "double-conversion/diy-fp.h",
-        "double-conversion/double-conversion.h",
-        "double-conversion/fast-dtoa.h",
-        "double-conversion/fixed-dtoa.h",
-        "double-conversion/ieee.h",
-        "double-conversion/strtod.h",
-    ],
-    includes = [
-        ".",
-    ],
-    linkopts = [
-        "-lm",
-    ],
-    visibility = ["//visibility:public"],
-)
diff --git a/third_party/eigen.BUILD b/third_party/eigen.BUILD
deleted file mode 100644
index 07bb664..0000000
--- a/third_party/eigen.BUILD
+++ /dev/null
@@ -1,70 +0,0 @@
-# Description:
-#   Eigen is a C++ template library for linear algebra: vectors,
-#   matrices, and related algorithms.
-
-licenses([
-    # Note: Eigen is an MPL2 library that includes GPL v3 and LGPL v2.1+ code.
-    #       We've taken special care to not reference any restricted code.
-    "reciprocal",  # MPL2
-    "notice",  # Portions BSD
-])
-
-exports_files(["COPYING.MPL2"])
-
-# License-restricted (i.e. not reciprocal or notice) files inside Eigen/...
-EIGEN_RESTRICTED_FILES = [
-    "Eigen/src/OrderingMethods/Amd.h",
-    "Eigen/src/SparseCholesky/**",
-]
-
-# Notable transitive dependencies of restricted files inside Eigen/...
-EIGEN_RESTRICTED_DEPS = [
-    "Eigen/Eigen",
-    "Eigen/IterativeLinearSolvers",
-    "Eigen/MetisSupport",
-    "Eigen/Sparse",
-    "Eigen/SparseCholesky",
-    "Eigen/SparseLU",
-]
-
-EIGEN_FILES = [
-    "Eigen/**",
-    "unsupported/Eigen/CXX11/**",
-    "unsupported/Eigen/FFT",
-    "unsupported/Eigen/KroneckerProduct",
-    "unsupported/Eigen/src/FFT/**",
-    "unsupported/Eigen/src/KroneckerProduct/**",
-    "unsupported/Eigen/MatrixFunctions",
-    "unsupported/Eigen/SpecialFunctions",
-    "unsupported/Eigen/src/MatrixFunctions/**",
-    "unsupported/Eigen/src/SpecialFunctions/**",
-]
-
-# List of files picked up by glob but actually part of another target.
-EIGEN_EXCLUDE_FILES = [
-    "Eigen/src/Core/arch/AVX/PacketMathGoogleTest.cc",
-]
-
-# Files known to be under MPL2 license.
-EIGEN_MPL2_HEADER_FILES = glob(
-    EIGEN_FILES,
-    exclude = EIGEN_EXCLUDE_FILES +
-              EIGEN_RESTRICTED_FILES +
-              EIGEN_RESTRICTED_DEPS + [
-        # Guarantees any file missed by excludes above will not compile.
-        "Eigen/src/Core/util/NonMPL2.h",
-        "Eigen/**/CMakeLists.txt",
-    ],
-)
-
-cc_library(
-    name = "eigen",
-    hdrs = EIGEN_MPL2_HEADER_FILES,
-    defines = [
-        # This define (mostly) guarantees we don't link any problematic
-        # code. We use it, but we do not rely on it, as evidenced above.
-        "EIGEN_MPL2_ONLY",
-    ],
-    includes = ["."],
-    visibility = ["//visibility:public"],
-)
diff --git a/third_party/eigen3/BUILD b/third_party/eigen3/BUILD
deleted file mode 100644
index f661093..0000000
--- a/third_party/eigen3/BUILD
+++ /dev/null
@@ -1,50 +0,0 @@
-# Description:
-#   Eigen is a C++ template library for linear algebra: vectors,
-#   matrices, and related algorithms.
-
-licenses([
-    # Note: Eigen is an MPL2 library that includes GPL v3 and LGPL v2.1+ code.
-    #       We've taken special care to not reference any restricted code.
-    "reciprocal",  # MPL2
-    "notice",  # Portions BSD
-])
-
-exports_files(["LICENSE"])
-
-# INTEL_MKL start
-load("//tensorflow:tensorflow.bzl", "if_mkl")
-
-# INTEL_MKL end
-load("//tensorflow:tensorflow.bzl", "if_mkl")
-
-cc_library(
-    name = "eigen3",
-    hdrs = glob(["unsupported/Eigen/CXX11/src/FixedPoint/*.h"]) + [
-        "Eigen/Core",
-        "Eigen/LU",
-        "Eigen/Cholesky",
-        "Eigen/Eigenvalues",
-        "Eigen/QR",
-        "Eigen/SVD",
-        "unsupported/Eigen/MatrixFunctions",
-        "unsupported/Eigen/SpecialFunctions",
-        "unsupported/Eigen/CXX11/ThreadPool",
-        "unsupported/Eigen/CXX11/Tensor",
-        "unsupported/Eigen/CXX11/FixedPoint",
-    ],
-    includes = if_mkl(["./mkl_include"]),
-    visibility = ["//visibility:public"],
-    deps = [
-        "@eigen_archive//:eigen",
-        "@local_config_sycl//sycl",
-    ],
-)
-
-filegroup(
-    name = "all_files",
-    srcs = glob(
-        ["**/*"],
-        exclude = ["**/OWNERS"],
-    ),
-    visibility = ["//tensorflow:__subpackages__"],
-)
diff --git a/third_party/eigen3/Eigen/Cholesky b/third_party/eigen3/Eigen/Cholesky
deleted file mode 100644
index c199a02..0000000
--- a/third_party/eigen3/Eigen/Cholesky
+++ /dev/null
@@ -1 +0,0 @@
-#include "Eigen/Cholesky"
diff --git a/third_party/eigen3/Eigen/Core b/third_party/eigen3/Eigen/Core
deleted file mode 100644
index d4b0367..0000000
--- a/third_party/eigen3/Eigen/Core
+++ /dev/null
@@ -1 +0,0 @@
-#include "Eigen/Core"
diff --git a/third_party/eigen3/Eigen/Eigenvalues b/third_party/eigen3/Eigen/Eigenvalues
deleted file mode 100644
index bf739b9..0000000
--- a/third_party/eigen3/Eigen/Eigenvalues
+++ /dev/null
@@ -1 +0,0 @@
-#include "Eigen/Eigenvalues"
diff --git a/third_party/eigen3/Eigen/LU b/third_party/eigen3/Eigen/LU
deleted file mode 100644
index 536149c..0000000
--- a/third_party/eigen3/Eigen/LU
+++ /dev/null
@@ -1 +0,0 @@
-#include "Eigen/LU"
diff --git a/third_party/eigen3/Eigen/QR b/third_party/eigen3/Eigen/QR
deleted file mode 100644
index be067d3..0000000
--- a/third_party/eigen3/Eigen/QR
+++ /dev/null
@@ -1 +0,0 @@
-#include "Eigen/QR"
diff --git a/third_party/eigen3/Eigen/SVD b/third_party/eigen3/Eigen/SVD
deleted file mode 100644
index eecf47c..0000000
--- a/third_party/eigen3/Eigen/SVD
+++ /dev/null
@@ -1 +0,0 @@
-#include "Eigen/SVD"
diff --git a/third_party/eigen3/LICENSE b/third_party/eigen3/LICENSE
deleted file mode 100644
index a25d8e6..0000000
--- a/third_party/eigen3/LICENSE
+++ /dev/null
@@ -1,1936 +0,0 @@
-Eigen is primarily MPL2 licensed. See COPYING.MPL2 and these links:
-  http://www.mozilla.org/MPL/2.0/
-  http://www.mozilla.org/MPL/2.0/FAQ.html
-
-Some files contain third-party code under BSD or LGPL licenses, whence
-the other COPYING.* files here.
-
-All the LGPL code is either LGPL 2.1-only, or LGPL 2.1-or-later.
-For this reason, the COPYING.LGPL file contains the LGPL 2.1 text.
-
-If you want to guarantee that the Eigen code that you are #including
-is licensed under the MPL2 and possibly more permissive licenses (like
-BSD), #define this preprocessor symbol: EIGEN_MPL2_ONLY 
-For example, with most compilers, you could add this to your project
-      CXXFLAGS: -DEIGEN_MPL2_ONLY 
-This will cause a compilation error to be generated if you #include
-any code that is LGPL licensed.
-
-----------------------------------------------------------------------
-Following applies to:
-./test/mapstaticmethods.cpp
-./test/schur_real.cpp
-./test/prec_inverse_4x4.cpp
-./test/smallvectors.cpp
-./test/redux.cpp
-./test/special_numbers.cpp
-./test/adjoint.cpp
-./test/resize.cpp
-./test/mixingtypes.cpp
-./test/product_trmv.cpp
-./test/sparse_solvers.cpp
-./test/cholesky.cpp
-./test/geo_quaternion.cpp
-./test/miscmatrices.cpp
-./test/stddeque.cpp
-./test/integer_types.cpp
-./test/product_large.cpp
-./test/eigensolver_generic.cpp
-./test/householder.cpp
-./test/geo_orthomethods.cpp
-./test/array_for_matrix.cpp
-./test/sparseLM.cpp
-./test/upperbidiagonalization.cpp
-./test/nomalloc.cpp
-./test/packetmath.cpp
-./test/jacobisvd.cpp
-./test/geo_transformations.cpp
-./test/swap.cpp
-./test/eigensolver_selfadjoint.cpp
-./test/inverse.cpp
-./test/product_selfadjoint.cpp
-./test/product_trsolve.cpp
-./test/product_extra.cpp
-./test/sparse_solver.h
-./test/mapstride.cpp
-./test/mapped_matrix.cpp
-./test/geo_eulerangles.cpp
-./test/eigen2support.cpp
-./test/denseLM.cpp
-./test/stdvector.cpp
-./test/nesting_ops.cpp
-./test/sparse_permutations.cpp
-./test/zerosized.cpp
-./test/exceptions.cpp
-./test/vectorwiseop.cpp
-./test/cwiseop.cpp
-./test/basicstuff.cpp
-./test/product_trmm.cpp
-./test/linearstructure.cpp
-./test/sparse_product.cpp
-./test/stdvector_overload.cpp
-./test/stable_norm.cpp
-./test/umeyama.cpp
-./test/unalignedcount.cpp
-./test/triangular.cpp
-./test/product_mmtr.cpp
-./test/sparse_basic.cpp
-./test/sparse_vector.cpp
-./test/meta.cpp
-./test/real_qz.cpp
-./test/ref.cpp
-./test/eigensolver_complex.cpp
-./test/cholmod_support.cpp
-./test/conjugate_gradient.cpp
-./test/sparse.h
-./test/simplicial_cholesky.cpp
-./test/bicgstab.cpp
-./test/dynalloc.cpp
-./test/product_notemporary.cpp
-./test/geo_hyperplane.cpp
-./test/lu.cpp
-./test/qr.cpp
-./test/hessenberg.cpp
-./test/sizeof.cpp
-./test/main.h
-./test/selfadjoint.cpp
-./test/permutationmatrices.cpp
-./test/superlu_support.cpp
-./test/qtvector.cpp
-./test/geo_homogeneous.cpp
-./test/determinant.cpp
-./test/array_reverse.cpp
-./test/unalignedassert.cpp
-./test/stdlist.cpp
-./test/product_symm.cpp
-./test/corners.cpp
-./test/dontalign.cpp
-./test/visitor.cpp
-./test/geo_alignedbox.cpp
-./test/diagonalmatrices.cpp
-./test/product_small.cpp
-./test/eigensolver_generalized_real.cpp
-./test/umfpack_support.cpp
-./test/first_aligned.cpp
-./test/qr_fullpivoting.cpp
-./test/array_replicate.cpp
-./test/geo_parametrizedline.cpp
-./test/eigen2/eigen2_unalignedassert.cpp
-./test/eigen2/eigen2_prec_inverse_4x4.cpp
-./test/eigen2/eigen2_alignedbox.cpp
-./test/eigen2/eigen2_sparse_product.cpp
-./test/eigen2/eigen2_meta.cpp
-./test/eigen2/eigen2_nomalloc.cpp
-./test/eigen2/eigen2_visitor.cpp
-./test/eigen2/eigen2_packetmath.cpp
-./test/eigen2/eigen2_svd.cpp
-./test/eigen2/eigen2_mixingtypes.cpp
-./test/eigen2/eigen2_qr.cpp
-./test/eigen2/eigen2_cwiseop.cpp
-./test/eigen2/eigen2_geometry_with_eigen2_prefix.cpp
-./test/eigen2/eigen2_smallvectors.cpp
-./test/eigen2/eigen2_commainitializer.cpp
-./test/eigen2/eigen2_sparse_solvers.cpp
-./test/eigen2/eigen2_hyperplane.cpp
-./test/eigen2/eigen2_eigensolver.cpp
-./test/eigen2/eigen2_linearstructure.cpp
-./test/eigen2/eigen2_sizeof.cpp
-./test/eigen2/eigen2_parametrizedline.cpp
-./test/eigen2/eigen2_lu.cpp
-./test/eigen2/eigen2_adjoint.cpp
-./test/eigen2/eigen2_geometry.cpp
-./test/eigen2/eigen2_stdvector.cpp
-./test/eigen2/eigen2_newstdvector.cpp
-./test/eigen2/eigen2_submatrices.cpp
-./test/eigen2/sparse.h
-./test/eigen2/eigen2_swap.cpp
-./test/eigen2/eigen2_triangular.cpp
-./test/eigen2/eigen2_basicstuff.cpp
-./test/eigen2/gsl_helper.h
-./test/eigen2/eigen2_dynalloc.cpp
-./test/eigen2/eigen2_array.cpp
-./test/eigen2/eigen2_map.cpp
-./test/eigen2/main.h
-./test/eigen2/eigen2_miscmatrices.cpp
-./test/eigen2/eigen2_product_large.cpp
-./test/eigen2/eigen2_first_aligned.cpp
-./test/eigen2/eigen2_cholesky.cpp
-./test/eigen2/eigen2_determinant.cpp
-./test/eigen2/eigen2_sum.cpp
-./test/eigen2/eigen2_inverse.cpp
-./test/eigen2/eigen2_regression.cpp
-./test/eigen2/eigen2_product_small.cpp
-./test/eigen2/eigen2_qtvector.cpp
-./test/eigen2/eigen2_sparse_vector.cpp
-./test/eigen2/product.h
-./test/eigen2/eigen2_sparse_basic.cpp
-./test/eigen2/eigen2_bug_132.cpp
-./test/array.cpp
-./test/product_syrk.cpp
-./test/commainitializer.cpp
-./test/conservative_resize.cpp
-./test/qr_colpivoting.cpp
-./test/nullary.cpp
-./test/bandmatrix.cpp
-./test/pastix_support.cpp
-./test/product.h
-./test/block.cpp
-./test/vectorization_logic.cpp
-./test/jacobi.cpp
-./test/diagonal.cpp
-./test/schur_complex.cpp
-./test/sizeoverflow.cpp
-./bench/BenchTimer.h
-./bench/benchFFT.cpp
-./bench/eig33.cpp
-./bench/spbench/spbenchsolver.h
-./bench/spbench/spbenchstyle.h
-./lapack/complex_double.cpp
-./lapack/cholesky.cpp
-./lapack/lapack_common.h
-./lapack/eigenvalues.cpp
-./lapack/single.cpp
-./lapack/lu.cpp
-./lapack/complex_single.cpp
-./lapack/double.cpp
-./demos/mix_eigen_and_c/binary_library.cpp
-./demos/mix_eigen_and_c/binary_library.h
-./demos/mix_eigen_and_c/example.c
-./demos/mandelbrot/mandelbrot.cpp
-./demos/mandelbrot/mandelbrot.h
-./demos/opengl/icosphere.cpp
-./demos/opengl/icosphere.h
-./demos/opengl/camera.cpp
-./demos/opengl/quaternion_demo.h
-./demos/opengl/camera.h
-./demos/opengl/trackball.h
-./demos/opengl/gpuhelper.h
-./demos/opengl/trackball.cpp
-./demos/opengl/gpuhelper.cpp
-./demos/opengl/quaternion_demo.cpp
-./debug/gdb/printers.py
-./unsupported/test/minres.cpp
-./unsupported/test/openglsupport.cpp
-./unsupported/test/jacobisvd.cpp
-./unsupported/test/dgmres.cpp
-./unsupported/test/matrix_square_root.cpp
-./unsupported/test/bdcsvd.cpp
-./unsupported/test/matrix_exponential.cpp
-./unsupported/test/forward_adolc.cpp
-./unsupported/test/polynomialsolver.cpp
-./unsupported/test/matrix_function.cpp
-./unsupported/test/sparse_extra.cpp
-./unsupported/test/matrix_functions.h
-./unsupported/test/svd_common.h
-./unsupported/test/FFTW.cpp
-./unsupported/test/alignedvector3.cpp
-./unsupported/test/autodiff.cpp
-./unsupported/test/gmres.cpp
-./unsupported/test/BVH.cpp
-./unsupported/test/levenberg_marquardt.cpp
-./unsupported/test/matrix_power.cpp
-./unsupported/test/kronecker_product.cpp
-./unsupported/test/splines.cpp
-./unsupported/test/polynomialutils.cpp
-./unsupported/bench/bench_svd.cpp
-./unsupported/Eigen/IterativeSolvers
-./unsupported/Eigen/src/IterativeSolvers/DGMRES.h
-./unsupported/Eigen/src/IterativeSolvers/IncompleteLU.h
-./unsupported/Eigen/src/IterativeSolvers/GMRES.h
-./unsupported/Eigen/src/IterativeSolvers/IncompleteCholesky.h
-./unsupported/Eigen/src/IterativeSolvers/Scaling.h
-./unsupported/Eigen/src/IterativeSolvers/MINRES.h
-./unsupported/Eigen/src/SparseExtra/RandomSetter.h
-./unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h
-./unsupported/Eigen/src/SparseExtra/DynamicSparseMatrix.h
-./unsupported/Eigen/src/SparseExtra/MarketIO.h
-./unsupported/Eigen/src/SparseExtra/BlockOfDynamicSparseMatrix.h
-./unsupported/Eigen/src/KroneckerProduct/KroneckerTensorProduct.h
-./unsupported/Eigen/src/NonLinearOptimization/LevenbergMarquardt.h
-./unsupported/Eigen/src/NonLinearOptimization/HybridNonLinearSolver.h
-./unsupported/Eigen/src/BVH/BVAlgorithms.h
-./unsupported/Eigen/src/BVH/KdBVH.h
-./unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h
-./unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
-./unsupported/Eigen/src/AutoDiff/AutoDiffVector.h
-./unsupported/Eigen/src/Splines/Spline.h
-./unsupported/Eigen/src/Splines/SplineFitting.h
-./unsupported/Eigen/src/Splines/SplineFwd.h
-./unsupported/Eigen/src/SVD/JacobiSVD.h
-./unsupported/Eigen/src/SVD/BDCSVD.h
-./unsupported/Eigen/src/SVD/SVDBase.h
-./unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h
-./unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h
-./unsupported/Eigen/src/MatrixFunctions/MatrixLogarithm.h
-./unsupported/Eigen/src/MatrixFunctions/StemFunction.h
-./unsupported/Eigen/src/MatrixFunctions/MatrixPower.h
-./unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
-./unsupported/Eigen/src/MatrixFunctions/MatrixFunctionAtomic.h
-./unsupported/Eigen/src/MoreVectorization/MathFunctions.h
-./unsupported/Eigen/src/LevenbergMarquardt/LevenbergMarquardt.h
-./unsupported/Eigen/src/FFT/ei_fftw_impl.h
-./unsupported/Eigen/src/FFT/ei_kissfft_impl.h
-./unsupported/Eigen/src/Polynomials/PolynomialSolver.h
-./unsupported/Eigen/src/Polynomials/Companion.h
-./unsupported/Eigen/src/Polynomials/PolynomialUtils.h
-./unsupported/Eigen/src/NumericalDiff/NumericalDiff.h
-./unsupported/Eigen/src/Skyline/SkylineProduct.h
-./unsupported/Eigen/src/Skyline/SkylineMatrixBase.h
-./unsupported/Eigen/src/Skyline/SkylineStorage.h
-./unsupported/Eigen/src/Skyline/SkylineUtil.h
-./unsupported/Eigen/src/Skyline/SkylineInplaceLU.h
-./unsupported/Eigen/src/Skyline/SkylineMatrix.h
-./unsupported/Eigen/SparseExtra
-./unsupported/Eigen/AdolcForward
-./unsupported/Eigen/KroneckerProduct
-./unsupported/Eigen/NonLinearOptimization
-./unsupported/Eigen/BVH
-./unsupported/Eigen/OpenGLSupport
-./unsupported/Eigen/ArpackSupport
-./unsupported/Eigen/AutoDiff
-./unsupported/Eigen/Splines
-./unsupported/Eigen/MPRealSupport
-./unsupported/Eigen/MatrixFunctions
-./unsupported/Eigen/MoreVectorization
-./unsupported/Eigen/LevenbergMarquardt
-./unsupported/Eigen/AlignedVector3
-./unsupported/Eigen/FFT
-./unsupported/Eigen/Polynomials
-./unsupported/Eigen/NumericalDiff
-./unsupported/Eigen/Skyline
-./COPYING.README
-./COPYING.README
-./LICENSE
-./LICENSE
-./LICENSE
-./Eigen/Eigen2Support
-./Eigen/src/Eigen2Support/VectorBlock.h
-./Eigen/src/Eigen2Support/Cwise.h
-./Eigen/src/Eigen2Support/Minor.h
-./Eigen/src/Eigen2Support/Lazy.h
-./Eigen/src/Eigen2Support/Memory.h
-./Eigen/src/Eigen2Support/MathFunctions.h
-./Eigen/src/Eigen2Support/Geometry/AlignedBox.h
-./Eigen/src/Eigen2Support/Geometry/Hyperplane.h
-./Eigen/src/Eigen2Support/Geometry/Quaternion.h
-./Eigen/src/Eigen2Support/Geometry/Rotation2D.h
-./Eigen/src/Eigen2Support/Geometry/ParametrizedLine.h
-./Eigen/src/Eigen2Support/Geometry/RotationBase.h
-./Eigen/src/Eigen2Support/Geometry/Translation.h
-./Eigen/src/Eigen2Support/Geometry/Scaling.h
-./Eigen/src/Eigen2Support/Geometry/AngleAxis.h
-./Eigen/src/Eigen2Support/Geometry/Transform.h
-./Eigen/src/Eigen2Support/TriangularSolver.h
-./Eigen/src/Eigen2Support/LU.h
-./Eigen/src/Eigen2Support/QR.h
-./Eigen/src/Eigen2Support/SVD.h
-./Eigen/src/Eigen2Support/Meta.h
-./Eigen/src/Eigen2Support/Block.h
-./Eigen/src/Eigen2Support/Macros.h
-./Eigen/src/Eigen2Support/LeastSquares.h
-./Eigen/src/Eigen2Support/CwiseOperators.h
-./Eigen/src/Jacobi/Jacobi.h
-./Eigen/src/misc/Kernel.h
-./Eigen/src/misc/SparseSolve.h
-./Eigen/src/misc/Solve.h
-./Eigen/src/misc/Image.h
-./Eigen/src/SparseCore/SparseColEtree.h
-./Eigen/src/SparseCore/SparseTranspose.h
-./Eigen/src/SparseCore/SparseUtil.h
-./Eigen/src/SparseCore/SparseCwiseBinaryOp.h
-./Eigen/src/SparseCore/SparseDiagonalProduct.h
-./Eigen/src/SparseCore/SparseProduct.h
-./Eigen/src/SparseCore/SparseDot.h
-./Eigen/src/SparseCore/SparseCwiseUnaryOp.h
-./Eigen/src/SparseCore/SparseSparseProductWithPruning.h
-./Eigen/src/SparseCore/SparseBlock.h
-./Eigen/src/SparseCore/SparseDenseProduct.h
-./Eigen/src/SparseCore/CompressedStorage.h
-./Eigen/src/SparseCore/SparseMatrixBase.h
-./Eigen/src/SparseCore/MappedSparseMatrix.h
-./Eigen/src/SparseCore/SparseTriangularView.h
-./Eigen/src/SparseCore/SparseView.h
-./Eigen/src/SparseCore/SparseFuzzy.h
-./Eigen/src/SparseCore/TriangularSolver.h
-./Eigen/src/SparseCore/SparseSelfAdjointView.h
-./Eigen/src/SparseCore/SparseMatrix.h
-./Eigen/src/SparseCore/SparseVector.h
-./Eigen/src/SparseCore/AmbiVector.h
-./Eigen/src/SparseCore/ConservativeSparseSparseProduct.h
-./Eigen/src/SparseCore/SparseRedux.h
-./Eigen/src/SparseCore/SparsePermutation.h
-./Eigen/src/Eigenvalues/RealSchur.h
-./Eigen/src/Eigenvalues/ComplexEigenSolver.h
-./Eigen/src/Eigenvalues/GeneralizedEigenSolver.h
-./Eigen/src/Eigenvalues/ComplexSchur.h
-./Eigen/src/Eigenvalues/RealQZ.h
-./Eigen/src/Eigenvalues/EigenSolver.h
-./Eigen/src/Eigenvalues/HessenbergDecomposition.h
-./Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h
-./Eigen/src/Eigenvalues/Tridiagonalization.h
-./Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h
-./Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h
-./Eigen/src/SuperLUSupport/SuperLUSupport.h
-./Eigen/src/StlSupport/StdDeque.h
-./Eigen/src/StlSupport/StdVector.h
-./Eigen/src/StlSupport/StdList.h
-./Eigen/src/StlSupport/details.h
-./Eigen/src/SparseQR/SparseQR.h
-./Eigen/src/LU/Inverse.h
-./Eigen/src/LU/arch/Inverse_SSE.h
-./Eigen/src/LU/Determinant.h
-./Eigen/src/LU/PartialPivLU.h
-./Eigen/src/LU/FullPivLU.h
-./Eigen/src/UmfPackSupport/UmfPackSupport.h
-./Eigen/src/OrderingMethods/Ordering.h
-./Eigen/src/OrderingMethods/Eigen_Colamd.h
-./Eigen/src/QR/HouseholderQR.h
-./Eigen/src/QR/ColPivHouseholderQR.h
-./Eigen/src/QR/FullPivHouseholderQR.h
-./Eigen/src/SVD/JacobiSVD.h
-./Eigen/src/SVD/UpperBidiagonalization.h
-./Eigen/src/Geometry/OrthoMethods.h
-./Eigen/src/Geometry/AlignedBox.h
-./Eigen/src/Geometry/Hyperplane.h
-./Eigen/src/Geometry/Quaternion.h
-./Eigen/src/Geometry/EulerAngles.h
-./Eigen/src/Geometry/Rotation2D.h
-./Eigen/src/Geometry/ParametrizedLine.h
-./Eigen/src/Geometry/RotationBase.h
-./Eigen/src/Geometry/arch/Geometry_SSE.h
-./Eigen/src/Geometry/Umeyama.h
-./Eigen/src/Geometry/Homogeneous.h
-./Eigen/src/Geometry/Translation.h
-./Eigen/src/Geometry/Scaling.h
-./Eigen/src/Geometry/AngleAxis.h
-./Eigen/src/Geometry/Transform.h
-./Eigen/src/plugins/BlockMethods.h
-./Eigen/src/plugins/CommonCwiseUnaryOps.h
-./Eigen/src/plugins/CommonCwiseBinaryOps.h
-./Eigen/src/plugins/MatrixCwiseUnaryOps.h
-./Eigen/src/plugins/MatrixCwiseBinaryOps.h
-./Eigen/src/Householder/Householder.h
-./Eigen/src/Householder/HouseholderSequence.h
-./Eigen/src/Householder/BlockHouseholder.h
-./Eigen/src/Core/VectorBlock.h
-./Eigen/src/Core/Matrix.h
-./Eigen/src/Core/Ref.h
-./Eigen/src/Core/SelfAdjointView.h
-./Eigen/src/Core/MathFunctions.h
-./Eigen/src/Core/GlobalFunctions.h
-./Eigen/src/Core/MapBase.h
-./Eigen/src/Core/EigenBase.h
-./Eigen/src/Core/GenericPacketMath.h
-./Eigen/src/Core/NestByValue.h
-./Eigen/src/Core/CwiseUnaryOp.h
-./Eigen/src/Core/SolveTriangular.h
-./Eigen/src/Core/Fuzzy.h
-./Eigen/src/Core/Visitor.h
-./Eigen/src/Core/Map.h
-./Eigen/src/Core/NoAlias.h
-./Eigen/src/Core/Diagonal.h
-./Eigen/src/Core/StableNorm.h
-./Eigen/src/Core/CoreIterators.h
-./Eigen/src/Core/products/Parallelizer.h
-./Eigen/src/Core/products/SelfadjointMatrixVector.h
-./Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h
-./Eigen/src/Core/products/TriangularSolverMatrix.h
-./Eigen/src/Core/products/GeneralMatrixMatrix.h
-./Eigen/src/Core/products/SelfadjointProduct.h
-./Eigen/src/Core/products/CoeffBasedProduct.h
-./Eigen/src/Core/products/TriangularMatrixVector.h
-./Eigen/src/Core/products/SelfadjointMatrixMatrix.h
-./Eigen/src/Core/products/TriangularSolverVector.h
-./Eigen/src/Core/products/SelfadjointRank2Update.h
-./Eigen/src/Core/products/GeneralBlockPanelKernel.h
-./Eigen/src/Core/products/GeneralMatrixVector.h
-./Eigen/src/Core/products/TriangularMatrixMatrix.h
-./Eigen/src/Core/Reverse.h
-./Eigen/src/Core/BooleanRedux.h
-./Eigen/src/Core/Replicate.h
-./Eigen/src/Core/arch/AltiVec/PacketMath.h
-./Eigen/src/Core/arch/AltiVec/Complex.h
-./Eigen/src/Core/arch/SSE/PacketMath.h
-./Eigen/src/Core/arch/SSE/Complex.h
-./Eigen/src/Core/arch/SSE/MathFunctions.h
-./Eigen/src/Core/arch/NEON/PacketMath.h
-./Eigen/src/Core/arch/NEON/Complex.h
-./Eigen/src/Core/arch/Default/Settings.h
-./Eigen/src/Core/CwiseUnaryView.h
-./Eigen/src/Core/Array.h
-./Eigen/src/Core/ArrayWrapper.h
-./Eigen/src/Core/Swap.h
-./Eigen/src/Core/Transpositions.h
-./Eigen/src/Core/Random.h
-./Eigen/src/Core/IO.h
-./Eigen/src/Core/SelfCwiseBinaryOp.h
-./Eigen/src/Core/VectorwiseOp.h
-./Eigen/src/Core/Select.h
-./Eigen/src/Core/ArrayBase.h
-./Eigen/src/Core/DenseCoeffsBase.h
-./Eigen/src/Core/DiagonalProduct.h
-./Eigen/src/Core/Assign.h
-./Eigen/src/Core/Redux.h
-./Eigen/src/Core/ForceAlignedAccess.h
-./Eigen/src/Core/BandMatrix.h
-./Eigen/src/Core/PlainObjectBase.h
-./Eigen/src/Core/DenseBase.h
-./Eigen/src/Core/Flagged.h
-./Eigen/src/Core/CwiseBinaryOp.h
-./Eigen/src/Core/ProductBase.h
-./Eigen/src/Core/TriangularMatrix.h
-./Eigen/src/Core/Transpose.h
-./Eigen/src/Core/DiagonalMatrix.h
-./Eigen/src/Core/Dot.h
-./Eigen/src/Core/Functors.h
-./Eigen/src/Core/PermutationMatrix.h
-./Eigen/src/Core/NumTraits.h
-./Eigen/src/Core/MatrixBase.h
-./Eigen/src/Core/DenseStorage.h
-./Eigen/src/Core/util/Memory.h
-./Eigen/src/Core/util/StaticAssert.h
-./Eigen/src/Core/util/BlasUtil.h
-./Eigen/src/Core/util/MatrixMapper.h
-./Eigen/src/Core/util/XprHelper.h
-./Eigen/src/Core/util/ForwardDeclarations.h
-./Eigen/src/Core/util/Meta.h
-./Eigen/src/Core/util/Macros.h
-./Eigen/src/Core/util/Constants.h
-./Eigen/src/Core/CwiseNullaryOp.h
-./Eigen/src/Core/Block.h
-./Eigen/src/Core/GeneralProduct.h
-./Eigen/src/Core/CommaInitializer.h
-./Eigen/src/Core/ReturnByValue.h
-./Eigen/src/Core/Stride.h
-./Eigen/src/SPQRSupport/SuiteSparseQRSupport.h
-./Eigen/src/SparseLU/SparseLU_column_dfs.h
-./Eigen/src/SparseLU/SparseLU_panel_dfs.h
-./Eigen/src/SparseLU/SparseLU_relax_snode.h
-./Eigen/src/SparseLU/SparseLU_panel_bmod.h
-./Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h
-./Eigen/src/SparseLU/SparseLU_Utils.h
-./Eigen/src/SparseLU/SparseLU_gemm_kernel.h
-./Eigen/src/SparseLU/SparseLU_kernel_bmod.h
-./Eigen/src/SparseLU/SparseLU_pivotL.h
-./Eigen/src/SparseLU/SparseLU_Memory.h
-./Eigen/src/SparseLU/SparseLU_heap_relax_snode.h
-./Eigen/src/SparseLU/SparseLUImpl.h
-./Eigen/src/SparseLU/SparseLU_copy_to_ucol.h
-./Eigen/src/SparseLU/SparseLU_Structs.h
-./Eigen/src/SparseLU/SparseLU.h
-./Eigen/src/SparseLU/SparseLU_column_bmod.h
-./Eigen/src/SparseLU/SparseLU_pruneL.h
-./Eigen/src/IterativeLinearSolvers/IncompleteLUT.h
-./Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h
-./Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h
-./Eigen/src/IterativeLinearSolvers/ConjugateGradient.h
-./Eigen/src/IterativeLinearSolvers/BiCGSTAB.h
-./Eigen/src/SparseCholesky/SimplicialCholesky.h
-./Eigen/src/Cholesky/LDLT.h
-./Eigen/src/Cholesky/LLT.h
-./Eigen/src/CholmodSupport/CholmodSupport.h
-./Eigen/src/PaStiXSupport/PaStiXSupport.h
-./Eigen/src/MetisSupport/MetisSupport.h
-./Eigen/StdVector
-./Eigen/Core
-./Eigen/SparseLU
-./Eigen/StdList
-./Eigen/StdDeque
-./Eigen/SparseCholesky
-./scripts/relicense.py
-./scripts/relicense.py
-./blas/BandTriangularSolver.h
-./blas/PackedTriangularMatrixVector.h
-./blas/complex_double.cpp
-./blas/level2_real_impl.h
-./blas/level1_cplx_impl.h
-./blas/level1_impl.h
-./blas/level1_real_impl.h
-./blas/level3_impl.h
-./blas/single.cpp
-./blas/level2_cplx_impl.h
-./blas/PackedSelfadjointProduct.h
-./blas/Rank2Update.h
-./blas/complex_single.cpp
-./blas/PackedTriangularSolverVector.h
-./blas/double.cpp
-./blas/common.h
-./blas/level2_impl.h
-./blas/GeneralRank1Update.h
-
-Mozilla Public License Version 2.0
-==================================
-
-1. Definitions
---------------
-
-1.1. "Contributor"
-    means each individual or legal entity that creates, contributes to
-    the creation of, or owns Covered Software.
-
-1.2. "Contributor Version"
-    means the combination of the Contributions of others (if any) used
-    by a Contributor and that particular Contributor's Contribution.
-
-1.3. "Contribution"
-    means Covered Software of a particular Contributor.
-
-1.4. "Covered Software"
-    means Source Code Form to which the initial Contributor has attached
-    the notice in Exhibit A, the Executable Form of such Source Code
-    Form, and Modifications of such Source Code Form, in each case
-    including portions thereof.
-
-1.5. "Incompatible With Secondary Licenses"
-    means
-
-    (a) that the initial Contributor has attached the notice described
-        in Exhibit B to the Covered Software; or
-
-    (b) that the Covered Software was made available under the terms of
-        version 1.1 or earlier of the License, but not also under the
-        terms of a Secondary License.
-
-1.6. "Executable Form"
-    means any form of the work other than Source Code Form.
-
-1.7. "Larger Work"
-    means a work that combines Covered Software with other material, in 
-    a separate file or files, that is not Covered Software.
-
-1.8. "License"
-    means this document.
-
-1.9. "Licensable"
-    means having the right to grant, to the maximum extent possible,
-    whether at the time of the initial grant or subsequently, any and
-    all of the rights conveyed by this License.
-
-1.10. "Modifications"
-    means any of the following:
-
-    (a) any file in Source Code Form that results from an addition to,
-        deletion from, or modification of the contents of Covered
-        Software; or
-
-    (b) any new file in Source Code Form that contains any Covered
-        Software.
-
-1.11. "Patent Claims" of a Contributor
-    means any patent claim(s), including without limitation, method,
-    process, and apparatus claims, in any patent Licensable by such
-    Contributor that would be infringed, but for the grant of the
-    License, by the making, using, selling, offering for sale, having
-    made, import, or transfer of either its Contributions or its
-    Contributor Version.
-
-1.12. "Secondary License"
-    means either the GNU General Public License, Version 2.0, the GNU
-    Lesser General Public License, Version 2.1, the GNU Affero General
-    Public License, Version 3.0, or any later versions of those
-    licenses.
-
-1.13. "Source Code Form"
-    means the form of the work preferred for making modifications.
-
-1.14. "You" (or "Your")
-    means an individual or a legal entity exercising rights under this
-    License. For legal entities, "You" includes any entity that
-    controls, is controlled by, or is under common control with You. For
-    purposes of this definition, "control" means (a) the power, direct
-    or indirect, to cause the direction or management of such entity,
-    whether by contract or otherwise, or (b) ownership of more than
-    fifty percent (50%) of the outstanding shares or beneficial
-    ownership of such entity.
-
-2. License Grants and Conditions
---------------------------------
-
-2.1. Grants
-
-Each Contributor hereby grants You a world-wide, royalty-free,
-non-exclusive license:
-
-(a) under intellectual property rights (other than patent or trademark)
-    Licensable by such Contributor to use, reproduce, make available,
-    modify, display, perform, distribute, and otherwise exploit its
-    Contributions, either on an unmodified basis, with Modifications, or
-    as part of a Larger Work; and
-
-(b) under Patent Claims of such Contributor to make, use, sell, offer
-    for sale, have made, import, and otherwise transfer either its
-    Contributions or its Contributor Version.
-
-2.2. Effective Date
-
-The licenses granted in Section 2.1 with respect to any Contribution
-become effective for each Contribution on the date the Contributor first
-distributes such Contribution.
-
-2.3. Limitations on Grant Scope
-
-The licenses granted in this Section 2 are the only rights granted under
-this License. No additional rights or licenses will be implied from the
-distribution or licensing of Covered Software under this License.
-Notwithstanding Section 2.1(b) above, no patent license is granted by a
-Contributor:
-
-(a) for any code that a Contributor has removed from Covered Software;
-    or
-
-(b) for infringements caused by: (i) Your and any other third party's
-    modifications of Covered Software, or (ii) the combination of its
-    Contributions with other software (except as part of its Contributor
-    Version); or
-
-(c) under Patent Claims infringed by Covered Software in the absence of
-    its Contributions.
-
-This License does not grant any rights in the trademarks, service marks,
-or logos of any Contributor (except as may be necessary to comply with
-the notice requirements in Section 3.4).
-
-2.4. Subsequent Licenses
-
-No Contributor makes additional grants as a result of Your choice to
-distribute the Covered Software under a subsequent version of this
-License (see Section 10.2) or under the terms of a Secondary License (if
-permitted under the terms of Section 3.3).
-
-2.5. Representation
-
-Each Contributor represents that the Contributor believes its
-Contributions are its original creation(s) or it has sufficient rights
-to grant the rights to its Contributions conveyed by this License.
-
-2.6. Fair Use
-
-This License is not intended to limit any rights You have under
-applicable copyright doctrines of fair use, fair dealing, or other
-equivalents.
-
-2.7. Conditions
-
-Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
-in Section 2.1.
-
-3. Responsibilities
--------------------
-
-3.1. Distribution of Source Form
-
-All distribution of Covered Software in Source Code Form, including any
-Modifications that You create or to which You contribute, must be under
-the terms of this License. You must inform recipients that the Source
-Code Form of the Covered Software is governed by the terms of this
-License, and how they can obtain a copy of this License. You may not
-attempt to alter or restrict the recipients' rights in the Source Code
-Form.
-
-3.2. Distribution of Executable Form
-
-If You distribute Covered Software in Executable Form then:
-
-(a) such Covered Software must also be made available in Source Code
-    Form, as described in Section 3.1, and You must inform recipients of
-    the Executable Form how they can obtain a copy of such Source Code
-    Form by reasonable means in a timely manner, at a charge no more
-    than the cost of distribution to the recipient; and
-
-(b) You may distribute such Executable Form under the terms of this
-    License, or sublicense it under different terms, provided that the
-    license for the Executable Form does not attempt to limit or alter
-    the recipients' rights in the Source Code Form under this License.
-
-3.3. Distribution of a Larger Work
-
-You may create and distribute a Larger Work under terms of Your choice,
-provided that You also comply with the requirements of this License for
-the Covered Software. If the Larger Work is a combination of Covered
-Software with a work governed by one or more Secondary Licenses, and the
-Covered Software is not Incompatible With Secondary Licenses, this
-License permits You to additionally distribute such Covered Software
-under the terms of such Secondary License(s), so that the recipient of
-the Larger Work may, at their option, further distribute the Covered
-Software under the terms of either this License or such Secondary
-License(s).
-
-3.4. Notices
-
-You may not remove or alter the substance of any license notices
-(including copyright notices, patent notices, disclaimers of warranty,
-or limitations of liability) contained within the Source Code Form of
-the Covered Software, except that You may alter any license notices to
-the extent required to remedy known factual inaccuracies.
-
-3.5. Application of Additional Terms
-
-You may choose to offer, and to charge a fee for, warranty, support,
-indemnity or liability obligations to one or more recipients of Covered
-Software. However, You may do so only on Your own behalf, and not on
-behalf of any Contributor. You must make it absolutely clear that any
-such warranty, support, indemnity, or liability obligation is offered by
-You alone, and You hereby agree to indemnify every Contributor for any
-liability incurred by such Contributor as a result of warranty, support,
-indemnity or liability terms You offer. You may include additional
-disclaimers of warranty and limitations of liability specific to any
-jurisdiction.
-
-4. Inability to Comply Due to Statute or Regulation
----------------------------------------------------
-
-If it is impossible for You to comply with any of the terms of this
-License with respect to some or all of the Covered Software due to
-statute, judicial order, or regulation then You must: (a) comply with
-the terms of this License to the maximum extent possible; and (b)
-describe the limitations and the code they affect. Such description must
-be placed in a text file included with all distributions of the Covered
-Software under this License. Except to the extent prohibited by statute
-or regulation, such description must be sufficiently detailed for a
-recipient of ordinary skill to be able to understand it.
-
-5. Termination
---------------
-
-5.1. The rights granted under this License will terminate automatically
-if You fail to comply with any of its terms. However, if You become
-compliant, then the rights granted under this License from a particular
-Contributor are reinstated (a) provisionally, unless and until such
-Contributor explicitly and finally terminates Your grants, and (b) on an
-ongoing basis, if such Contributor fails to notify You of the
-non-compliance by some reasonable means prior to 60 days after You have
-come back into compliance. Moreover, Your grants from a particular
-Contributor are reinstated on an ongoing basis if such Contributor
-notifies You of the non-compliance by some reasonable means, this is the
-first time You have received notice of non-compliance with this License
-from such Contributor, and You become compliant prior to 30 days after
-Your receipt of the notice.
-
-5.2. If You initiate litigation against any entity by asserting a patent
-infringement claim (excluding declaratory judgment actions,
-counter-claims, and cross-claims) alleging that a Contributor Version
-directly or indirectly infringes any patent, then the rights granted to
-You by any and all Contributors for the Covered Software under Section
-2.1 of this License shall terminate.
-
-5.3. In the event of termination under Sections 5.1 or 5.2 above, all
-end user license agreements (excluding distributors and resellers) which
-have been validly granted by You or Your distributors under this License
-prior to termination shall survive termination.
-
-************************************************************************
-*                                                                      *
-*  6. Disclaimer of Warranty                                           *
-*  -------------------------                                           *
-*                                                                      *
-*  Covered Software is provided under this License on an "as is"       *
-*  basis, without warranty of any kind, either expressed, implied, or  *
-*  statutory, including, without limitation, warranties that the       *
-*  Covered Software is free of defects, merchantable, fit for a        *
-*  particular purpose or non-infringing. The entire risk as to the     *
-*  quality and performance of the Covered Software is with You.        *
-*  Should any Covered Software prove defective in any respect, You     *
-*  (not any Contributor) assume the cost of any necessary servicing,   *
-*  repair, or correction. This disclaimer of warranty constitutes an   *
-*  essential part of this License. No use of any Covered Software is   *
-*  authorized under this License except under this disclaimer.         *
-*                                                                      *
-************************************************************************
-
-************************************************************************
-*                                                                      *
-*  7. Limitation of Liability                                          *
-*  --------------------------                                          *
-*                                                                      *
-*  Under no circumstances and under no legal theory, whether tort      *
-*  (including negligence), contract, or otherwise, shall any           *
-*  Contributor, or anyone who distributes Covered Software as          *
-*  permitted above, be liable to You for any direct, indirect,         *
-*  special, incidental, or consequential damages of any character      *
-*  including, without limitation, damages for lost profits, loss of    *
-*  goodwill, work stoppage, computer failure or malfunction, or any    *
-*  and all other commercial damages or losses, even if such party      *
-*  shall have been informed of the possibility of such damages. This   *
-*  limitation of liability shall not apply to liability for death or   *
-*  personal injury resulting from such party's negligence to the       *
-*  extent applicable law prohibits such limitation. Some               *
-*  jurisdictions do not allow the exclusion or limitation of           *
-*  incidental or consequential damages, so this exclusion and          *
-*  limitation may not apply to You.                                    *
-*                                                                      *
-************************************************************************
-
-8. Litigation
--------------
-
-Any litigation relating to this License may be brought only in the
-courts of a jurisdiction where the defendant maintains its principal
-place of business and such litigation shall be governed by laws of that
-jurisdiction, without reference to its conflict-of-law provisions.
-Nothing in this Section shall prevent a party's ability to bring
-cross-claims or counter-claims.
-
-9. Miscellaneous
-----------------
-
-This License represents the complete agreement concerning the subject
-matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed only to the extent
-necessary to make it enforceable. Any law or regulation which provides
-that the language of a contract shall be construed against the drafter
-shall not be used to construe this License against a Contributor.
-
-10. Versions of the License
----------------------------
-
-10.1. New Versions
-
-Mozilla Foundation is the license steward. Except as provided in Section
-10.3, no one other than the license steward has the right to modify or
-publish new versions of this License. Each version will be given a
-distinguishing version number.
-
-10.2. Effect of New Versions
-
-You may distribute the Covered Software under the terms of the version
-of the License under which You originally received the Covered Software,
-or under the terms of any subsequent version published by the license
-steward.
-
-10.3. Modified Versions
-
-If you create software not governed by this License, and you want to
-create a new license for such software, you may create and use a
-modified version of this License if you rename the license and remove
-any references to the name of the license steward (except to note that
-such modified license differs from this License).
-
-10.4. Distributing Source Code Form that is Incompatible With Secondary
-Licenses
-
-If You choose to distribute Source Code Form that is Incompatible With
-Secondary Licenses under the terms of this version of the License, the
-notice described in Exhibit B of this License must be attached.
-
-Exhibit A - Source Code Form License Notice
--------------------------------------------
-
-  This Source Code Form is subject to the terms of the Mozilla Public
-  License, v. 2.0. If a copy of the MPL was not distributed with this
-  file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-If it is not possible or desirable to put the notice in a particular
-file, then You may include the notice in a location (such as a LICENSE
-file in a relevant directory) where a recipient would be likely to look
-for such a notice.
-
-You may add additional accurate notices of copyright ownership.
-
-Exhibit B - "Incompatible With Secondary Licenses" Notice
----------------------------------------------------------
-
-  This Source Code Form is "Incompatible With Secondary Licenses", as
-  defined by the Mozilla Public License, v. 2.0.
-
-----------------------------------------------------------------------
-Following applies to:
-./doc/UsingIntelMKL.dox
-./doc/UsingIntelMKL.dox
-./Eigen/src/Eigenvalues/ComplexSchur_MKL.h
-./Eigen/src/Eigenvalues/ComplexSchur_MKL.h
-./Eigen/src/Eigenvalues/SelfAdjointEigenSolver_MKL.h
-./Eigen/src/Eigenvalues/SelfAdjointEigenSolver_MKL.h
-./Eigen/src/Eigenvalues/RealSchur_MKL.h
-./Eigen/src/Eigenvalues/RealSchur_MKL.h
-./Eigen/src/LU/arch/Inverse_SSE.h
-./Eigen/src/LU/arch/Inverse_SSE.h
-./Eigen/src/LU/PartialPivLU_MKL.h
-./Eigen/src/LU/PartialPivLU_MKL.h
-./Eigen/src/QR/HouseholderQR_MKL.h
-./Eigen/src/QR/HouseholderQR_MKL.h
-./Eigen/src/QR/ColPivHouseholderQR_MKL.h
-./Eigen/src/QR/ColPivHouseholderQR_MKL.h
-./Eigen/src/SVD/JacobiSVD_MKL.h
-./Eigen/src/SVD/JacobiSVD_MKL.h
-./Eigen/src/PardisoSupport/PardisoSupport.h
-./Eigen/src/PardisoSupport/PardisoSupport.h
-./Eigen/src/Core/Assign_MKL.h
-./Eigen/src/Core/Assign_MKL.h
-./Eigen/src/Core/products/SelfadjointMatrixVector_MKL.h
-./Eigen/src/Core/products/SelfadjointMatrixVector_MKL.h
-./Eigen/src/Core/products/GeneralMatrixVector_MKL.h
-./Eigen/src/Core/products/GeneralMatrixVector_MKL.h
-./Eigen/src/Core/products/SelfadjointMatrixMatrix_MKL.h
-./Eigen/src/Core/products/SelfadjointMatrixMatrix_MKL.h
-./Eigen/src/Core/products/TriangularMatrixMatrix_MKL.h
-./Eigen/src/Core/products/TriangularMatrixMatrix_MKL.h
-./Eigen/src/Core/products/GeneralMatrixMatrix_MKL.h
-./Eigen/src/Core/products/GeneralMatrixMatrix_MKL.h
-./Eigen/src/Core/products/TriangularMatrixVector_MKL.h
-./Eigen/src/Core/products/TriangularMatrixVector_MKL.h
-./Eigen/src/Core/products/GeneralMatrixMatrixTriangular_MKL.h
-./Eigen/src/Core/products/GeneralMatrixMatrixTriangular_MKL.h
-./Eigen/src/Core/products/TriangularSolverMatrix_MKL.h
-./Eigen/src/Core/products/TriangularSolverMatrix_MKL.h
-./Eigen/src/Core/util/MKL_support.h
-./Eigen/src/Core/util/MKL_support.h
-./Eigen/src/Cholesky/LLT_MKL.h
-./Eigen/src/Cholesky/LLT_MKL.h
-
-/*
- Copyright (c) 2011, Intel Corporation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- * Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.  *
-   Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the
-   distribution.  * Neither the name of Intel Corporation nor the
-   names of its contributors may be used to endorse or promote
-   products derived from this software without specific prior written
-   permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-----------------------------------------------------------------------
-Following applies to:
-  everything under ./bench/btl
-
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds
-of works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal,
-family, or household purposes, or (2) anything designed or sold for
-incorporation into a dwelling.  In determining whether a product is a
-consumer product, doubtful cases shall be resolved in favor of
-coverage.  For a particular product received by a particular user,
-"normally used" refers to a typical or common use of that class of
-product, regardless of the status of the particular user or of the way
-in which the particular user actually uses, or expects or is expected
-to use, the product.  A product is a consumer product regardless of
-whether the product has substantial commercial, industrial or
-non-consumer uses, unless such uses represent the only significant
-mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to
-install and execute modified versions of a covered work in that User
-Product from a modified version of its Corresponding Source.  The
-information must suffice to ensure that the continued functioning of
-the modified object code is in no case prevented or interfered with
-solely because modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include
-a requirement to continue to provide support service, warranty, or
-updates for a work that has been modified or installed by the
-recipient, or for the User Product in which it has been modified or
-installed.  Access to a network may be denied when the modification
-itself materially and adversely affects the operation of the network
-or violates the rules and protocols for communication across the
-network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material
-you add to a covered work, you may (if authorized by the copyright
-holders of that material) supplement the terms of this License with
-terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions
-    of it) with contractual assumptions of liability to the recipient,
-    for any liability that these contractual assumptions directly
-    impose on those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement
-or otherwise) that contradict the conditions of this License, they do
-not excuse you from the conditions of this License.  If you cannot
-convey a covered work so as to satisfy simultaneously your obligations
-under this License and any other pertinent obligations, then as a
-consequence you may not convey it at all.  For example, if you agree
-to terms that obligate you to collect a royalty for further conveying
-from those to whom you convey the Program, the only way you could
-satisfy both those terms and this License would be to refrain entirely
-from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions
-of the GNU General Public License from time to time.  Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
-WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE
-DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
-CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES
-AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
-DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
-DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
-(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
-INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
-THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
-OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these
-terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it
-    does.>
-    Copyright (C) <year> <name of author>
-
-    This program is free software: you can redistribute it and/or
-    modify it under the terms of the GNU General Public License as
-    published by the Free Software Foundation, either version 3 of the
-    License, or (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see
-    <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program> Copyright (C) <year> <name of author> This program comes
-    with ABSOLUTELY NO WARRANTY; for details type `show w'.  This is
-    free software, and you are welcome to redistribute it under
-    certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the
-appropriate parts of the General Public License.  Of course, your
-program's commands might be different; for a GUI interface, you would
-use an "about box".
-
-  You should also get your employer (if you work as a programmer) or
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  For more information on this, and how to apply and follow
-the GNU GPL, see <http://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your
-program into proprietary programs.  If your program is a subroutine
-library, you may consider it more useful to permit linking proprietary
-applications with the library.  If this is what you want to do, use
-the GNU Lesser General Public License instead of this License.  But
-first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
-
-
-----------------------------------------------------------------------
-Following applies to:
-./test/metis_support.cpp
-./test/sparselu.cpp
-./unsupported/test/mpreal/mpreal.h
-./unsupported/Eigen/src/IterativeSolvers/IterationController.h
-./unsupported/Eigen/src/IterativeSolvers/ConstrainedConjGrad.h
-./unsupported/Eigen/src/Eigenvalues/ArpackSelfAdjointEigenSolver.h
-./Eigen/src/OrderingMethods/Amd.h
-./Eigen/src/SparseCholesky/SimplicialCholesky_impl.h
-
-                  GNU LESSER GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
-  This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
-  0. Additional Definitions. 
-
-  As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the
-GNU General Public License.
-
-  "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
-  An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
-  A "Combined Work" is a work produced by combining or linking an
-Application with the Library.  The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
-  The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
-  The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
-  1. Exception to Section 3 of the GNU GPL.
-
-  You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
-  2. Conveying Modified Versions.
-
-  If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
-   a) under this License, provided that you make a good faith effort to
-   ensure that, in the event an Application does not supply the
-   function or data, the facility still operates, and performs
-   whatever part of its purpose remains meaningful, or
-
-   b) under the GNU GPL, with none of the additional permissions of
-   this License applicable to that copy.
-
-  3. Object Code Incorporating Material from Library Header Files.
-
-  The object code form of an Application may incorporate material from
-a header file that is part of the Library.  You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
-   a) Give prominent notice with each copy of the object code that the
-   Library is used in it and that the Library and its use are
-   covered by this License.
-
-   b) Accompany the object code with a copy of the GNU GPL and this
-   license document.
-
-  4. Combined Works.
-
-  You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
-   a) Give prominent notice with each copy of the Combined Work that
-   the Library is used in it and that the Library and its use are
-   covered by this License.
-
-   b) Accompany the Combined Work with a copy of the GNU GPL and this
-   license document.
-
-   c) For a Combined Work that displays copyright notices during
-   execution, include the copyright notice for the Library among
-   these notices, as well as a reference directing the user to the
-   copies of the GNU GPL and this license document.
-
-   d) Do one of the following:
-
-       0) Convey the Minimal Corresponding Source under the terms of
-       this License, and the Corresponding Application Code in a form
-       suitable for, and under terms that permit, the user to
-       recombine or relink the Application with a modified version of
-       the Linked Version to produce a modified Combined Work, in the
-       manner specified by section 6 of the GNU GPL for conveying
-       Corresponding Source.
-
-       1) Use a suitable shared library mechanism for linking with the
-       Library.  A suitable mechanism is one that (a) uses at run time
-       a copy of the Library already present on the user's computer
-       system, and (b) will operate properly with a modified version
-       of the Library that is interface-compatible with the Linked
-       Version. 
-
-   e) Provide Installation Information, but only if you would otherwise
-   be required to provide such information under section 6 of the
-   GNU GPL, and only to the extent that such information is
-   necessary to install and execute a modified version of the
-   Combined Work produced by recombining or relinking the
-   Application with a modified version of the Linked Version. (If
-   you use option 4d0, the Installation Information must accompany
-   the Minimal Corresponding Source and Corresponding Application
-   Code. If you use option 4d1, you must provide the Installation
-   Information in the manner specified by section 6 of the GNU GPL
-   for conveying Corresponding Source.)
-
-  5. Combined Libraries.
-
-  You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
-   a) Accompany the combined library with a copy of the same work based
-   on the Library, uncombined with any other library facilities,
-   conveyed under the terms of this License.
-
-   b) Give prominent notice with the combined library that part of it
-   is a work based on the Library, and explaining where to find the
-   accompanying uncombined form of the same work.
-
-  6. Revised Versions of the GNU Lesser General Public License.
-
-  The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
-  Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
-  If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
-
-
-----------------------------------------------------------------------
-Following applies to:
-./unsupported/Eigen/src/LevenbergMarquardt/LevenbergMarquardt.h
-./unsupported/Eigen/src/LevenbergMarquardt/LMcovar.h
-./unsupported/Eigen/src/LevenbergMarquardt/LMonestep.h
-./unsupported/Eigen/src/LevenbergMarquardt/LMpar.h
-./unsupported/Eigen/src/LevenbergMarquardt/LMqrsolv.h
-
-Minpack Copyright Notice (1999) University of Chicago.  All rights
-reserved
-
-Redistribution and use in source and binary forms, with or
-without modification, are permitted provided that the
-following conditions are met:
-
-1. Redistributions of source code must retain the above
-copyright notice, this list of conditions and the following
-disclaimer.
-
-2. Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following
-disclaimer in the documentation and/or other materials
-provided with the distribution.
-
-3. The end-user documentation included with the
-redistribution, if any, must include the following
-acknowledgment:
-
-   "This product includes software developed by the
-   University of Chicago, as Operator of Argonne National
-   Laboratory.
-
-Alternately, this acknowledgment may appear in the software
-itself, if and wherever such third-party acknowledgments
-normally appear.
-
-4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS"
-WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE
-UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND
-THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE
-OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY
-OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR
-USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF
-THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4)
-DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION
-UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL
-BE CORRECTED.
-
-5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT
-HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF
-ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT,
-INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF
-ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF
-PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER
-SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT
-(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE,
-EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE
-POSSIBILITY OF SUCH LOSS OR DAMAGES.
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/Core b/third_party/eigen3/unsupported/Eigen/CXX11/Core
deleted file mode 100644
index 1b36907..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/Core
+++ /dev/null
@@ -1,46 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2013 Christian Seiler <christian@iwakd.de>
-// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#ifndef EIGEN_CXX11_CORE_MODULE
-#define EIGEN_CXX11_CORE_MODULE
-
-#include <Eigen/Core>
-
-#include <Eigen/src/Core/util/DisableStupidWarnings.h>
-
-/** \defgroup CXX11_Core_Module C++11 Core Module
-  *
-  * This module provides common core features for all modules that
-  * explicitly depend on C++11. Currently, this is only the Tensor
-  * module. Note that at this stage, you should not need to include
-  * this module directly.
-  *
-  * It also provides a limited fallback for compilers that don't support
-  * CXX11 yet, such as nvcc.
-  *
-  * \code
-  * #include <Eigen/CXX11/Core>
-  * \endcode
-  */
-
-// Only a subset of cxx11 is allowed at Google, so we default to emulate the
-// cxx11 functionality that we need.
-#include "src/Core/util/FixedSizeVector.h"
-#if 1
-#include <vector>
-#include "src/Core/util/EmulateCXX11Meta.h"
-#else
-#include "src/Core/util/CXX11Workarounds.h"
-#include "src/Core/util/CXX11Meta.h"
-#endif
-#include <Eigen/src/Core/util/ReenableStupidWarnings.h>
-
-#endif // EIGEN_CXX11_CORE_MODULE
-
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/FixedPoint b/third_party/eigen3/unsupported/Eigen/CXX11/FixedPoint
deleted file mode 100644
index eb604d3..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/FixedPoint
+++ /dev/null
@@ -1,55 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#ifndef EIGEN_CXX11_FIXED_POINT_MODULE
-#define EIGEN_CXX11_FIXED_POINT_MODULE
-
-#include <Eigen/Core>
-#include <stdint.h>
-
-/** \defgroup CXX11_FixedPoint_Module Fixed Point Module
-  *
-  * This module provides common core features for all modules that
-  * explicitly depend on C++11. Currently, this is only the Tensor
-  * module. Note that at this stage, you should not need to include
-  * this module directly.
-  *
-  * It also provides a limited fallback for compilers that don't support
-  * CXX11 yet, such as nvcc.
-  *
-  * \code
-  * #include <Eigen/CXX11/FixedPoint>
-  * \endcode
-  */
-
-#include "src/FixedPoint/FixedPointTypes.h"
-
-// Use optimized implementations whenever available
-#if defined (EIGEN_VECTORIZE_AVX512DQ) || defined (EIGEN_VECTORIZE_AVX512BW)
-#include "src/FixedPoint/PacketMathAVX512.h"
-#include "src/FixedPoint/TypeCastingAVX512.h"
-
-#elif defined EIGEN_VECTORIZE_AVX2
-#define EIGEN_USE_OPTIMIZED_INT8_UINT8_MAT_MAT_PRODUCT
-#define EIGEN_USE_OPTIMIZED_INT16_INT16_MAT_MAT_PRODUCT
-#include "src/FixedPoint/PacketMathAVX2.h"
-#include "src/FixedPoint/MatMatProductAVX2.h"
-#include "src/FixedPoint/TypeCastingAVX2.h"
-
-#elif defined EIGEN_VECTORIZE_NEON
-#define EIGEN_USE_OPTIMIZED_INT8_UINT8_MAT_MAT_PRODUCT
-#include "src/FixedPoint/MatMatProductNEON.h"
-#endif
-
-// Use the default implementation when no optimized code is available
-#include "src/FixedPoint/MatMatProduct.h"
-#include "src/FixedPoint/MatVecProduct.h"
-
-
-#endif // EIGEN_CXX11_FIXED_POINT_MODULE
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/NeuralNetworks b/third_party/eigen3/unsupported/Eigen/CXX11/NeuralNetworks
deleted file mode 100644
index 7741b68..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/NeuralNetworks
+++ /dev/null
@@ -1,35 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#ifndef EIGEN_CXX11_NEURAL_NETWORKS_MODULE
-#define EIGEN_CXX11_NEURAL_NETWORKS_MODULE
-
-#include "unsupported/Eigen/CXX11/Tensor"
-
-/** \defgroup CXX11_NeuralNetworks_Module Neural Networks Module
-  *
-  * This module provides an efficient implementation of the common primitives
-  * used by neural networks.
-  * The primitives are  built on top of the tensor library.
-  *
-  * \code
-  * #include <Eigen/CXX11/NeuralNetworks>
-  * \endcode
-  */
-
-#include "unsupported/Eigen/CXX11/src/NeuralNetworks/Activations.h"
-#include "unsupported/Eigen/CXX11/src/NeuralNetworks/Attention.h"
-#include "unsupported/Eigen/CXX11/src/NeuralNetworks/Pooling.h"
-#include "unsupported/Eigen/CXX11/src/NeuralNetworks/SoftMax.h"
-#include "unsupported/Eigen/CXX11/src/NeuralNetworks/BackwardCuboidConvolutions.h"
-#include "unsupported/Eigen/CXX11/src/NeuralNetworks/CuboidConvolution.h"
-#include "unsupported/Eigen/CXX11/src/NeuralNetworks/BackwardSpatialConvolutions.h"
-#include "unsupported/Eigen/CXX11/src/NeuralNetworks/SpatialConvolutions.h"
-
-#endif  // EIGEN_CXX11_NEURAL_NETWORKS_MODULE
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/Tensor b/third_party/eigen3/unsupported/Eigen/CXX11/Tensor
deleted file mode 100644
index 861a87b..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/Tensor
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "unsupported/Eigen/CXX11/Tensor"
-
-#ifdef _WIN32
-#ifndef SLEEP_FUNC_HEADER_GUARD
-#define SLEEP_FUNC_HEADER_GUARD
-inline void sleep(unsigned int seconds) { Sleep(1000*seconds); }
-#endif
-
-// On Windows, Eigen will include Windows.h, which defines various
-// macros that conflict with TensorFlow symbols. Undefine them here to
-// prevent clashes.
-#undef DeleteFile
-#undef ERROR
-#undef LoadLibrary
-#endif  // _WIN32
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/ThreadPool b/third_party/eigen3/unsupported/Eigen/CXX11/ThreadPool
deleted file mode 100644
index d2639af..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/ThreadPool
+++ /dev/null
@@ -1 +0,0 @@
-#include "unsupported/Eigen/CXX11/ThreadPool"
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/FixedPointTypes.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/FixedPointTypes.h
deleted file mode 100644
index 6b625ab..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/FixedPointTypes.h
+++ /dev/null
@@ -1,342 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#ifndef EIGEN_CXX11_FIXED_POINT_TYPES_H
-#define EIGEN_CXX11_FIXED_POINT_TYPES_H
-
-#include <cmath>
-#include <iostream>
-
-namespace Eigen {
-
-// The mantissa part of the fixed point representation. See
-// go/tensorfixedpoint for details
-struct QInt8;
-struct QUInt8;
-struct QInt16;
-struct QUInt16;
-struct QInt32;
-
-template <>
-struct NumTraits<QInt8> : GenericNumTraits<int8_t> {};
-template <>
-struct NumTraits<QUInt8> : GenericNumTraits<uint8_t> {};
-template <>
-struct NumTraits<QInt16> : GenericNumTraits<int16_t> {};
-template <>
-struct NumTraits<QUInt16> : GenericNumTraits<uint16_t> {};
-template <>
-struct NumTraits<QInt32> : GenericNumTraits<int32_t> {};
-
-namespace internal {
-template <>
-struct scalar_product_traits<QInt32, double> {
-  enum {
-    // Cost = NumTraits<T>::MulCost,
-    Defined = 1
-  };
-  typedef QInt32 ReturnType;
-};
-}
-
-// Wrap the 8bit int into a QInt8 struct instead of using a typedef to prevent
-// the compiler from silently type cast the mantissa into a bigger or a smaller
-// representation.
-struct QInt8 {
-  QInt8() {}
-  QInt8(const int8_t v) : value(v) {}
-  QInt8(const QInt32 v);
-
-  operator int() const { return static_cast<int>(value); }
-
-  int8_t value;
-};
-
-struct QUInt8 {
-  QUInt8() {}
-  QUInt8(const uint8_t v) : value(v) {}
-  QUInt8(const QInt32 v);
-
-  operator int() const { return static_cast<int>(value); }
-
-  uint8_t value;
-};
-
-struct QInt16 {
-  QInt16() {}
-  QInt16(const int16_t v) : value(v) {}
-  QInt16(const QInt32 v);
-  operator int() const { return static_cast<int>(value); }
-
-  int16_t value;
-};
-
-struct QUInt16 {
-  QUInt16() {}
-  QUInt16(const uint16_t v) : value(v) {}
-  QUInt16(const QInt32 v);
-  operator int() const { return static_cast<int>(value); }
-
-  uint16_t value;
-};
-
-struct QInt32 {
-  QInt32() {}
-  QInt32(const int8_t v) : value(v) {}
-  QInt32(const int32_t v) : value(v) {}
-  QInt32(const uint32_t v) : value(static_cast<int32_t>(v)) {}
-  QInt32(const QInt8 v) : value(v.value) {}
-  QInt32(const float v) : value(static_cast<int32_t>(lrint(v))) {}
-#ifdef EIGEN_MAKING_DOCS
-  // Workaround to fix build on PPC.
-  QInt32(unsigned long v) : value(v) {}
-#endif
-
-  operator float() const { return static_cast<float>(value); }
-
-  int32_t value;
-};
-
-EIGEN_STRONG_INLINE QInt8::QInt8(const QInt32 v)
-    : value(v.value > 127 ? 127 : (v.value < -128 ? -128 : v.value)) {}
-EIGEN_STRONG_INLINE QUInt8::QUInt8(const QInt32 v)
-    : value(v.value > 255 ? 255 : (v.value < 0 ? 0 : v.value)) {}
-EIGEN_STRONG_INLINE QInt16::QInt16(const QInt32 v)
-    : value(v.value > 32767 ? 32767 : (v.value < -32768 ? -32768 : v.value)) {}
-EIGEN_STRONG_INLINE QUInt16::QUInt16(const QInt32 v)
-    : value(v.value > 65535 ? 65535 : (v.value < 0 ? 0 : v.value)) {}
-
-// Basic widening 8-bit operations: This will be vectorized in future CLs.
-EIGEN_STRONG_INLINE QInt32 operator*(const QInt8 a, const QInt8 b) {
-  return QInt32(static_cast<int32_t>(a.value) * static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator*(const QInt8 a, const QUInt8 b) {
-  return QInt32(static_cast<int32_t>(a.value) * static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator+(const QInt8 a, const QInt8 b) {
-  return QInt32(static_cast<int32_t>(a.value) + static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator-(const QInt8 a, const QInt8 b) {
-  return QInt32(static_cast<int32_t>(a.value) - static_cast<int32_t>(b.value));
-}
-
-// Basic widening 16-bit operations: This will be vectorized in future CLs.
-EIGEN_STRONG_INLINE QInt32 operator*(const QInt16 a, const QInt16 b) {
-  return QInt32(static_cast<int32_t>(a.value) * static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator*(const QInt16 a, const QUInt16 b) {
-  return QInt32(static_cast<int32_t>(a.value) * static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator+(const QInt16 a, const QInt16 b) {
-  return QInt32(static_cast<int32_t>(a.value) + static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator-(const QInt16 a, const QInt16 b) {
-  return QInt32(static_cast<int32_t>(a.value) - static_cast<int32_t>(b.value));
-}
-
-// Mixed QInt32 op QInt8 operations. This will be vectorized in future CLs.
-EIGEN_STRONG_INLINE QInt32 operator+(const QInt32 a, const QInt8 b) {
-  return QInt32(a.value + static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator+(const QInt8 a, const QInt32 b) {
-  return QInt32(static_cast<int32_t>(a.value) + b.value);
-}
-EIGEN_STRONG_INLINE QInt32 operator-(const QInt32 a, const QInt8 b) {
-  return QInt32(a.value - static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator-(const QInt8 a, const QInt32 b) {
-  return QInt32(static_cast<int32_t>(a.value) - b.value);
-}
-EIGEN_STRONG_INLINE QInt32 operator*(const QInt32 a, const QInt8 b) {
-  return QInt32(a.value * static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator*(const QInt8 a, const QInt32 b) {
-  return QInt32(static_cast<int32_t>(a.value) * b.value);
-}
-
-// Mixed QInt32 op QInt16 operations. This will be vectorized in future CLs.
-EIGEN_STRONG_INLINE QInt32 operator+(const QInt32 a, const QInt16 b) {
-  return QInt32(a.value + static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator+(const QInt16 a, const QInt32 b) {
-  return QInt32(static_cast<int32_t>(a.value) + b.value);
-}
-EIGEN_STRONG_INLINE QInt32 operator-(const QInt32 a, const QInt16 b) {
-  return QInt32(a.value - static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator-(const QInt16 a, const QInt32 b) {
-  return QInt32(static_cast<int32_t>(a.value) - b.value);
-}
-EIGEN_STRONG_INLINE QInt32 operator*(const QInt32 a, const QInt16 b) {
-  return QInt32(a.value * static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator*(const QInt16 a, const QInt32 b) {
-  return QInt32(static_cast<int32_t>(a.value) * b.value);
-}
-
-// Mixed QInt32 op QUInt8 operations. This will be vectorized in future CLs.
-EIGEN_STRONG_INLINE QInt32 operator+(const QInt32 a, const QUInt8 b) {
-  return QInt32(a.value + static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator+(const QUInt8 a, const QInt32 b) {
-  return QInt32(static_cast<int32_t>(a.value) + b.value);
-}
-EIGEN_STRONG_INLINE QInt32 operator-(const QInt32 a, const QUInt8 b) {
-  return QInt32(a.value - static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator-(const QUInt8 a, const QInt32 b) {
-  return QInt32(static_cast<int32_t>(a.value) - b.value);
-}
-EIGEN_STRONG_INLINE QInt32 operator*(const QInt32 a, const QUInt8 b) {
-  return QInt32(a.value * static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator*(const QUInt8 a, const QInt32 b) {
-  return QInt32(static_cast<int32_t>(a.value) * b.value);
-}
-
-// Mixed QInt32 op QUInt16 operations. This will be vectorized in future CLs.
-EIGEN_STRONG_INLINE QInt32 operator+(const QInt32 a, const QUInt16 b) {
-  return QInt32(a.value + static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator+(const QUInt16 a, const QInt32 b) {
-  return QInt32(static_cast<int32_t>(a.value) + b.value);
-}
-EIGEN_STRONG_INLINE QInt32 operator-(const QInt32 a, const QUInt16 b) {
-  return QInt32(a.value - static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator-(const QUInt16 a, const QInt32 b) {
-  return QInt32(static_cast<int32_t>(a.value) - b.value);
-}
-EIGEN_STRONG_INLINE QInt32 operator*(const QInt32 a, const QUInt16 b) {
-  return QInt32(a.value * static_cast<int32_t>(b.value));
-}
-EIGEN_STRONG_INLINE QInt32 operator*(const QUInt16 a, const QInt32 b) {
-  return QInt32(static_cast<int32_t>(a.value) * b.value);
-}
-
-// Basic arithmetic operations on QInt32, which behaves like a int32_t.
-EIGEN_STRONG_INLINE QInt32 operator+(const QInt32 a, const QInt32 b) {
-  return a.value + b.value;
-}
-EIGEN_STRONG_INLINE QInt32 operator-(const QInt32 a, const QInt32 b) {
-  return a.value - b.value;
-}
-EIGEN_STRONG_INLINE QInt32 operator*(const QInt32 a, const QInt32 b) {
-  return a.value * b.value;
-}
-EIGEN_STRONG_INLINE QInt32 operator/(const QInt32 a, const QInt32 b) {
-  return a.value / b.value;
-}
-EIGEN_STRONG_INLINE QInt32& operator+=(QInt32& a, const QInt32 b) {
-  a.value += b.value;
-  return a;
-}
-EIGEN_STRONG_INLINE QInt32& operator-=(QInt32& a, const QInt32 b) {
-  a.value -= b.value;
-  return a;
-}
-EIGEN_STRONG_INLINE QInt32& operator*=(QInt32& a, const QInt32 b) {
-  a.value *= b.value;
-  return a;
-}
-EIGEN_STRONG_INLINE QInt32& operator/=(QInt32& a, const QInt32 b) {
-  a.value /= b.value;
-  return a;
-}
-EIGEN_STRONG_INLINE QInt32 operator-(const QInt32 a) {
-  return -a.value;
-}
-
-// Scaling QInt32 by double. We do the arithmetic in double because
-// float only has 23 bits of mantissa, so casting QInt32 to float might reduce
-// accuracy by discarding up to 7 (least significant) bits.
-EIGEN_STRONG_INLINE QInt32 operator*(const QInt32 a, const double b) {
-  return static_cast<int32_t>(lrint(static_cast<double>(a.value) * b));
-}
-EIGEN_STRONG_INLINE QInt32 operator*(const double a, const QInt32 b) {
-  return static_cast<int32_t>(lrint(a * static_cast<double>(b.value)));
-}
-EIGEN_STRONG_INLINE QInt32& operator*=(QInt32& a, const double b) {
-  a.value = static_cast<int32_t>(lrint(static_cast<double>(a.value) * b));
-  return a;
-}
-
-// Comparisons
-EIGEN_STRONG_INLINE bool operator==(const QInt8 a, const QInt8 b) {
-  return a.value == b.value;
-}
-EIGEN_STRONG_INLINE bool operator==(const QUInt8 a, const QUInt8 b) {
-  return a.value == b.value;
-}
-EIGEN_STRONG_INLINE bool operator==(const QInt16 a, const QInt16 b) {
-  return a.value == b.value;
-}
-EIGEN_STRONG_INLINE bool operator==(const QUInt16 a, const QUInt16 b) {
-  return a.value == b.value;
-}
-EIGEN_STRONG_INLINE bool operator==(const QInt32 a, const QInt32 b) {
-  return a.value == b.value;
-}
-
-EIGEN_STRONG_INLINE bool operator<(const QInt8 a, const QInt8 b) {
-  return a.value < b.value;
-}
-EIGEN_STRONG_INLINE bool operator<(const QUInt8 a, const QUInt8 b) {
-  return a.value < b.value;
-}
-EIGEN_STRONG_INLINE bool operator<(const QInt16 a, const QInt16 b) {
-  return a.value < b.value;
-}
-EIGEN_STRONG_INLINE bool operator<(const QUInt16 a, const QUInt16 b) {
-  return a.value < b.value;
-}
-EIGEN_STRONG_INLINE bool operator<(const QInt32 a, const QInt32 b) {
-  return a.value < b.value;
-}
-
-EIGEN_STRONG_INLINE bool operator>(const QInt8 a, const QInt8 b) {
-  return a.value > b.value;
-}
-EIGEN_STRONG_INLINE bool operator>(const QUInt8 a, const QUInt8 b) {
-  return a.value > b.value;
-}
-EIGEN_STRONG_INLINE bool operator>(const QInt16 a, const QInt16 b) {
-  return a.value > b.value;
-}
-EIGEN_STRONG_INLINE bool operator>(const QUInt16 a, const QUInt16 b) {
-  return a.value > b.value;
-}
-EIGEN_STRONG_INLINE bool operator>(const QInt32 a, const QInt32 b) {
-  return a.value > b.value;
-}
-
-EIGEN_STRONG_INLINE std::ostream& operator<<(std::ostream& os, QInt8 a) {
-  os << static_cast<int>(a.value);
-  return os;
-}
-EIGEN_STRONG_INLINE std::ostream& operator<<(std::ostream& os, QUInt8 a) {
-  os << static_cast<int>(a.value);
-  return os;
-}
-EIGEN_STRONG_INLINE std::ostream& operator<<(std::ostream& os, QInt16 a) {
-  os << static_cast<int>(a.value);
-  return os;
-}
-EIGEN_STRONG_INLINE std::ostream& operator<<(std::ostream& os, QUInt16 a) {
-  os << static_cast<int>(a.value);
-  return os;
-}
-EIGEN_STRONG_INLINE std::ostream& operator<<(std::ostream& os, QInt32 a) {
-  os << a.value;
-  return os;
-}
-
-}  // namespace Eigen
-
-#endif  // EIGEN_CXX11_FIXED_POINT_TYPES_H
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProduct.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProduct.h
deleted file mode 100644
index 4d0dca0..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProduct.h
+++ /dev/null
@@ -1,255 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#ifndef EIGEN_CXX11_FIXED_POINT_MAT_MAT_PRODUCT_H
-#define EIGEN_CXX11_FIXED_POINT_MAT_MAT_PRODUCT_H
-
-
-namespace Eigen {
-namespace internal {
-
-// Accumulate the product of 2 QInt8 inputs on 32 bits to prevent
-// overflows
-template<> struct scalar_product_traits<QInt8, QInt8>
-{
-  enum {
-    Defined = 1
-  };
-  typedef QInt32 ReturnType;
-};
-
-// Accumulate the product of QInt8 inputs with QUint8 inputs on 32 bits
-// to prevent overflows
-template<> struct scalar_product_traits<QInt8, QUInt8>
-{
-  enum {
-    Defined = 1
-  };
-  typedef QInt32 ReturnType;
-};
-
-// Description of the product implementation. It's pretty simple now since
-// nothing is vectorized yet.
-// This definition tackle the case where both lhs and rhs are encoded using
-// signed 8bit integers
-#ifndef EIGEN_USE_OPTIMIZED_INT8_INT8_MAT_MAT_PRODUCT
-
-template<bool _ConjLhs, bool _ConjRhs>
-class gebp_traits<QInt8, QInt8, _ConjLhs, _ConjRhs>
-{
-public:
-  typedef QInt8 LhsScalar;
-  typedef QInt8 RhsScalar;
-  typedef QInt32 ResScalar;
-
-  enum {
-    // register block size along the M and N directions
-    // One for the current implementation
-    nr = 1,
-    mr = 1,
-    // Progress made at each iteration of the product loop
-    // also 1 for the current implementation
-    LhsProgress = 1,
-    RhsProgress = 1
-  };
-};
-
-// The signed 8bit Mat-Mat product itself.
-template<typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs>
-struct gebp_kernel<QInt8, QInt8, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs>
-{
-  EIGEN_DONT_INLINE
-  void operator()(const DataMapper& res, const QInt8* blockA, const QInt8* blockB,
-                  Index rows, Index depth, Index cols, QInt32 alpha,
-                  Index strideA=-1, Index strideB=-1, Index offsetA=0, Index offsetB=0);
-};
-
-template<typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs>
-EIGEN_DONT_INLINE
-void gebp_kernel<QInt8, QInt8, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs>
-::operator()(const DataMapper& res, const QInt8* blockA, const QInt8* blockB,
-             Index rows, Index depth, Index cols, QInt32 alpha,
-             Index strideA, Index strideB, Index offsetA, Index offsetB)
-{
-  EIGEN_STATIC_ASSERT(!ConjugateLhs, YOU_MADE_A_PROGRAMMING_MISTAKE);
-  EIGEN_STATIC_ASSERT(!ConjugateRhs, YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-  eigen_assert(alpha.value == 1);
-  eigen_assert(strideA == -1);
-  eigen_assert(strideB == -1);
-  eigen_assert(offsetA == 0);
-  eigen_assert(offsetB == 0);
-
-  eigen_assert(rows > 0);
-  eigen_assert(cols > 0);
-  eigen_assert(depth > 0);
-  eigen_assert(blockA);
-  eigen_assert(blockB);
-
-  for (Index j = 0; j < cols; ++j) {
-    Index startB = j * depth;
-
-    for (Index i = 0; i < rows; ++i) {
-      Index startA = i * depth;
-
-      for (Index k = 0; k < depth; ++k) {
-        res(i, j) += blockA[startA + k] * blockB[startB + k];
-      }
-    }
-  }
-}
-#endif
-
-
-// This definition tackle the case where the lhs is encoded using signed 8bit
-// integers and the rhs using unsigned 8bit integers.
-#ifndef EIGEN_USE_OPTIMIZED_INT8_UINT8_MAT_MAT_PRODUCT
-template<bool _ConjLhs, bool _ConjRhs>
-class gebp_traits<QInt8, QUInt8, _ConjLhs, _ConjRhs>
-{
-public:
-  typedef QInt8 LhsScalar;
-  typedef QUInt8 RhsScalar;
-  typedef QInt32 ResScalar;
-
-  enum {
-    // register block size along the M and N directions
-    // One for the current implementation
-    nr = 1,
-    mr = 1,
-    // Progress made at each iteration of the product loop
-    // also 1 for the current implementation
-    LhsProgress = 1,
-    RhsProgress = 1
-  };
-};
-
-// Mat-Mat product of a signed 8bit lhs with an unsigned 8bit rhs
-template<typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs>
-struct gebp_kernel<QInt8, QUInt8, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs>
-{
-  EIGEN_DONT_INLINE
-  void operator()(const DataMapper& res, const QInt8* blockA, const QUInt8* blockB,
-                  Index rows, Index depth, Index cols, QInt32 alpha,
-                  Index strideA=-1, Index strideB=-1, Index offsetA=0, Index offsetB=0);
-};
-
-template<typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs>
-EIGEN_DONT_INLINE
-void gebp_kernel<QInt8, QUInt8, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs>
-::operator()(const DataMapper& res, const QInt8* blockA, const QUInt8* blockB,
-             Index rows, Index depth, Index cols, QInt32 alpha,
-             Index strideA, Index strideB, Index offsetA, Index offsetB)
-{
-  EIGEN_STATIC_ASSERT(!ConjugateLhs, YOU_MADE_A_PROGRAMMING_MISTAKE);
-  EIGEN_STATIC_ASSERT(!ConjugateRhs, YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-  eigen_assert(alpha.value == 1);
-  eigen_assert(strideA == -1);
-  eigen_assert(strideB == -1);
-  eigen_assert(offsetA == 0);
-  eigen_assert(offsetB == 0);
-
-  eigen_assert(rows > 0);
-  eigen_assert(cols > 0);
-  eigen_assert(depth > 0);
-  eigen_assert(blockA);
-  eigen_assert(blockB);
-
-  for (Index j = 0; j < cols; ++j) {
-    Index startB = j * depth;
-
-    for (Index i = 0; i < rows; ++i) {
-      Index startA = i * depth;
-
-      for (Index k = 0; k < depth; ++k) {
-        res(i, j) += blockA[startA + k] * blockB[startB + k];
-      }
-    }
-  }
-}
-#endif
-
-
-// This definition tackle the case where the khs is encoded using unsigned 8bit
-// integers and the rhs using signed 8bit integers.
-#ifndef EIGEN_USE_OPTIMIZED_UINT8_INT8_MAT_MAT_PRODUCT
-template<bool _ConjLhs, bool _ConjRhs>
-class gebp_traits<QUInt8, QInt8, _ConjLhs, _ConjRhs>
-{
-public:
-  typedef QUInt8 LhsScalar;
-  typedef QInt8 RhsScalar;
-  typedef QInt32 ResScalar;
-
-  enum {
-    // register block size along the M and N directions
-    // One for the current implementation
-    nr = 1,
-    mr = 1,
-    // Progress made at each iteration of the product loop
-    // also 1 for the current implementation
-    LhsProgress = 1,
-    RhsProgress = 1
-  };
-};
-
-
-// Mat-Mat product of an unsigned 8bit lhs with a signed 8bit rhs
-template<typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs>
-struct gebp_kernel<QUInt8, QInt8, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs>
-{
-  EIGEN_DONT_INLINE
-  void operator()(const DataMapper& res, const QUInt8* blockA, const QInt8* blockB,
-                  Index rows, Index depth, Index cols, QInt32 alpha,
-                  Index strideA=-1, Index strideB=-1, Index offsetA=0, Index offsetB=0);
-};
-
-template<typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs>
-EIGEN_DONT_INLINE
-void gebp_kernel<QUInt8, QInt8, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs>
-::operator()(const DataMapper& res, const QUInt8* blockA, const QInt8* blockB,
-             Index rows, Index depth, Index cols, QInt32 alpha,
-             Index strideA, Index strideB, Index offsetA, Index offsetB)
-{
-  EIGEN_STATIC_ASSERT(!ConjugateLhs, YOU_MADE_A_PROGRAMMING_MISTAKE);
-  EIGEN_STATIC_ASSERT(!ConjugateRhs, YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-  eigen_assert(alpha.value == 1);
-  eigen_assert(strideA == -1);
-  eigen_assert(strideB == -1);
-  eigen_assert(offsetA == 0);
-  eigen_assert(offsetB == 0);
-
-  eigen_assert(rows > 0);
-  eigen_assert(cols > 0);
-  eigen_assert(depth > 0);
-  eigen_assert(blockA);
-  eigen_assert(blockB);
-
-  for (Index j = 0; j < cols; ++j) {
-    Index startB = j * depth;
-
-    for (Index i = 0; i < rows; ++i) {
-      Index startA = i * depth;
-
-      for (Index k = 0; k < depth; ++k) {
-        res(i, j) += blockA[startA + k] * blockB[startB + k];
-      }
-    }
-  }
-}
-#endif
-
-}  // namespace internal
-}  // namespace Eigen
-
-
-
-#endif  // EIGEN_CXX11_FIXED_POINT_MAT_MAT_PRODUCT_H
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h
deleted file mode 100644
index 6b4b0ed..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h
+++ /dev/null
@@ -1,1754 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>
-// Copyright (C) 2015 Matthew Sarett <msarett@google.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#ifndef EIGEN_CXX11_FIXED_POINT_MAT_MAT_PRODUCT_AVX2_H
-#define EIGEN_CXX11_FIXED_POINT_MAT_MAT_PRODUCT_AVX2_H
-
-namespace Eigen {
-namespace internal {
-
-// AVX2 optimized implementation of Mat-Mat product.
-// LHS is encoded using signed 8-bit integers.
-// RHS is encoded using unsigned 8-bit integers.
-#ifdef EIGEN_USE_OPTIMIZED_INT8_UINT8_MAT_MAT_PRODUCT
-
-// Define quantized traits
-template<bool _ConjLhs, bool _ConjRhs>
-class gebp_traits<QInt8, QUInt8, _ConjLhs, _ConjRhs>
-{
-public:
-  typedef QInt8 LhsScalar;
-  typedef QUInt8 RhsScalar;
-  typedef QInt32 ResScalar;
-
-  enum {
-    // Define register blocking scheme.
-    nr = 32,
-    mr = 32,
-    kr = 8,
-    // Ignore progress tracking per loop iteration.
-    LhsProgress = -1,
-    RhsProgress = -1
-  };
-};
-
-// Specialized blocking for quantized implementations.
-// Used by TensorContractionThreadPool, inputs must have dimensions that are
-// multiples of 32.
-template<typename Index,
-         typename LeftTensor,
-         typename left_nocontract_t, typename left_contract_t,
-         bool left_inner_dim_contiguous, bool left_inner_dim_reordered, int LeftAlignment,
-         typename RightTensor,
-         typename right_nocontract_t, typename right_contract_t,
-         bool right_inner_dim_contiguous, bool right_inner_dim_reordered, int RightAlignment, int ShardingType>
-class TensorContractionBlocking<TensorContractionInputMapper<QInt8, Index, Lhs, LeftTensor, left_nocontract_t, left_contract_t, 32, left_inner_dim_contiguous, left_inner_dim_reordered, LeftAlignment>, TensorContractionInputMapper<QUInt8, Index, Rhs, RightTensor, right_nocontract_t, right_contract_t, 32, right_inner_dim_contiguous, right_inner_dim_reordered, RightAlignment>, Index, ShardingType> {
- public:
-
-  typedef QInt8  LhsScalar;
-  typedef QUInt8 RhsScalar;
-
-  TensorContractionBlocking(Index k, Index m, Index n, Index num_threads = 1) :
-      kc_(k), mc_(m), nc_(n)
-  {
-    eigen_assert(m % 32 == 0);
-    eigen_assert(k % 32 == 0);
-    if (!k || !m || !n) {
-      return;
-    }
-
-    if (ShardingType == ShardByCol) {
-      eigen_assert(n % 32 == 0);
-      nc_ = (((n / num_threads) + 31) / 32) * 32;
-    }
-    else {
-      eigen_assert(n % 32 == 0 || n == 1);
-      // Special case to avoid breaking the unimplemented matrix-vector case
-      if (n == 1) {
-        nc_ = 32;
-      }
-      mc_ = (((m / num_threads) + 31) / 32) * 32;
-    }
-  }
-
-  EIGEN_ALWAYS_INLINE Index kc() const { return kc_; }
-  EIGEN_ALWAYS_INLINE Index mc() const { return mc_; }
-  EIGEN_ALWAYS_INLINE Index nc() const { return nc_; }
-
- private:
-  Index kc_;
-  Index mc_;
-  Index nc_;
-};
-
-// Specialized blocking for quantized implementations.
-// Used by TensorContraction and GeneralMatrixMatrix, inputs are padded to
-// multiples of 32.
-template <int MaxRows, int MaxCols, int MaxDepth, int KcFactor>
-class gemm_blocking_space<ColMajor, QInt8, QInt8, MaxRows, MaxCols, MaxDepth,
-                          KcFactor, false>
-    : public level3_blocking<QInt8, QInt8> {
-  DenseIndex m_sizeA;
-  DenseIndex m_sizeB;
-
- public:
-  gemm_blocking_space(DenseIndex rows, DenseIndex cols, DenseIndex depth,
-                      DenseIndex /*num_threads*/, bool /*l3_blocking*/) {
-    this->m_mc = ((rows + 31) / 32) * 32;
-    this->m_nc = ((cols + 31) / 32) * 32;
-    this->m_kc = ((depth + 31) / 32) * 32;
-    m_sizeA = this->m_mc * this->m_kc;
-    m_sizeB = this->m_kc * this->m_nc;
-  }
-  void allocateA() {
-    if (this->m_blockA == 0) this->m_blockA = aligned_new<QInt8>(m_sizeA);
-  }
-  void allocateB() {
-    if (this->m_blockB == 0) this->m_blockB = aligned_new<QInt8>(m_sizeB);
-  }
-  void allocateAll() {
-    allocateA();
-    allocateB();
-  }
-  ~gemm_blocking_space() {
-    aligned_delete(this->m_blockA, m_sizeA);
-    aligned_delete(this->m_blockB, m_sizeB);
-  }
-};
-
-
-template <int MaxRows, int MaxCols, int MaxDepth, int KcFactor>
-class gemm_blocking_space<ColMajor, QInt8, QUInt8, MaxRows, MaxCols, MaxDepth,
-                          KcFactor, false>
-    : public level3_blocking<QInt8, QUInt8> {
-  DenseIndex m_sizeA;
-  DenseIndex m_sizeB;
-
- public:
-  gemm_blocking_space(DenseIndex rows, DenseIndex cols, DenseIndex depth,
-                      DenseIndex /*num_threads*/, bool /*l3_blocking*/) {
-    this->m_mc = ((rows + 31) / 32) * 32;
-    this->m_nc = ((cols + 31) / 32) * 32;
-    this->m_kc = ((depth + 31) / 32) * 32;
-    m_sizeA = this->m_mc * this->m_kc;
-    m_sizeB = this->m_kc * this->m_nc;
-  }
-  void allocateA() {
-    if (this->m_blockA == 0) this->m_blockA = aligned_new<QInt8>(m_sizeA);
-  }
-  void allocateB() {
-    if (this->m_blockB == 0) this->m_blockB = aligned_new<QUInt8>(m_sizeB);
-  }
-  void allocateAll() {
-    allocateA();
-    allocateB();
-  }
-  ~gemm_blocking_space() {
-    aligned_delete(this->m_blockA, m_sizeA);
-    aligned_delete(this->m_blockB, m_sizeB);
-  }
-};
-
-// Alternate templates for any input sizes
-template<typename Scalar, typename Index, typename DataMapper, int Pack1, int Pack2, int StorageOrder, bool Conjugate = false, bool PanelMode = false>
-struct gemm_pack_lhs_any;
-template <typename Index, typename DataMapper, int Pack1, int Pack2, bool Conjugate, bool PanelMode>
-struct gemm_pack_lhs_any<QInt8, Index, DataMapper, Pack1, Pack2, ColMajor, Conjugate, PanelMode> {
-  EIGEN_DONT_INLINE void operator()
-      (QInt8* blockA, const DataMapper& lhs, Index depth, Index rows, Index stride = 0, Index offset = 0);
-};
-
-template<typename Scalar, typename Index, typename DataMapper, int nr, int StorageOrder, bool Conjugate = false, bool PanelMode=false>
-struct gemm_pack_rhs_any;
-template <typename Index, typename DataMapper, int nr, bool Conjugate, bool PanelMode>
-struct gemm_pack_rhs_any<QUInt8, Index, DataMapper, nr, ColMajor, Conjugate, PanelMode> {
-  EIGEN_DONT_INLINE void operator()
-      (QUInt8* blockB, const DataMapper& rhs, Index depth, Index cols, Index stride = 0, Index offset = 0);
-};
-
-template<typename LhsScalar, typename RhsScalar, typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs=false, bool ConjugateRhs=false>
-struct gebp_kernel_any;
-template<typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs>
-struct gebp_kernel_any<QInt8, QUInt8, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs>
-{
-  typedef typename DataMapper::LinearMapper LinearMapper;
-
-  EIGEN_DONT_INLINE
-  void operator()(const DataMapper& res, const QInt8* blockA, const QUInt8* blockB,
-                  Index rows, Index depth, Index cols, QInt32 alpha,
-                  Index strideA=-1, Index strideB=-1, Index offsetA=0, Index offsetB=0);
-};
-
-// Alternate implementations for any input sizes
-template <typename Index, typename DataMapper, int Pack1, int Pack2, bool Conjugate, bool PanelMode>
-EIGEN_DONT_INLINE void gemm_pack_lhs_any<QInt8, Index, DataMapper, Pack1, Pack2, ColMajor, Conjugate, PanelMode>::
-operator()(QInt8* blockA, const DataMapper& lhs, Index depth, Index rows, Index stride, Index offset) {
-  eigen_assert(stride == 0);
-  eigen_assert(offset == 0);
-
-  // Get vector pointer
-  __m256i* blockA_256 = reinterpret_cast<__m256i*>(blockA);
-
-  // Get even multiples of the dimensions
-  Index rows_32 = (rows / 32) * 32;
-  Index depth_8 = (depth / 8) * 8;
-
-  // Get padding for when depth is not a multiple of 32
-  int padding = 0;
-  if (depth % 32 != 0) {
-    int depth_32 = (depth / 32) * 32;
-    int extra_depth = depth - depth_32;
-    int extra_depth_8 = ((extra_depth + 7) / 8) * 8;
-    padding = 32 - extra_depth_8;
-  }
-
-  // Pack rows in sets of 32
-  for (Index m = 0; m < rows_32; m += 32) {
-    // Pack depth in sets of 8
-    for (Index k = 0; k < depth_8; k += 8) {
-      // Load vectors
-      __m256i L_A = lhs.loadPacket(m, k);
-      __m256i L_B = lhs.loadPacket(m, k + 1);
-
-      // Interleave 8-bit elements
-      __m256i L_AB0_AB16 = _mm256_unpacklo_epi8(L_A, L_B);
-      __m256i L_AB8_AB24 = _mm256_unpackhi_epi8(L_A, L_B);
-
-      __m256i L_C = lhs.loadPacket(m, k + 2);
-      __m256i L_D = lhs.loadPacket(m, k + 3);
-      __m256i L_CD0_CD16 = _mm256_unpacklo_epi8(L_C, L_D);
-      __m256i L_CD8_CD24 = _mm256_unpackhi_epi8(L_C, L_D);
-
-      // Interleave 16-bit elements
-      __m256i L_AD0_AD16 = _mm256_unpacklo_epi16(L_AB0_AB16, L_CD0_CD16);
-      __m256i L_AD4_AD20 = _mm256_unpackhi_epi16(L_AB0_AB16, L_CD0_CD16);
-
-      // Use permute before we store to cross 128-bit lanes
-      __m256i L_AD0 = _mm256_permute2x128_si256(L_AD0_AD16, L_AD4_AD20, 0x20);
-      _mm256_store_si256(blockA_256++, L_AD0);
-
-      // Complete packing for 32 x 8 block
-      __m256i L_AD16 = _mm256_permute2x128_si256(L_AD0_AD16, L_AD4_AD20, 0x31);
-      __m256i L_AD8_AD24 = _mm256_unpacklo_epi16(L_AB8_AB24, L_CD8_CD24);
-      __m256i L_AD12_AD28 = _mm256_unpackhi_epi16(L_AB8_AB24, L_CD8_CD24);
-      __m256i L_AD8 = _mm256_permute2x128_si256(L_AD8_AD24, L_AD12_AD28, 0x20);
-      _mm256_store_si256(blockA_256++, L_AD8);
-      _mm256_store_si256(blockA_256++, L_AD16);
-      __m256i L_AD24 = _mm256_permute2x128_si256(L_AD8_AD24, L_AD12_AD28, 0x31);
-      _mm256_store_si256(blockA_256++, L_AD24);
-      __m256i L_E = lhs.loadPacket(m, k + 4);
-      __m256i L_F = lhs.loadPacket(m, k + 5);
-      __m256i L_EF0_EF16 = _mm256_unpacklo_epi8(L_E, L_F);
-      __m256i L_EF8_EF24 = _mm256_unpackhi_epi8(L_E, L_F);
-      __m256i L_G = lhs.loadPacket(m, k + 6);
-      __m256i L_H = lhs.loadPacket(m, k + 7);
-      __m256i L_GH0_GH16 = _mm256_unpacklo_epi8(L_G, L_H);
-      __m256i L_GH8_GH24 = _mm256_unpackhi_epi8(L_G, L_H);
-      __m256i L_EH0_EH16 = _mm256_unpacklo_epi16(L_EF0_EF16, L_GH0_GH16);
-      __m256i L_EH4_EH20 = _mm256_unpackhi_epi16(L_EF0_EF16, L_GH0_GH16);
-      __m256i L_EH0 = _mm256_permute2x128_si256(L_EH0_EH16, L_EH4_EH20, 0x20);
-      _mm256_store_si256(blockA_256++, L_EH0);
-      __m256i L_EH16 = _mm256_permute2x128_si256(L_EH0_EH16, L_EH4_EH20, 0x31);
-      __m256i L_EH8_EH24 = _mm256_unpacklo_epi16(L_EF8_EF24, L_GH8_GH24);
-      __m256i L_EH12_EH28 = _mm256_unpackhi_epi16(L_EF8_EF24, L_GH8_GH24);
-      __m256i L_EH8 = _mm256_permute2x128_si256(L_EH8_EH24, L_EH12_EH28, 0x20);
-      _mm256_store_si256(blockA_256++, L_EH8);
-      _mm256_store_si256(blockA_256++, L_EH16);
-      __m256i L_EH24 = _mm256_permute2x128_si256(L_EH8_EH24, L_EH12_EH28, 0x31);
-      _mm256_store_si256(blockA_256++, L_EH24);
-    }
-
-    // Finish the k dimension, padding with zeros
-    if (depth_8 < depth) {
-      __m256i L_A, L_B, L_C, L_D, L_E, L_F, L_G, L_H;
-      switch (depth - depth_8) {
-      case 1:
-        L_A = lhs.loadPacket(m, depth_8);
-        L_B = _mm256_setzero_si256();
-        L_C = _mm256_setzero_si256();
-        L_D = _mm256_setzero_si256();
-        L_E = _mm256_setzero_si256();
-        L_F = _mm256_setzero_si256();
-        L_G = _mm256_setzero_si256();
-        L_H = _mm256_setzero_si256();
-        break;
-      case 2:
-        L_A = lhs.loadPacket(m, depth_8);
-        L_B = lhs.loadPacket(m, depth_8 + 1);
-        L_C = _mm256_setzero_si256();
-        L_D = _mm256_setzero_si256();
-        L_E = _mm256_setzero_si256();
-        L_F = _mm256_setzero_si256();
-        L_G = _mm256_setzero_si256();
-        L_H = _mm256_setzero_si256();
-        break;
-      case 3:
-        L_A = lhs.loadPacket(m, depth_8);
-        L_B = lhs.loadPacket(m, depth_8 + 1);
-        L_C = lhs.loadPacket(m, depth_8 + 2);
-        L_D = _mm256_setzero_si256();
-        L_E = _mm256_setzero_si256();
-        L_F = _mm256_setzero_si256();
-        L_G = _mm256_setzero_si256();
-        L_H = _mm256_setzero_si256();
-        break;
-      case 4:
-        L_A = lhs.loadPacket(m, depth_8);
-        L_B = lhs.loadPacket(m, depth_8 + 1);
-        L_C = lhs.loadPacket(m, depth_8 + 2);
-        L_D = lhs.loadPacket(m, depth_8 + 3);
-        L_E = _mm256_setzero_si256();
-        L_F = _mm256_setzero_si256();
-        L_G = _mm256_setzero_si256();
-        L_H = _mm256_setzero_si256();
-        break;
-      case 5:
-        L_A = lhs.loadPacket(m, depth_8);
-        L_B = lhs.loadPacket(m, depth_8 + 1);
-        L_C = lhs.loadPacket(m, depth_8 + 2);
-        L_D = lhs.loadPacket(m, depth_8 + 3);
-        L_E = lhs.loadPacket(m, depth_8 + 4);
-        L_F = _mm256_setzero_si256();
-        L_G = _mm256_setzero_si256();
-        L_H = _mm256_setzero_si256();
-        break;
-      case 6:
-        L_A = lhs.loadPacket(m, depth_8);
-        L_B = lhs.loadPacket(m, depth_8 + 1);
-        L_C = lhs.loadPacket(m, depth_8 + 2);
-        L_D = lhs.loadPacket(m, depth_8 + 3);
-        L_E = lhs.loadPacket(m, depth_8 + 4);
-        L_F = lhs.loadPacket(m, depth_8 + 5);
-        L_G = _mm256_setzero_si256();
-        L_H = _mm256_setzero_si256();
-        break;
-      case 7:
-        L_A = lhs.loadPacket(m, depth_8);
-        L_B = lhs.loadPacket(m, depth_8 + 1);
-        L_C = lhs.loadPacket(m, depth_8 + 2);
-        L_D = lhs.loadPacket(m, depth_8 + 3);
-        L_E = lhs.loadPacket(m, depth_8 + 4);
-        L_F = lhs.loadPacket(m, depth_8 + 5);
-        L_G = lhs.loadPacket(m, depth_8 + 6);
-        L_H = _mm256_setzero_si256();
-        break;
-      }
-
-      // Interleave 8-bit elements
-      __m256i L_AB0_AB16 = _mm256_unpacklo_epi8(L_A, L_B);
-      __m256i L_AB8_AB24 = _mm256_unpackhi_epi8(L_A, L_B);
-
-      __m256i L_CD0_CD16 = _mm256_unpacklo_epi8(L_C, L_D);
-      __m256i L_CD8_CD24 = _mm256_unpackhi_epi8(L_C, L_D);
-
-      // Interleave 16-bit elements
-      __m256i L_AD0_AD16 = _mm256_unpacklo_epi16(L_AB0_AB16, L_CD0_CD16);
-      __m256i L_AD4_AD20 = _mm256_unpackhi_epi16(L_AB0_AB16, L_CD0_CD16);
-
-      // Use permute before we store to cross 128-bit lanes
-      __m256i L_AD0 = _mm256_permute2x128_si256(L_AD0_AD16, L_AD4_AD20, 0x20);
-      _mm256_store_si256(blockA_256++, L_AD0);
-
-      // Complete packing
-      __m256i L_AD16 = _mm256_permute2x128_si256(L_AD0_AD16, L_AD4_AD20, 0x31);
-      __m256i L_AD8_AD24 = _mm256_unpacklo_epi16(L_AB8_AB24, L_CD8_CD24);
-      __m256i L_AD12_AD28 = _mm256_unpackhi_epi16(L_AB8_AB24, L_CD8_CD24);
-      __m256i L_AD8 = _mm256_permute2x128_si256(L_AD8_AD24, L_AD12_AD28, 0x20);
-      _mm256_store_si256(blockA_256++, L_AD8);
-      _mm256_store_si256(blockA_256++, L_AD16);
-      __m256i L_AD24 = _mm256_permute2x128_si256(L_AD8_AD24, L_AD12_AD28, 0x31);
-      _mm256_store_si256(blockA_256++, L_AD24);
-      __m256i L_EF0_EF16 = _mm256_unpacklo_epi8(L_E, L_F);
-      __m256i L_EF8_EF24 = _mm256_unpackhi_epi8(L_E, L_F);
-      __m256i L_GH0_GH16 = _mm256_unpacklo_epi8(L_G, L_H);
-      __m256i L_GH8_GH24 = _mm256_unpackhi_epi8(L_G, L_H);
-      __m256i L_EH0_EH16 = _mm256_unpacklo_epi16(L_EF0_EF16, L_GH0_GH16);
-      __m256i L_EH4_EH20 = _mm256_unpackhi_epi16(L_EF0_EF16, L_GH0_GH16);
-      __m256i L_EH0 = _mm256_permute2x128_si256(L_EH0_EH16, L_EH4_EH20, 0x20);
-      _mm256_store_si256(blockA_256++, L_EH0);
-      __m256i L_EH16 = _mm256_permute2x128_si256(L_EH0_EH16, L_EH4_EH20, 0x31);
-      __m256i L_EH8_EH24 = _mm256_unpacklo_epi16(L_EF8_EF24, L_GH8_GH24);
-      __m256i L_EH12_EH28 = _mm256_unpackhi_epi16(L_EF8_EF24, L_GH8_GH24);
-      __m256i L_EH8 = _mm256_permute2x128_si256(L_EH8_EH24, L_EH12_EH28, 0x20);
-      _mm256_store_si256(blockA_256++, L_EH8);
-      _mm256_store_si256(blockA_256++, L_EH16);
-      __m256i L_EH24 = _mm256_permute2x128_si256(L_EH8_EH24, L_EH12_EH28, 0x31);
-      _mm256_store_si256(blockA_256++, L_EH24);
-    }
-    blockA_256 += padding;
-  }
-
-  // Finish the m dimension, padding with zeros
-  if (rows_32 < rows) {
-    // Pack depth in sets of 8
-    for (Index k = 0; k < depth_8; k += 8) {
-      // Load vectors
-      __m256i L_A = _mm256_setzero_si256();
-      __m256i L_B = _mm256_setzero_si256();
-      __m256i L_C = _mm256_setzero_si256();
-      __m256i L_D = _mm256_setzero_si256();
-      __m256i L_E = _mm256_setzero_si256();
-      __m256i L_F = _mm256_setzero_si256();
-      __m256i L_G = _mm256_setzero_si256();
-      __m256i L_H = _mm256_setzero_si256();
-      for (Index m = 0; m < rows - rows_32; m++) {
-        QInt8* ptr = (QInt8*) &L_A;
-        ptr[m] = lhs(rows_32 + m, k);
-        ptr = (QInt8*) &L_B;
-        ptr[m] = lhs(rows_32 + m, k + 1);
-        ptr = (QInt8*) &L_C;
-        ptr[m] = lhs(rows_32 + m, k + 2);
-        ptr = (QInt8*) &L_D;
-        ptr[m] = lhs(rows_32 + m, k + 3);
-        ptr = (QInt8*) &L_E;
-        ptr[m] = lhs(rows_32 + m, k + 4);
-        ptr = (QInt8*) &L_F;
-        ptr[m] = lhs(rows_32 + m, k + 5);
-        ptr = (QInt8*) &L_G;
-        ptr[m] = lhs(rows_32 + m, k + 6);
-        ptr = (QInt8*) &L_H;
-        ptr[m] = lhs(rows_32 + m, k + 7);
-      }
-
-      // Interleave 8-bit elements
-      __m256i L_AB0_AB16 = _mm256_unpacklo_epi8(L_A, L_B);
-      __m256i L_AB8_AB24 = _mm256_unpackhi_epi8(L_A, L_B);
-      __m256i L_CD0_CD16 = _mm256_unpacklo_epi8(L_C, L_D);
-      __m256i L_CD8_CD24 = _mm256_unpackhi_epi8(L_C, L_D);
-
-      // Interleave 16-bit elements
-      __m256i L_AD0_AD16 = _mm256_unpacklo_epi16(L_AB0_AB16, L_CD0_CD16);
-      __m256i L_AD4_AD20 = _mm256_unpackhi_epi16(L_AB0_AB16, L_CD0_CD16);
-
-      // Use permute before we store to cross 128-bit lanes
-      __m256i L_AD0 = _mm256_permute2x128_si256(L_AD0_AD16, L_AD4_AD20, 0x20);
-      _mm256_store_si256(blockA_256++, L_AD0);
-
-      // Complete packing for 32 x 8 block
-      __m256i L_AD16 = _mm256_permute2x128_si256(L_AD0_AD16, L_AD4_AD20, 0x31);
-      __m256i L_AD8_AD24 = _mm256_unpacklo_epi16(L_AB8_AB24, L_CD8_CD24);
-      __m256i L_AD12_AD28 = _mm256_unpackhi_epi16(L_AB8_AB24, L_CD8_CD24);
-      __m256i L_AD8 = _mm256_permute2x128_si256(L_AD8_AD24, L_AD12_AD28, 0x20);
-      _mm256_store_si256(blockA_256++, L_AD8);
-      _mm256_store_si256(blockA_256++, L_AD16);
-      __m256i L_AD24 = _mm256_permute2x128_si256(L_AD8_AD24, L_AD12_AD28, 0x31);
-      _mm256_store_si256(blockA_256++, L_AD24);
-      __m256i L_EF0_EF16 = _mm256_unpacklo_epi8(L_E, L_F);
-      __m256i L_EF8_EF24 = _mm256_unpackhi_epi8(L_E, L_F);
-      __m256i L_GH0_GH16 = _mm256_unpacklo_epi8(L_G, L_H);
-      __m256i L_GH8_GH24 = _mm256_unpackhi_epi8(L_G, L_H);
-      __m256i L_EH0_EH16 = _mm256_unpacklo_epi16(L_EF0_EF16, L_GH0_GH16);
-      __m256i L_EH4_EH20 = _mm256_unpackhi_epi16(L_EF0_EF16, L_GH0_GH16);
-      __m256i L_EH0 = _mm256_permute2x128_si256(L_EH0_EH16, L_EH4_EH20, 0x20);
-      _mm256_store_si256(blockA_256++, L_EH0);
-      __m256i L_EH16 = _mm256_permute2x128_si256(L_EH0_EH16, L_EH4_EH20, 0x31);
-      __m256i L_EH8_EH24 = _mm256_unpacklo_epi16(L_EF8_EF24, L_GH8_GH24);
-      __m256i L_EH12_EH28 = _mm256_unpackhi_epi16(L_EF8_EF24, L_GH8_GH24);
-      __m256i L_EH8 = _mm256_permute2x128_si256(L_EH8_EH24, L_EH12_EH28, 0x20);
-      _mm256_store_si256(blockA_256++, L_EH8);
-      _mm256_store_si256(blockA_256++, L_EH16);
-      __m256i L_EH24 = _mm256_permute2x128_si256(L_EH8_EH24, L_EH12_EH28, 0x31);
-      _mm256_store_si256(blockA_256++, L_EH24);
-    }
-
-    // Finish the k dimension, padding with zeros
-    if (depth_8 < depth) {
-      __m256i L_A, L_B, L_C, L_D, L_E, L_F, L_G, L_H;
-      QInt8* ptr;
-      switch (depth - depth_8) {
-      case 1:
-        L_A = _mm256_setzero_si256();
-        L_B = _mm256_setzero_si256();
-        L_C = _mm256_setzero_si256();
-        L_D = _mm256_setzero_si256();
-        L_E = _mm256_setzero_si256();
-        L_F = _mm256_setzero_si256();
-        L_G = _mm256_setzero_si256();
-        L_H = _mm256_setzero_si256();
-        for (Index m = 0; m < rows - rows_32; m++) {
-          QInt8* ptr = (QInt8*) &L_A;
-          ptr[m] = lhs(rows_32 + m, depth_8);
-        }
-        break;
-      case 2:
-        L_A = _mm256_setzero_si256();
-        L_B = _mm256_setzero_si256();
-        L_C = _mm256_setzero_si256();
-        L_D = _mm256_setzero_si256();
-        L_E = _mm256_setzero_si256();
-        L_F = _mm256_setzero_si256();
-        L_G = _mm256_setzero_si256();
-        L_H = _mm256_setzero_si256();
-        for (Index m = 0; m < rows - rows_32; m++) {
-          ptr = (QInt8*) &L_A;
-          ptr[m] = lhs(rows_32 + m, depth_8);
-          ptr = (QInt8*) &L_B;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 1);
-        }
-        break;
-      case 3:
-        L_A = _mm256_setzero_si256();
-        L_B = _mm256_setzero_si256();
-        L_C = _mm256_setzero_si256();
-        L_D = _mm256_setzero_si256();
-        L_E = _mm256_setzero_si256();
-        L_F = _mm256_setzero_si256();
-        L_G = _mm256_setzero_si256();
-        L_H = _mm256_setzero_si256();
-        for (Index m = 0; m < rows - rows_32; m++) {
-          ptr = (QInt8*) &L_A;
-          ptr[m] = lhs(rows_32 + m, depth_8);
-          ptr = (QInt8*) &L_B;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 1);
-          ptr = (QInt8*) &L_C;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 2);
-        }
-        break;
-      case 4:
-        L_A = _mm256_setzero_si256();
-        L_B = _mm256_setzero_si256();
-        L_C = _mm256_setzero_si256();
-        L_D = _mm256_setzero_si256();
-        L_E = _mm256_setzero_si256();
-        L_F = _mm256_setzero_si256();
-        L_G = _mm256_setzero_si256();
-        L_H = _mm256_setzero_si256();
-        for (Index m = 0; m < rows - rows_32; m++) {
-          ptr = (QInt8*) &L_A;
-          ptr[m] = lhs(rows_32 + m, depth_8);
-          ptr = (QInt8*) &L_B;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 1);
-          ptr = (QInt8*) &L_C;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 2);
-          ptr = (QInt8*) &L_D;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 3);
-        }
-        break;
-      case 5:
-        L_A = _mm256_setzero_si256();
-        L_B = _mm256_setzero_si256();
-        L_C = _mm256_setzero_si256();
-        L_D = _mm256_setzero_si256();
-        L_E = _mm256_setzero_si256();
-        L_F = _mm256_setzero_si256();
-        L_G = _mm256_setzero_si256();
-        L_H = _mm256_setzero_si256();
-        for (Index m = 0; m < rows - rows_32; m++) {
-          ptr = (QInt8*) &L_A;
-          ptr[m] = lhs(rows_32 + m, depth_8);
-          ptr = (QInt8*) &L_B;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 1);
-          ptr = (QInt8*) &L_C;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 2);
-          ptr = (QInt8*) &L_D;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 3);
-          ptr = (QInt8*) &L_E;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 4);
-        }
-        break;
-      case 6:
-        L_A = _mm256_setzero_si256();
-        L_B = _mm256_setzero_si256();
-        L_C = _mm256_setzero_si256();
-        L_D = _mm256_setzero_si256();
-        L_E = _mm256_setzero_si256();
-        L_F = _mm256_setzero_si256();
-        L_G = _mm256_setzero_si256();
-        L_H = _mm256_setzero_si256();
-        for (Index m = 0; m < rows - rows_32; m++) {
-          ptr = (QInt8*) &L_A;
-          ptr[m] = lhs(rows_32 + m, depth_8);
-          ptr = (QInt8*) &L_B;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 1);
-          ptr = (QInt8*) &L_C;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 2);
-          ptr = (QInt8*) &L_D;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 3);
-          ptr = (QInt8*) &L_E;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 4);
-          ptr = (QInt8*) &L_F;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 5);
-        }
-        break;
-      case 7:
-        L_A = _mm256_setzero_si256();
-        L_B = _mm256_setzero_si256();
-        L_C = _mm256_setzero_si256();
-        L_D = _mm256_setzero_si256();
-        L_E = _mm256_setzero_si256();
-        L_F = _mm256_setzero_si256();
-        L_G = _mm256_setzero_si256();
-        L_H = _mm256_setzero_si256();
-        for (Index m = 0; m < rows - rows_32; m++) {
-          ptr = (QInt8*) &L_A;
-          ptr[m] = lhs(rows_32 + m, depth_8);
-          ptr = (QInt8*) &L_B;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 1);
-          ptr = (QInt8*) &L_C;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 2);
-          ptr = (QInt8*) &L_D;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 3);
-          ptr = (QInt8*) &L_E;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 4);
-          ptr = (QInt8*) &L_F;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 5);
-          ptr = (QInt8*) &L_G;
-          ptr[m] = lhs(rows_32 + m, depth_8 + 6);
-        }
-        break;
-      }
-
-      // Interleave 8-bit elements
-      __m256i L_AB0_AB16 = _mm256_unpacklo_epi8(L_A, L_B);
-      __m256i L_AB8_AB24 = _mm256_unpackhi_epi8(L_A, L_B);
-      __m256i L_CD0_CD16 = _mm256_unpacklo_epi8(L_C, L_D);
-      __m256i L_CD8_CD24 = _mm256_unpackhi_epi8(L_C, L_D);
-
-      // Interleave 16-bit elements
-      __m256i L_AD0_AD16 = _mm256_unpacklo_epi16(L_AB0_AB16, L_CD0_CD16);
-      __m256i L_AD4_AD20 = _mm256_unpackhi_epi16(L_AB0_AB16, L_CD0_CD16);
-
-      // Use permute before we store to cross 128-bit lanes
-      __m256i L_AD0 = _mm256_permute2x128_si256(L_AD0_AD16, L_AD4_AD20, 0x20);
-      _mm256_store_si256(blockA_256++, L_AD0);
-
-      // Complete packing
-      __m256i L_AD16 = _mm256_permute2x128_si256(L_AD0_AD16, L_AD4_AD20, 0x31);
-      __m256i L_AD8_AD24 = _mm256_unpacklo_epi16(L_AB8_AB24, L_CD8_CD24);
-      __m256i L_AD12_AD28 = _mm256_unpackhi_epi16(L_AB8_AB24, L_CD8_CD24);
-      __m256i L_AD8 = _mm256_permute2x128_si256(L_AD8_AD24, L_AD12_AD28, 0x20);
-      _mm256_store_si256(blockA_256++, L_AD8);
-      _mm256_store_si256(blockA_256++, L_AD16);
-      __m256i L_AD24 = _mm256_permute2x128_si256(L_AD8_AD24, L_AD12_AD28, 0x31);
-      _mm256_store_si256(blockA_256++, L_AD24);
-      __m256i L_EF0_EF16 = _mm256_unpacklo_epi8(L_E, L_F);
-      __m256i L_EF8_EF24 = _mm256_unpackhi_epi8(L_E, L_F);
-      __m256i L_GH0_GH16 = _mm256_unpacklo_epi8(L_G, L_H);
-      __m256i L_GH8_GH24 = _mm256_unpackhi_epi8(L_G, L_H);
-      __m256i L_EH0_EH16 = _mm256_unpacklo_epi16(L_EF0_EF16, L_GH0_GH16);
-      __m256i L_EH4_EH20 = _mm256_unpackhi_epi16(L_EF0_EF16, L_GH0_GH16);
-      __m256i L_EH0 = _mm256_permute2x128_si256(L_EH0_EH16, L_EH4_EH20, 0x20);
-      _mm256_store_si256(blockA_256++, L_EH0);
-      __m256i L_EH16 = _mm256_permute2x128_si256(L_EH0_EH16, L_EH4_EH20, 0x31);
-      __m256i L_EH8_EH24 = _mm256_unpacklo_epi16(L_EF8_EF24, L_GH8_GH24);
-      __m256i L_EH12_EH28 = _mm256_unpackhi_epi16(L_EF8_EF24, L_GH8_GH24);
-      __m256i L_EH8 = _mm256_permute2x128_si256(L_EH8_EH24, L_EH12_EH28, 0x20);
-      _mm256_store_si256(blockA_256++, L_EH8);
-      _mm256_store_si256(blockA_256++, L_EH16);
-      __m256i L_EH24 = _mm256_permute2x128_si256(L_EH8_EH24, L_EH12_EH28, 0x31);
-      _mm256_store_si256(blockA_256++, L_EH24);
-    }
-  }
-}
-
-template <typename Index, typename DataMapper, int nr, bool Conjugate, bool PanelMode>
-EIGEN_DONT_INLINE void gemm_pack_rhs_any<QUInt8, Index, DataMapper, nr, ColMajor, Conjugate, PanelMode>::
-operator()(QUInt8* blockB, const DataMapper& rhs, Index depth, Index cols, Index stride, Index offset) {
-  eigen_assert(stride == 0);
-  eigen_assert(offset == 0);
-
-  // Get vector pointer
-  __m256i* blockB_256 = reinterpret_cast<__m256i*>(blockB);
-
-  // Get even multiples of the dimensions
-  Index cols_32 = (cols / 32) * 32;
-  Index depth_32 = (depth / 32) * 32;
-
-  // Perform a step of the packing for 4 columns
-  __m256i R_AB_L, R_AB_H, R_CD_L, R_CD_H, R_AD_0, R_AD_8, R_AD_16, R_AD_24;
-#define PACK_STEP                                            \
-  R_AB_L = _mm256_unpacklo_epi64(R_A, R_B);                  \
-  R_CD_L = _mm256_unpacklo_epi64(R_C, R_D);                  \
-  R_AB_H = _mm256_unpackhi_epi64(R_A, R_B);                  \
-  R_CD_H = _mm256_unpackhi_epi64(R_C, R_D);                  \
-  R_AD_0 = _mm256_permute2x128_si256(R_AB_L, R_CD_L, 0x20);  \
-  R_AD_16 = _mm256_permute2x128_si256(R_AB_L, R_CD_L, 0x31); \
-  R_AD_8 = _mm256_permute2x128_si256(R_AB_H, R_CD_H, 0x20);  \
-  R_AD_24 = _mm256_permute2x128_si256(R_AB_H, R_CD_H, 0x31); \
-  _mm256_store_si256(blockB_256, R_AD_0);                    \
-  _mm256_store_si256(blockB_256 + 8, R_AD_8);                \
-  _mm256_store_si256(blockB_256 + 16, R_AD_16);              \
-  _mm256_store_si256(blockB_256 + 24, R_AD_24);              \
-  blockB_256++;
-
-  // Pack cols in sets of 32
-  for (Index n = 0; n < cols_32; n += 32) {
-    // Pack depth in sets of 32
-    for (Index k = 0; k < depth_32; k += 32) {
-      __m256i R_A = rhs.loadPacket(k, n);
-      __m256i R_B = rhs.loadPacket(k, n + 1);
-      __m256i R_C = rhs.loadPacket(k, n + 2);
-      __m256i R_D = rhs.loadPacket(k, n + 3);
-      PACK_STEP;
-
-      R_A = rhs.loadPacket(k, n + 4);
-      R_B = rhs.loadPacket(k, n + 5);
-      R_C = rhs.loadPacket(k, n + 6);
-      R_D = rhs.loadPacket(k, n + 7);
-      PACK_STEP;
-
-      R_A = rhs.loadPacket(k, n + 8);
-      R_B = rhs.loadPacket(k, n + 9);
-      R_C = rhs.loadPacket(k, n + 10);
-      R_D = rhs.loadPacket(k, n + 11);
-      PACK_STEP;
-
-      R_A = rhs.loadPacket(k, n + 12);
-      R_B = rhs.loadPacket(k, n + 13);
-      R_C = rhs.loadPacket(k, n + 14);
-      R_D = rhs.loadPacket(k, n + 15);
-      PACK_STEP;
-
-      R_A = rhs.loadPacket(k, n + 16);
-      R_B = rhs.loadPacket(k, n + 17);
-      R_C = rhs.loadPacket(k, n + 18);
-      R_D = rhs.loadPacket(k, n + 19);
-      PACK_STEP;
-
-      R_A = rhs.loadPacket(k, n + 20);
-      R_B = rhs.loadPacket(k, n + 21);
-      R_C = rhs.loadPacket(k, n + 22);
-      R_D = rhs.loadPacket(k, n + 23);
-      PACK_STEP;
-
-      R_A = rhs.loadPacket(k, n + 24);
-      R_B = rhs.loadPacket(k, n + 25);
-      R_C = rhs.loadPacket(k, n + 26);
-      R_D = rhs.loadPacket(k, n + 27);
-      PACK_STEP;
-
-      R_A = rhs.loadPacket(k, n + 28);
-      R_B = rhs.loadPacket(k, n + 29);
-      R_C = rhs.loadPacket(k, n + 30);
-      R_D = rhs.loadPacket(k, n + 31);
-      PACK_STEP;
-
-      blockB_256 += 24;
-    }
-
-    if (depth_32 < depth) {
-      QUInt8* ptr;
-      __m256i R_A = _mm256_setzero_si256();
-      __m256i R_B = _mm256_setzero_si256();
-      __m256i R_C = _mm256_setzero_si256();
-      __m256i R_D = _mm256_setzero_si256();
-      for (Index k = depth_32; k < depth; k++) {
-        ptr = (QUInt8*) &R_A;
-        ptr[k - depth_32] = rhs(k, n);
-        ptr = (QUInt8*) &R_B;
-        ptr[k - depth_32] = rhs(k, n + 1);
-        ptr = (QUInt8*) &R_C;
-        ptr[k - depth_32] = rhs(k, n + 2);
-        ptr = (QUInt8*) &R_D;
-        ptr[k - depth_32] = rhs(k, n + 3);
-      }
-      PACK_STEP;
-
-      R_A = _mm256_setzero_si256();
-      R_B = _mm256_setzero_si256();
-      R_C = _mm256_setzero_si256();
-      R_D = _mm256_setzero_si256();
-      for (Index k = depth_32; k < depth; k++) {
-        ptr = (QUInt8*) &R_A;
-        ptr[k - depth_32] = rhs(k, n + 4);
-        ptr = (QUInt8*) &R_B;
-        ptr[k - depth_32] = rhs(k, n + 5);
-        ptr = (QUInt8*) &R_C;
-        ptr[k - depth_32] = rhs(k, n + 6);
-        ptr = (QUInt8*) &R_D;
-        ptr[k - depth_32] = rhs(k, n + 7);
-      }
-      PACK_STEP;
-
-      R_A = _mm256_setzero_si256();
-      R_B = _mm256_setzero_si256();
-      R_C = _mm256_setzero_si256();
-      R_D = _mm256_setzero_si256();
-      for (Index k = depth_32; k < depth; k++) {
-        ptr = (QUInt8*) &R_A;
-        ptr[k - depth_32] = rhs(k, n + 8);
-        ptr = (QUInt8*) &R_B;
-        ptr[k - depth_32] = rhs(k, n + 9);
-        ptr = (QUInt8*) &R_C;
-        ptr[k - depth_32] = rhs(k, n + 10);
-        ptr = (QUInt8*) &R_D;
-        ptr[k - depth_32] = rhs(k, n + 11);
-      }
-      PACK_STEP;
-
-      R_A = _mm256_setzero_si256();
-      R_B = _mm256_setzero_si256();
-      R_C = _mm256_setzero_si256();
-      R_D = _mm256_setzero_si256();
-      for (Index k = depth_32; k < depth; k++) {
-        ptr = (QUInt8*) &R_A;
-        ptr[k - depth_32] = rhs(k, n + 12);
-        ptr = (QUInt8*) &R_B;
-        ptr[k - depth_32] = rhs(k, n + 13);
-        ptr = (QUInt8*) &R_C;
-        ptr[k - depth_32] = rhs(k, n + 14);
-        ptr = (QUInt8*) &R_D;
-        ptr[k - depth_32] = rhs(k, n + 15);
-      }
-      PACK_STEP;
-
-      R_A = _mm256_setzero_si256();
-      R_B = _mm256_setzero_si256();
-      R_C = _mm256_setzero_si256();
-      R_D = _mm256_setzero_si256();
-      for (Index k = depth_32; k < depth; k++) {
-        ptr = (QUInt8*) &R_A;
-        ptr[k - depth_32] = rhs(k, n + 16);
-        ptr = (QUInt8*) &R_B;
-        ptr[k - depth_32] = rhs(k, n + 17);
-        ptr = (QUInt8*) &R_C;
-        ptr[k - depth_32] = rhs(k, n + 18);
-        ptr = (QUInt8*) &R_D;
-        ptr[k - depth_32] = rhs(k, n + 19);
-      }
-      PACK_STEP;
-
-      R_A = _mm256_setzero_si256();
-      R_B = _mm256_setzero_si256();
-      R_C = _mm256_setzero_si256();
-      R_D = _mm256_setzero_si256();
-      for (Index k = depth_32; k < depth; k++) {
-        ptr = (QUInt8*) &R_A;
-        ptr[k - depth_32] = rhs(k, n + 20);
-        ptr = (QUInt8*) &R_B;
-        ptr[k - depth_32] = rhs(k, n + 21);
-        ptr = (QUInt8*) &R_C;
-        ptr[k - depth_32] = rhs(k, n + 22);
-        ptr = (QUInt8*) &R_D;
-        ptr[k - depth_32] = rhs(k, n + 23);
-      }
-      PACK_STEP;
-
-      R_A = _mm256_setzero_si256();
-      R_B = _mm256_setzero_si256();
-      R_C = _mm256_setzero_si256();
-      R_D = _mm256_setzero_si256();
-      for (Index k = depth_32; k < depth; k++) {
-        ptr = (QUInt8*) &R_A;
-        ptr[k - depth_32] = rhs(k, n + 24);
-        ptr = (QUInt8*) &R_B;
-        ptr[k - depth_32] = rhs(k, n + 25);
-        ptr = (QUInt8*) &R_C;
-        ptr[k - depth_32] = rhs(k, n + 26);
-        ptr = (QUInt8*) &R_D;
-        ptr[k - depth_32] = rhs(k, n + 27);
-      }
-      PACK_STEP;
-
-      R_A = _mm256_setzero_si256();
-      R_B = _mm256_setzero_si256();
-      R_C = _mm256_setzero_si256();
-      R_D = _mm256_setzero_si256();
-      for (Index k = depth_32; k < depth; k++) {
-        ptr = (QUInt8*) &R_A;
-        ptr[k - depth_32] = rhs(k, n + 28);
-        ptr = (QUInt8*) &R_B;
-        ptr[k - depth_32] = rhs(k, n + 29);
-        ptr = (QUInt8*) &R_C;
-        ptr[k - depth_32] = rhs(k, n + 30);
-        ptr = (QUInt8*) &R_D;
-        ptr[k - depth_32] = rhs(k, n + 31);
-      }
-      PACK_STEP;
-      blockB_256 += 24;
-    }
-  }
-
-  // Finish packing cols
-  if (cols_32 < cols) {
-    // Pack depth in sets of 32
-    for (Index k = 0; k < depth_32; k += 32) {
-      __m256i R_A, R_B, R_C, R_D;
-      Index n;
-      for (n = cols_32; n < cols; n += 4) {
-        switch (cols - n) {
-        case 1:
-          R_A = rhs.loadPacket(k, n);
-          R_B = _mm256_setzero_si256();
-          R_C = _mm256_setzero_si256();
-          R_D = _mm256_setzero_si256();
-          PACK_STEP;
-          break;
-        case 2:
-          R_A = rhs.loadPacket(k, n);
-          R_B = rhs.loadPacket(k, n + 1);
-          R_C = _mm256_setzero_si256();
-          R_D = _mm256_setzero_si256();
-          PACK_STEP;
-          break;
-        case 3:
-          R_A = rhs.loadPacket(k, n);
-          R_B = rhs.loadPacket(k, n + 1);
-          R_C = rhs.loadPacket(k, n + 2);
-          R_D = _mm256_setzero_si256();
-          PACK_STEP;
-          break;
-        default:
-          R_A = rhs.loadPacket(k, n);
-          R_B = rhs.loadPacket(k, n + 1);
-          R_C = rhs.loadPacket(k, n + 2);
-          R_D = rhs.loadPacket(k, n + 3);
-          PACK_STEP;
-          break;
-        }
-      }
-
-      // Increment the block pointer.
-      // We must pad if cols is not a multiple of 32.
-      blockB_256 += 32 - (n - cols_32) / 4;
-    }
-
-    if (depth_32 < depth) {
-      for (Index n = cols_32; n < cols; n += 4) {
-        QUInt8* ptr;
-        __m256i R_A = _mm256_setzero_si256();
-        __m256i R_B = _mm256_setzero_si256();
-        __m256i R_C = _mm256_setzero_si256();
-        __m256i R_D = _mm256_setzero_si256();
-        switch (cols - n) {
-        case 1:
-          for (Index k = depth_32; k < depth; k++) {
-            ptr = (QUInt8*) &R_A;
-            ptr[k - depth_32] = rhs(k, n);
-          }
-          PACK_STEP;
-          break;
-        case 2:
-          for (Index k = depth_32; k < depth; k++) {
-            ptr = (QUInt8*) &R_A;
-            ptr[k - depth_32] = rhs(k, n);
-            ptr = (QUInt8*) &R_B;
-            ptr[k - depth_32] = rhs(k, n + 1);
-          }
-          PACK_STEP;
-          break;
-        case 3:
-          for (Index k = depth_32; k < depth; k++) {
-            ptr = (QUInt8*) &R_A;
-            ptr[k - depth_32] = rhs(k, n);
-            ptr = (QUInt8*) &R_B;
-            ptr[k - depth_32] = rhs(k, n + 1);
-            ptr = (QUInt8*) &R_C;
-            ptr[k - depth_32] = rhs(k, n + 2);
-          }
-          PACK_STEP;
-          break;
-        default:
-          for (Index k = depth_32; k < depth; k++) {
-            ptr = (QUInt8*) &R_A;
-            ptr[k - depth_32] = rhs(k, n);
-            ptr = (QUInt8*) &R_B;
-            ptr[k - depth_32] = rhs(k, n + 1);
-            ptr = (QUInt8*) &R_C;
-            ptr[k - depth_32] = rhs(k, n + 2);
-            ptr = (QUInt8*) &R_D;
-            ptr[k - depth_32] = rhs(k, n + 3);
-          }
-          PACK_STEP;
-          break;
-        }
-      }
-    }
-  }
-#undef PACK_STEP
-}
-
-template<typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs>
-EIGEN_DONT_INLINE
-void gebp_kernel_any<QInt8, QUInt8, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs>
-::operator()(const DataMapper& res, const QInt8* blockA, const QUInt8* blockB,
-             Index rows, Index depth, Index cols, QInt32 alpha,
-             Index strideA, Index strideB, Index offsetA, Index offsetB)
-{
-  EIGEN_STATIC_ASSERT(!ConjugateLhs, YOU_MADE_A_PROGRAMMING_MISTAKE);
-  EIGEN_STATIC_ASSERT(!ConjugateRhs, YOU_MADE_A_PROGRAMMING_MISTAKE);
-  eigen_assert(alpha.value == 1);
-  eigen_assert(strideA == -1);
-  eigen_assert(strideB == -1);
-  eigen_assert(offsetA == 0);
-  eigen_assert(offsetB == 0);
-  eigen_assert(rows > 0);
-  eigen_assert(cols > 0);
-  eigen_assert(depth > 0);
-  eigen_assert(blockA);
-  eigen_assert(blockB);
-
-  Index rows_32 = ((rows + 31) / 32) * 32;
-  Index cols_32 = ((cols + 31) / 32) * 32;
-  Index depth_32 = ((depth + 31) / 32) * 32;
-
-  // Create result block
-  ei_declare_aligned_stack_constructed_variable(QInt32, blockO, 32 * 32, 0);
-  memset(blockO, 0, 32 * 32 * sizeof(QInt32));
-
-  // Get vectorized pointers
-  __m256i* blockO_256 = reinterpret_cast<__m256i*>(blockO);
-  const __m256i* blockA_256 = reinterpret_cast<const __m256i*>(blockA);
-  const __m256i* blockB_256 = reinterpret_cast<const __m256i*>(blockB);
-
-  // Loop over blocks of 32 columns
-  for (Index n = 0; n < cols_32; n += 32) {
-    // Reset index into blockA
-    Index indexL = 0;
-    // Loop over blocks of 32 rows
-    for (Index m = 0; m < rows_32; m += 32) {
-      // Reset index into blockB
-      Index indexR = n / 32 * depth_32;
-      // Loop over blocks of 8 on depth
-      for (Index k = 0; k < depth_32; k += 8) {
-        // Load inputs
-        __m256i L_AD0 = blockA_256[indexL++];
-        __m256i L_AD8 = blockA_256[indexL++];
-        __m256i L_AD16 = blockA_256[indexL++];
-        __m256i L_AD24 = blockA_256[indexL++];
-        __m256i L_EH0 = blockA_256[indexL++];
-        __m256i L_EH8 = blockA_256[indexL++];
-        __m256i L_EH16 = blockA_256[indexL++];
-        __m256i L_EH24 = blockA_256[indexL++];
-        __m256i R_AH0 = blockB_256[indexR++];
-        __m256i R_AH4 = blockB_256[indexR++];
-        __m256i R_AH8 = blockB_256[indexR++];
-        __m256i R_AH12 = blockB_256[indexR++];
-        __m256i R_AH16 = blockB_256[indexR++];
-        __m256i R_AH20 = blockB_256[indexR++];
-        __m256i R_AH24 = blockB_256[indexR++];
-        __m256i R_AH28 = blockB_256[indexR++];
-
-        // This constant is used with madd to convert 16 bit to 32 bit
-        const __m256i ONE = _mm256_set1_epi32(0x00010001);
-
-        // Declare variables used in COMPUTE_STEP
-        __m256i P_16_A, P_16_B, P_32_A, P_32_B, P_32;
-
-#define COMPUTE_STEP(R_INPUT_A, R_INPUT_B, OFFSET)                             \
-  P_16_A = _mm256_maddubs_epi16(R_INPUT_A, L_AD0);                             \
-  P_32_A = _mm256_madd_epi16(P_16_A, ONE);                                     \
-  P_16_B = _mm256_maddubs_epi16(R_INPUT_B, L_EH0);                             \
-  P_32_B = _mm256_madd_epi16(P_16_B, ONE);                                     \
-  P_32 = _mm256_add_epi32(P_32_A, P_32_B);                                     \
-  _mm256_store_si256(                                                          \
-      blockO_256 + 4 * OFFSET,                                                 \
-      _mm256_add_epi32(_mm256_load_si256(blockO_256 + 4 * OFFSET), P_32));     \
-                                                                               \
-  P_16_A = _mm256_maddubs_epi16(R_INPUT_A, L_AD8);                             \
-  P_32_A = _mm256_madd_epi16(P_16_A, ONE);                                     \
-  P_16_B = _mm256_maddubs_epi16(R_INPUT_B, L_EH8);                             \
-  P_32_B = _mm256_madd_epi16(P_16_B, ONE);                                     \
-  P_32 = _mm256_add_epi32(P_32_A, P_32_B);                                     \
-  _mm256_store_si256(                                                          \
-      blockO_256 + 4 * OFFSET + 1,                                             \
-      _mm256_add_epi32(_mm256_load_si256(blockO_256 + 4 * OFFSET + 1), P_32)); \
-                                                                               \
-  P_16_A = _mm256_maddubs_epi16(R_INPUT_A, L_AD16);                            \
-  P_32_A = _mm256_madd_epi16(P_16_A, ONE);                                     \
-  P_16_B = _mm256_maddubs_epi16(R_INPUT_B, L_EH16);                            \
-  P_32_B = _mm256_madd_epi16(P_16_B, ONE);                                     \
-  P_32 = _mm256_add_epi32(P_32_A, P_32_B);                                     \
-  _mm256_store_si256(                                                          \
-      blockO_256 + 4 * OFFSET + 2,                                             \
-      _mm256_add_epi32(_mm256_load_si256(blockO_256 + 4 * OFFSET + 2), P_32)); \
-                                                                               \
-  P_16_A = _mm256_maddubs_epi16(R_INPUT_A, L_AD24);                            \
-  P_32_A = _mm256_madd_epi16(P_16_A, ONE);                                     \
-  P_16_B = _mm256_maddubs_epi16(R_INPUT_B, L_EH24);                            \
-  P_32_B = _mm256_madd_epi16(P_16_B, ONE);                                     \
-  P_32 = _mm256_add_epi32(P_32_A, P_32_B);                                     \
-  _mm256_store_si256(                                                          \
-      blockO_256 + 4 * OFFSET + 3,                                             \
-      _mm256_add_epi32(_mm256_load_si256(blockO_256 + 4 * OFFSET + 3), P_32));
-
-        // Permute and shuffle to copy a single value across the entire vector
-        // Then compute the multiplication
-        __m256i R_AH0_ = _mm256_permute2x128_si256(R_AH0, R_AH0, 0x00);
-        __m256i R_AD0 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        __m256i R_EH0 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD0, R_EH0, 0);
-        __m256i R_AD1 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        __m256i R_EH1 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD1, R_EH1, 1);
-        R_AH0_ = _mm256_permute2x128_si256(R_AH0, R_AH0, 0x11);
-        __m256i R_AD2 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        __m256i R_EH2 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD2, R_EH2, 2);
-        __m256i R_AD3 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        __m256i R_EH3 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD3, R_EH3, 3);
-
-        R_AH0_ = _mm256_permute2x128_si256(R_AH4, R_AH4, 0x00);
-        R_AD0 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH0 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD0, R_EH0, 4);
-        R_AD1 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH1 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD1, R_EH1, 5);
-        R_AH0_ = _mm256_permute2x128_si256(R_AH4, R_AH4, 0x11);
-        R_AD2 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH2 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD2, R_EH2, 6);
-        R_AD3 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH3 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD3, R_EH3, 7);
-
-        R_AH0_ = _mm256_permute2x128_si256(R_AH8, R_AH8, 0x00);
-        R_AD0 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH0 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD0, R_EH0, 8);
-        R_AD1 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH1 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD1, R_EH1, 9);
-        R_AH0_ = _mm256_permute2x128_si256(R_AH8, R_AH8, 0x11);
-        R_AD2 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH2 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD2, R_EH2, 10);
-        R_AD3 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH3 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD3, R_EH3, 11);
-
-        R_AH0_ = _mm256_permute2x128_si256(R_AH12, R_AH12, 0x00);
-        R_AD0 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH0 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD0, R_EH0, 12);
-        R_AD1 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH1 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD1, R_EH1, 13);
-        R_AH0_ = _mm256_permute2x128_si256(R_AH12, R_AH12, 0x11);
-        R_AD2 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH2 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD2, R_EH2, 14);
-        R_AD3 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH3 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD3, R_EH3, 15);
-
-        R_AH0_ = _mm256_permute2x128_si256(R_AH16, R_AH16, 0x00);
-        R_AD0 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH0 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD0, R_EH0, 16);
-        R_AD1 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH1 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD1, R_EH1, 17);
-        R_AH0_ = _mm256_permute2x128_si256(R_AH16, R_AH16, 0x11);
-        R_AD2 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH2 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD2, R_EH2, 18);
-        R_AD3 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH3 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD3, R_EH3, 19);
-
-        R_AH0_ = _mm256_permute2x128_si256(R_AH20, R_AH20, 0x00);
-        R_AD0 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH0 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD0, R_EH0, 20);
-        R_AD1 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH1 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD1, R_EH1, 21);
-        R_AH0_ = _mm256_permute2x128_si256(R_AH20, R_AH20, 0x11);
-        R_AD2 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH2 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD2, R_EH2, 22);
-        R_AD3 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH3 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD3, R_EH3, 23);
-
-        R_AH0_ = _mm256_permute2x128_si256(R_AH24, R_AH24, 0x00);
-        R_AD0 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH0 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD0, R_EH0, 24);
-        R_AD1 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH1 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD1, R_EH1, 25);
-        R_AH0_ = _mm256_permute2x128_si256(R_AH24, R_AH24, 0x11);
-        R_AD2 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH2 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD2, R_EH2, 26);
-        R_AD3 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH3 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD3, R_EH3, 27);
-
-        R_AH0_ = _mm256_permute2x128_si256(R_AH28, R_AH28, 0x00);
-        R_AD0 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH0 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD0, R_EH0, 28);
-        R_AD1 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH1 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD1, R_EH1, 29);
-        R_AH0_ = _mm256_permute2x128_si256(R_AH28, R_AH28, 0x11);
-        R_AD2 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH2 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD2, R_EH2, 30);
-        R_AD3 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH3 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD3, R_EH3, 31);
-
-#undef COMPUTE_STEP
-      }
-
-      // Transfer the results to the result matrix.
-      if (m + 32 <= rows && n + 32 <= cols) {
-        Index i = 0;
-        for (Index j = n; j < n + 32; j++) {
-          LinearMapper r0 = res.getLinearMapper(m, j);
-          LinearMapper r1 = res.getLinearMapper(m + 8, j);
-          LinearMapper r2 = res.getLinearMapper(m + 16, j);
-          LinearMapper r3 = res.getLinearMapper(m + 24, j);
-          r0.storePacket(
-              0, _mm256_add_epi32(blockO_256[i++], r0.loadPacket(0)));
-          r1.storePacket(
-              0, _mm256_add_epi32(blockO_256[i++], r1.loadPacket(0)));
-          r2.storePacket(
-              0, _mm256_add_epi32(blockO_256[i++], r2.loadPacket(0)));
-          r3.storePacket(
-              0, _mm256_add_epi32(blockO_256[i++], r3.loadPacket(0)));
-        }
-      }
-      else {
-        for (Index j = n; j < cols; j++) {
-          for (Index i = m; i < rows; i++) {
-            res(i, j) = blockO[(j - n) * 32 + (i - m)];
-          }
-        }
-      }
-
-      // Zero the result block so it can be reused
-      memset(blockO, 0, 32 * 32 * sizeof(QInt32));
-    }
-  }
-}
-
-// Below are the fully optimized versions that are correct only for sizes that
-// are multiple of 32.  It is about a 10% performance benefit to keep these
-// implementations separate.
-
-// Arrange a block of the left input matrix in contiguous memory.
-//
-// Given column major input (A0 beside A1 in memory):
-// A0 B0 C0 D0 E0 F0 G0 H0 ...
-// A1 B1 C1 D1 E1 F1 G1 H1 ...
-// A2 B2 C2 D2 E2 F2 G2 H2 ...
-// A3 B3 C3 D3 E3 F3 G3 H3 ...
-// A4 B4 C4 D4 E4 F4 G4 H4 ...
-// A5 B5 C5 D5 E5 F5 G5 H5 ...
-// A6 B6 C6 D6 E6 F6 G6 H6 ...
-// A7 B7 C7 D7 E7 F7 G7 H7 ...
-// A8 ...
-// ...
-//
-// Packing yields output (A0 beside B0 in memory):
-// A0 B0 C0 D0
-// A1 B1 C1 D1
-// A2 B2 C2 D2
-// A3 B3 C3 D3
-// A4 B4 C4 D4
-// A5 B5 C5 D5
-// A6 B6 C6 D6
-// A7 B7 C7 D7
-// ...
-// A31 B31 C31 D31
-// E0 F0 G0 H0
-// E1 F1 G1 H1
-// E2 F2 G2 H2
-// E3 F3 G3 H3
-// E4 F4 G4 H4
-// E5 F5 G5 H5
-// E6 F6 G6 H6
-// E7 F7 G7 H7
-// ...
-//
-// Four elements of the same row are arranged contiguously because maddubs and
-// madd both perform an adjacent addition in the kernel.
-template <typename Index, typename DataMapper, int Pack1, int Pack2,
-          bool Conjugate, bool PanelMode>
-struct gemm_pack_lhs<QInt8, Index, DataMapper, Pack1, Pack2, ColMajor,
-                     Conjugate, PanelMode> {
-  EIGEN_DONT_INLINE void operator()(QInt8* blockA, const DataMapper& lhs,
-                                    Index depth, Index rows, Index stride = 0,
-                                    Index offset = 0);
-};
-
-template <typename Index, typename DataMapper, int Pack1, int Pack2,
-          bool Conjugate, bool PanelMode>
-EIGEN_DONT_INLINE void gemm_pack_lhs<QInt8, Index, DataMapper, Pack1, Pack2,
-                                     ColMajor, Conjugate, PanelMode>::
-operator()(QInt8* blockA, const DataMapper& lhs, Index depth, Index rows,
-           Index stride, Index offset) {
-  eigen_assert(stride == 0);
-  eigen_assert(offset == 0);
-
-  // Use alternate function for weird sizes
-  if (rows % 32 != 0 || depth % 32 != 0) {
-    gemm_pack_lhs_any<QInt8, Index, DataMapper, Pack1, Pack2, ColMajor, Conjugate, PanelMode> lhs_pack;
-    return lhs_pack(blockA, lhs, depth, rows, stride, offset);
-  }
-
-  // Get vector pointer
-  __m256i* blockA_256 = reinterpret_cast<__m256i*>(blockA);
-
-  // Pack rows in sets of 32
-  for (Index m = 0; m < rows; m += 32) {
-    // Pack depth in sets of 8
-    for (Index k = 0; k < depth; k += 8) {
-      // Load vectors
-      __m256i L_A = lhs.loadPacket(m, k);
-      __m256i L_B = lhs.loadPacket(m, k + 1);
-
-      // Interleave 8-bit elements
-      __m256i L_AB0_AB16 = _mm256_unpacklo_epi8(L_A, L_B);
-      __m256i L_AB8_AB24 = _mm256_unpackhi_epi8(L_A, L_B);
-
-      __m256i L_C = lhs.loadPacket(m, k + 2);
-      __m256i L_D = lhs.loadPacket(m, k + 3);
-      __m256i L_CD0_CD16 = _mm256_unpacklo_epi8(L_C, L_D);
-      __m256i L_CD8_CD24 = _mm256_unpackhi_epi8(L_C, L_D);
-
-      // Interleave 16-bit elements
-      __m256i L_AD0_AD16 = _mm256_unpacklo_epi16(L_AB0_AB16, L_CD0_CD16);
-      __m256i L_AD4_AD20 = _mm256_unpackhi_epi16(L_AB0_AB16, L_CD0_CD16);
-
-      // Use permute before we store to cross 128-bit lanes
-      __m256i L_AD0 = _mm256_permute2x128_si256(L_AD0_AD16, L_AD4_AD20, 0x20);
-      _mm256_store_si256(blockA_256++, L_AD0);
-
-      // Complete packing for 32 x 8 block
-      __m256i L_AD16 = _mm256_permute2x128_si256(L_AD0_AD16, L_AD4_AD20, 0x31);
-      __m256i L_AD8_AD24 = _mm256_unpacklo_epi16(L_AB8_AB24, L_CD8_CD24);
-      __m256i L_AD12_AD28 = _mm256_unpackhi_epi16(L_AB8_AB24, L_CD8_CD24);
-      __m256i L_AD8 = _mm256_permute2x128_si256(L_AD8_AD24, L_AD12_AD28, 0x20);
-      _mm256_store_si256(blockA_256++, L_AD8);
-      _mm256_store_si256(blockA_256++, L_AD16);
-      __m256i L_AD24 = _mm256_permute2x128_si256(L_AD8_AD24, L_AD12_AD28, 0x31);
-      _mm256_store_si256(blockA_256++, L_AD24);
-      __m256i L_E = lhs.loadPacket(m, k + 4);
-      __m256i L_F = lhs.loadPacket(m, k + 5);
-      __m256i L_EF0_EF16 = _mm256_unpacklo_epi8(L_E, L_F);
-      __m256i L_EF8_EF24 = _mm256_unpackhi_epi8(L_E, L_F);
-      __m256i L_G = lhs.loadPacket(m, k + 6);
-      __m256i L_H = lhs.loadPacket(m, k + 7);
-      __m256i L_GH0_GH16 = _mm256_unpacklo_epi8(L_G, L_H);
-      __m256i L_GH8_GH24 = _mm256_unpackhi_epi8(L_G, L_H);
-      __m256i L_EH0_EH16 = _mm256_unpacklo_epi16(L_EF0_EF16, L_GH0_GH16);
-      __m256i L_EH4_EH20 = _mm256_unpackhi_epi16(L_EF0_EF16, L_GH0_GH16);
-      __m256i L_EH0 = _mm256_permute2x128_si256(L_EH0_EH16, L_EH4_EH20, 0x20);
-      _mm256_store_si256(blockA_256++, L_EH0);
-      __m256i L_EH16 = _mm256_permute2x128_si256(L_EH0_EH16, L_EH4_EH20, 0x31);
-      __m256i L_EH8_EH24 = _mm256_unpacklo_epi16(L_EF8_EF24, L_GH8_GH24);
-      __m256i L_EH12_EH28 = _mm256_unpackhi_epi16(L_EF8_EF24, L_GH8_GH24);
-      __m256i L_EH8 = _mm256_permute2x128_si256(L_EH8_EH24, L_EH12_EH28, 0x20);
-      _mm256_store_si256(blockA_256++, L_EH8);
-      _mm256_store_si256(blockA_256++, L_EH16);
-      __m256i L_EH24 = _mm256_permute2x128_si256(L_EH8_EH24, L_EH12_EH28, 0x31);
-      _mm256_store_si256(blockA_256++, L_EH24);
-    }
-  }
-}
-
-// Arrange a block of the right input matrix in contiguous memory.
-//
-// Given column major input (A0 beside A1 in memory):
-// A0 B0 C0 D0 E0 F0 G0 H0 ...
-// A1 B1 C1 D1 E1 F1 G1 H1 ...
-// A2 B2 C2 D2 E2 F2 G2 H2 ...
-// A3 B3 C3 D3 E3 F3 G3 H3 ...
-// A4 B4 C4 D4 E4 F4 G4 H4 ...
-// A5 B5 C5 D5 E5 F5 G5 H5 ...
-// A6 B6 C6 D6 E6 F6 G6 H6 ...
-// A7 B7 C7 D7 E7 F7 G7 H7 ...
-// A8 ...
-// ...
-//
-// Packing yields row major output (A0 beside A1 in memory):
-// A0 A1 A2 A3 A4 A5 A6 A7
-// B0 B1 B2 B3 B4 B5 B6 B7
-// ...
-//
-// At least four elements of the same col are arranged contiguously because
-// maddubs and madd both perform an adjacent addition in the kernel.  We can
-// save work by leaving 8 adjacent elements because kr = 8.
-template <typename Index, typename DataMapper, int nr, bool Conjugate,
-          bool PanelMode>
-struct gemm_pack_rhs<QUInt8, Index, DataMapper, nr, ColMajor, Conjugate,
-                     PanelMode> {
-  EIGEN_DONT_INLINE void operator()(QUInt8* blockB, const DataMapper& rhs,
-                                    Index depth, Index cols, Index stride = 0,
-                                    Index offset = 0);
-};
-
-template <typename Index, typename DataMapper, int nr, bool Conjugate,
-          bool PanelMode>
-EIGEN_DONT_INLINE void gemm_pack_rhs<QUInt8, Index, DataMapper, nr, ColMajor,
-                                     Conjugate, PanelMode>::
-operator()(QUInt8* blockB, const DataMapper& rhs, Index depth, Index cols,
-           Index stride, Index offset) {
-  eigen_assert(stride == 0);
-  eigen_assert(offset == 0);
-
-  // Use alternate function for weird sizes
-  if (cols % 32 != 0 || depth % 32 != 0) {
-    gemm_pack_rhs_any<QUInt8, Index, DataMapper, nr, ColMajor, Conjugate, PanelMode> rhs_pack;
-    return rhs_pack(blockB, rhs, depth, cols, stride, offset);
-  }
-
-  // Get vector pointer
-  __m256i* blockB_256 = reinterpret_cast<__m256i*>(blockB);
-
-  // Perform a step of the packing for 4 columns
-  __m256i R_AB_L, R_AB_H, R_CD_L, R_CD_H, R_AD_0, R_AD_8, R_AD_16, R_AD_24;
-#define PACK_STEP                                            \
-  R_AB_L = _mm256_unpacklo_epi64(R_A, R_B);                  \
-  R_CD_L = _mm256_unpacklo_epi64(R_C, R_D);                  \
-  R_AB_H = _mm256_unpackhi_epi64(R_A, R_B);                  \
-  R_CD_H = _mm256_unpackhi_epi64(R_C, R_D);                  \
-  R_AD_0 = _mm256_permute2x128_si256(R_AB_L, R_CD_L, 0x20);  \
-  R_AD_16 = _mm256_permute2x128_si256(R_AB_L, R_CD_L, 0x31); \
-  R_AD_8 = _mm256_permute2x128_si256(R_AB_H, R_CD_H, 0x20);  \
-  R_AD_24 = _mm256_permute2x128_si256(R_AB_H, R_CD_H, 0x31); \
-  _mm256_store_si256(blockB_256, R_AD_0);                    \
-  _mm256_store_si256(blockB_256 + 8, R_AD_8);                \
-  _mm256_store_si256(blockB_256 + 16, R_AD_16);              \
-  _mm256_store_si256(blockB_256 + 24, R_AD_24);              \
-  blockB_256++;
-
-  // Pack cols in sets of 32
-  for (Index n = 0; n < cols; n += 32) {
-    // Pack depth in sets of 32
-    for (Index k = 0; k < depth; k += 32) {
-      __m256i R_A = rhs.loadPacket(k, n);
-      __m256i R_B = rhs.loadPacket(k, n + 1);
-      __m256i R_C = rhs.loadPacket(k, n + 2);
-      __m256i R_D = rhs.loadPacket(k, n + 3);
-      PACK_STEP;
-
-      R_A = rhs.loadPacket(k, n + 4);
-      R_B = rhs.loadPacket(k, n + 5);
-      R_C = rhs.loadPacket(k, n + 6);
-      R_D = rhs.loadPacket(k, n + 7);
-      PACK_STEP;
-
-      R_A = rhs.loadPacket(k, n + 8);
-      R_B = rhs.loadPacket(k, n + 9);
-      R_C = rhs.loadPacket(k, n + 10);
-      R_D = rhs.loadPacket(k, n + 11);
-      PACK_STEP;
-
-      R_A = rhs.loadPacket(k, n + 12);
-      R_B = rhs.loadPacket(k, n + 13);
-      R_C = rhs.loadPacket(k, n + 14);
-      R_D = rhs.loadPacket(k, n + 15);
-      PACK_STEP;
-
-      R_A = rhs.loadPacket(k, n + 16);
-      R_B = rhs.loadPacket(k, n + 17);
-      R_C = rhs.loadPacket(k, n + 18);
-      R_D = rhs.loadPacket(k, n + 19);
-      PACK_STEP;
-
-      R_A = rhs.loadPacket(k, n + 20);
-      R_B = rhs.loadPacket(k, n + 21);
-      R_C = rhs.loadPacket(k, n + 22);
-      R_D = rhs.loadPacket(k, n + 23);
-      PACK_STEP;
-
-      R_A = rhs.loadPacket(k, n + 24);
-      R_B = rhs.loadPacket(k, n + 25);
-      R_C = rhs.loadPacket(k, n + 26);
-      R_D = rhs.loadPacket(k, n + 27);
-      PACK_STEP;
-
-      R_A = rhs.loadPacket(k, n + 28);
-      R_B = rhs.loadPacket(k, n + 29);
-      R_C = rhs.loadPacket(k, n + 30);
-      R_D = rhs.loadPacket(k, n + 31);
-      PACK_STEP;
-
-      blockB_256 += 24;
-    }
-  }
-#undef PACK_STEP
-}
-
-// Perform the actual multiplication on packed inputs
-template<typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs>
-struct gebp_kernel<QInt8, QUInt8, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs>
-{
-  typedef typename DataMapper::LinearMapper LinearMapper;
-
-  EIGEN_DONT_INLINE
-  void operator()(const DataMapper& res, const QInt8* blockA, const QUInt8* blockB,
-                  Index rows, Index depth, Index cols, QInt32 alpha,
-                  Index strideA=-1, Index strideB=-1, Index offsetA=0, Index offsetB=0);
-};
-
-template<typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs>
-EIGEN_DONT_INLINE
-void gebp_kernel<QInt8, QUInt8, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs>
-::operator()(const DataMapper& res, const QInt8* blockA, const QUInt8* blockB,
-             Index rows, Index depth, Index cols, QInt32 alpha,
-             Index strideA, Index strideB, Index offsetA, Index offsetB)
-{
-  EIGEN_STATIC_ASSERT(!ConjugateLhs, YOU_MADE_A_PROGRAMMING_MISTAKE);
-  EIGEN_STATIC_ASSERT(!ConjugateRhs, YOU_MADE_A_PROGRAMMING_MISTAKE);
-  eigen_assert(alpha.value == 1);
-  eigen_assert(strideA == -1);
-  eigen_assert(strideB == -1);
-  eigen_assert(offsetA == 0);
-  eigen_assert(offsetB == 0);
-  eigen_assert(rows > 0);
-  eigen_assert(cols > 0);
-  eigen_assert(depth > 0);
-  eigen_assert(blockA);
-  eigen_assert(blockB);
-
-  // Use alternate function for weird sizes
-  if (rows % 32 != 0 || cols % 32 != 0 || depth % 32 != 0) {
-    gebp_kernel_any<QInt8, QUInt8, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs> gebp;
-    return gebp(res, blockA, blockB, rows, depth, cols, alpha, strideA, strideB, offsetA, offsetB);
-  }
-
-  // Create result block
-  QInt32* blockO = aligned_new<QInt32>(32 * 32);
-  // Allocating the result block is about 5-10% faster than declaring stack
-  // space.  It is unclear why this is the case.
-  // ei_declare_aligned_stack_constructed_variable(QInt32, blockO, 32 * 32, 0);
-  memset(blockO, 0, 32 * 32 * sizeof(QInt32));
-
-  // Get vectorized pointers
-  __m256i* blockO_256 = reinterpret_cast<__m256i*>(blockO);
-  const __m256i* blockA_256 = reinterpret_cast<const __m256i*>(blockA);
-  const __m256i* blockB_256 = reinterpret_cast<const __m256i*>(blockB);
-
-  // Loop over blocks of 32 columns
-  for (Index n = 0; n < cols; n += 32) {
-    // Reset index into blockA
-    Index indexL = 0;
-    // Loop over blocks of 32 rows
-    for (Index m = 0; m < rows; m += 32) {
-      // Reset index into blockB
-      Index indexR = n / 32 * depth;
-      // Loop over blocks of 8 on depth
-      for (Index k = 0; k < depth; k += 8) {
-        // Load inputs
-        __m256i L_AD0 = blockA_256[indexL++];
-        __m256i L_AD8 = blockA_256[indexL++];
-        __m256i L_AD16 = blockA_256[indexL++];
-        __m256i L_AD24 = blockA_256[indexL++];
-        __m256i L_EH0 = blockA_256[indexL++];
-        __m256i L_EH8 = blockA_256[indexL++];
-        __m256i L_EH16 = blockA_256[indexL++];
-        __m256i L_EH24 = blockA_256[indexL++];
-        __m256i R_AH0 = blockB_256[indexR++];
-        __m256i R_AH4 = blockB_256[indexR++];
-        __m256i R_AH8 = blockB_256[indexR++];
-        __m256i R_AH12 = blockB_256[indexR++];
-        __m256i R_AH16 = blockB_256[indexR++];
-        __m256i R_AH20 = blockB_256[indexR++];
-        __m256i R_AH24 = blockB_256[indexR++];
-        __m256i R_AH28 = blockB_256[indexR++];
-
-        // This constant is used with madd to convert 16 bit to 32 bit
-        const __m256i ONE = _mm256_set1_epi32(0x00010001);
-
-        // Declare variables used in COMPUTE_STEP
-        __m256i P_16_A, P_16_B, P_32_A, P_32_B, P_32;
-
-#define COMPUTE_STEP(R_INPUT_A, R_INPUT_B, OFFSET)                             \
-  P_16_A = _mm256_maddubs_epi16(R_INPUT_A, L_AD0);                             \
-  P_32_A = _mm256_madd_epi16(P_16_A, ONE);                                     \
-  P_16_B = _mm256_maddubs_epi16(R_INPUT_B, L_EH0);                             \
-  P_32_B = _mm256_madd_epi16(P_16_B, ONE);                                     \
-  P_32 = _mm256_add_epi32(P_32_A, P_32_B);                                     \
-  _mm256_store_si256(                                                          \
-      blockO_256 + 4 * OFFSET,                                                 \
-      _mm256_add_epi32(_mm256_load_si256(blockO_256 + 4 * OFFSET), P_32));     \
-                                                                               \
-  P_16_A = _mm256_maddubs_epi16(R_INPUT_A, L_AD8);                             \
-  P_32_A = _mm256_madd_epi16(P_16_A, ONE);                                     \
-  P_16_B = _mm256_maddubs_epi16(R_INPUT_B, L_EH8);                             \
-  P_32_B = _mm256_madd_epi16(P_16_B, ONE);                                     \
-  P_32 = _mm256_add_epi32(P_32_A, P_32_B);                                     \
-  _mm256_store_si256(                                                          \
-      blockO_256 + 4 * OFFSET + 1,                                             \
-      _mm256_add_epi32(_mm256_load_si256(blockO_256 + 4 * OFFSET + 1), P_32)); \
-                                                                               \
-  P_16_A = _mm256_maddubs_epi16(R_INPUT_A, L_AD16);                            \
-  P_32_A = _mm256_madd_epi16(P_16_A, ONE);                                     \
-  P_16_B = _mm256_maddubs_epi16(R_INPUT_B, L_EH16);                            \
-  P_32_B = _mm256_madd_epi16(P_16_B, ONE);                                     \
-  P_32 = _mm256_add_epi32(P_32_A, P_32_B);                                     \
-  _mm256_store_si256(                                                          \
-      blockO_256 + 4 * OFFSET + 2,                                             \
-      _mm256_add_epi32(_mm256_load_si256(blockO_256 + 4 * OFFSET + 2), P_32)); \
-                                                                               \
-  P_16_A = _mm256_maddubs_epi16(R_INPUT_A, L_AD24);                            \
-  P_32_A = _mm256_madd_epi16(P_16_A, ONE);                                     \
-  P_16_B = _mm256_maddubs_epi16(R_INPUT_B, L_EH24);                            \
-  P_32_B = _mm256_madd_epi16(P_16_B, ONE);                                     \
-  P_32 = _mm256_add_epi32(P_32_A, P_32_B);                                     \
-  _mm256_store_si256(                                                          \
-      blockO_256 + 4 * OFFSET + 3,                                             \
-      _mm256_add_epi32(_mm256_load_si256(blockO_256 + 4 * OFFSET + 3), P_32));
-
-        // Permute and shuffle to copy a single value across the entire vector
-        // Then compute the multiplication
-        __m256i R_AH0_ = _mm256_permute2x128_si256(R_AH0, R_AH0, 0x00);
-        __m256i R_AD0 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        __m256i R_EH0 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD0, R_EH0, 0);
-        __m256i R_AD1 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        __m256i R_EH1 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD1, R_EH1, 1);
-        R_AH0_ = _mm256_permute2x128_si256(R_AH0, R_AH0, 0x11);
-        __m256i R_AD2 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        __m256i R_EH2 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD2, R_EH2, 2);
-        __m256i R_AD3 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        __m256i R_EH3 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD3, R_EH3, 3);
-
-        R_AH0_ = _mm256_permute2x128_si256(R_AH4, R_AH4, 0x00);
-        R_AD0 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH0 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD0, R_EH0, 4);
-        R_AD1 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH1 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD1, R_EH1, 5);
-        R_AH0_ = _mm256_permute2x128_si256(R_AH4, R_AH4, 0x11);
-        R_AD2 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH2 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD2, R_EH2, 6);
-        R_AD3 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH3 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD3, R_EH3, 7);
-
-        R_AH0_ = _mm256_permute2x128_si256(R_AH8, R_AH8, 0x00);
-        R_AD0 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH0 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD0, R_EH0, 8);
-        R_AD1 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH1 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD1, R_EH1, 9);
-        R_AH0_ = _mm256_permute2x128_si256(R_AH8, R_AH8, 0x11);
-        R_AD2 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH2 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD2, R_EH2, 10);
-        R_AD3 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH3 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD3, R_EH3, 11);
-
-        R_AH0_ = _mm256_permute2x128_si256(R_AH12, R_AH12, 0x00);
-        R_AD0 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH0 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD0, R_EH0, 12);
-        R_AD1 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH1 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD1, R_EH1, 13);
-        R_AH0_ = _mm256_permute2x128_si256(R_AH12, R_AH12, 0x11);
-        R_AD2 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH2 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD2, R_EH2, 14);
-        R_AD3 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH3 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD3, R_EH3, 15);
-
-        R_AH0_ = _mm256_permute2x128_si256(R_AH16, R_AH16, 0x00);
-        R_AD0 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH0 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD0, R_EH0, 16);
-        R_AD1 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH1 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD1, R_EH1, 17);
-        R_AH0_ = _mm256_permute2x128_si256(R_AH16, R_AH16, 0x11);
-        R_AD2 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH2 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD2, R_EH2, 18);
-        R_AD3 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH3 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD3, R_EH3, 19);
-
-        R_AH0_ = _mm256_permute2x128_si256(R_AH20, R_AH20, 0x00);
-        R_AD0 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH0 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD0, R_EH0, 20);
-        R_AD1 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH1 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD1, R_EH1, 21);
-        R_AH0_ = _mm256_permute2x128_si256(R_AH20, R_AH20, 0x11);
-        R_AD2 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH2 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD2, R_EH2, 22);
-        R_AD3 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH3 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD3, R_EH3, 23);
-
-        R_AH0_ = _mm256_permute2x128_si256(R_AH24, R_AH24, 0x00);
-        R_AD0 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH0 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD0, R_EH0, 24);
-        R_AD1 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH1 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD1, R_EH1, 25);
-        R_AH0_ = _mm256_permute2x128_si256(R_AH24, R_AH24, 0x11);
-        R_AD2 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH2 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD2, R_EH2, 26);
-        R_AD3 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH3 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD3, R_EH3, 27);
-
-        R_AH0_ = _mm256_permute2x128_si256(R_AH28, R_AH28, 0x00);
-        R_AD0 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH0 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD0, R_EH0, 28);
-        R_AD1 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH1 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD1, R_EH1, 29);
-        R_AH0_ = _mm256_permute2x128_si256(R_AH28, R_AH28, 0x11);
-        R_AD2 = _mm256_shuffle_epi32(R_AH0_, 0x00);
-        R_EH2 = _mm256_shuffle_epi32(R_AH0_, 0x55);
-        COMPUTE_STEP(R_AD2, R_EH2, 30);
-        R_AD3 = _mm256_shuffle_epi32(R_AH0_, 0xAA);
-        R_EH3 = _mm256_shuffle_epi32(R_AH0_, 0xFF);
-        COMPUTE_STEP(R_AD3, R_EH3, 31);
-
-#undef COMPUTE_STEP
-      }
-
-      // Transfer the results to the result matrix
-      Index i = 0;
-      for (Index j = n; j < n + 32; j++) {
-        LinearMapper r0 = res.getLinearMapper(m, j);
-        LinearMapper r1 = res.getLinearMapper(m + 8, j);
-        LinearMapper r2 = res.getLinearMapper(m + 16, j);
-        LinearMapper r3 = res.getLinearMapper(m + 24, j);
-        r0.storePacket(
-            0, _mm256_add_epi32(blockO_256[i++], r0.loadPacket(0)));
-        r1.storePacket(
-            0, _mm256_add_epi32(blockO_256[i++], r1.loadPacket(0)));
-        r2.storePacket(
-            0, _mm256_add_epi32(blockO_256[i++], r2.loadPacket(0)));
-        r3.storePacket(
-            0, _mm256_add_epi32(blockO_256[i++], r3.loadPacket(0)));
-      }
-
-      // Zero the result block so it can be reused
-      memset(blockO, 0, 32 * 32 * sizeof(QInt32));
-    }
-  }
-  aligned_delete(blockO, 32 * 32);
-}
-
-#endif  // EIGEN_USE_OPTIMIZED_INT8_UINT8_MAT_MAT_PRODUCT
-
-}  // namespace internal
-}  // namespace Eigen
-
-#endif  // EIGEN_CXX11_FIXED_POINT_MAT_MAT_PRODUCT_AVX2_H
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductNEON.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductNEON.h
deleted file mode 100644
index 99894ca..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductNEON.h
+++ /dev/null
@@ -1,95 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>
-// Copyright (C) 2015 Benoit Jacob <benoitjacob@google.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#ifndef EIGEN_CXX11_FIXED_POINT_MAT_MAT_PRODUCT_NEON_H
-#define EIGEN_CXX11_FIXED_POINT_MAT_MAT_PRODUCT_NEON_H
-
-
-namespace Eigen {
-namespace internal {
-
-
-// AVX2 optimized implementation of the case where the lhs is encoded using signed 8bit
-// integers and the rhs using unsigned 8bit integers.
-#ifdef EIGEN_USE_OPTIMIZED_INT8_UINT8_MAT_MAT_PRODUCT
-
-template<bool _ConjLhs, bool _ConjRhs>
-class gebp_traits<QInt8, QUInt8, _ConjLhs, _ConjRhs>
-{
-public:
-  typedef QInt8 LhsScalar;
-  typedef QUInt8 RhsScalar;
-  typedef QInt32 ResScalar;
-
-  enum {
-    // register block size along the M and N directions
-    // One for the current implementation
-    nr = 1,
-    mr = 1,
-    // Progress made at each iteration of the product loop
-    // also 1 for the current implementation
-    LhsProgress = 1,
-    RhsProgress = 1
-  };
-};
-
-// Mat-Mat product of a signed 8bit lhs with an unsigned 8bit rhs
-template<typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs>
-struct gebp_kernel<QInt8, QUInt8, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs>
-{
-  EIGEN_DONT_INLINE
-  void operator()(const DataMapper& res, const QInt8* blockA, const QUInt8* blockB,
-                  Index rows, Index depth, Index cols, QInt32 alpha,
-                  Index strideA=-1, Index strideB=-1, Index offsetA=0, Index offsetB=0);
-};
-
-template<typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs>
-EIGEN_DONT_INLINE
-void gebp_kernel<QInt8, QUInt8, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs>
-::operator()(const DataMapper& res, const QInt8* blockA, const QUInt8* blockB,
-             Index rows, Index depth, Index cols, QInt32 alpha,
-             Index strideA, Index strideB, Index offsetA, Index offsetB)
-{
-  EIGEN_STATIC_ASSERT(!ConjugateLhs, YOU_MADE_A_PROGRAMMING_MISTAKE);
-  EIGEN_STATIC_ASSERT(!ConjugateRhs, YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-  eigen_assert(alpha.value == 1);
-  eigen_assert(strideA == -1);
-  eigen_assert(strideB == -1);
-  eigen_assert(offsetA == 0);
-  eigen_assert(offsetB == 0);
-
-  eigen_assert(rows > 0);
-  eigen_assert(cols > 0);
-  eigen_assert(depth > 0);
-  eigen_assert(blockA);
-  eigen_assert(blockB);
-
-  for (Index j = 0; j < cols; ++j) {
-    Index startB = j * depth;
-
-    for (Index i = 0; i < rows; ++i) {
-      Index startA = i * depth;
-
-      for (Index k = 0; k < depth; ++k) {
-        res(i, j) += blockA[startA + k] * blockB[startB + k];
-      }
-    }
-  }
-}
-#endif
-
-
-}  // namespace internal
-}  // namespace Eigen
-
-
-
-#endif  // EIGEN_CXX11_FIXED_POINT_MAT_MAT_PRODUCT_NEON_H
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatVecProduct.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatVecProduct.h
deleted file mode 100644
index 18b5085..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatVecProduct.h
+++ /dev/null
@@ -1,123 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#ifndef EIGEN_CXX11_FIXED_POINT_MAT_VEC_PRODUCT_H
-#define EIGEN_CXX11_FIXED_POINT_MAT_VEC_PRODUCT_H
-
-
-namespace Eigen {
-namespace internal {
-
-// Mat-Vec product
-// Both lhs and rhs are encoded as 8bit signed integers
-template<typename Index, typename LhsMapper, bool ConjugateLhs, typename RhsMapper, bool ConjugateRhs, int Version>
-struct general_matrix_vector_product<Index,QInt8,LhsMapper,ColMajor,ConjugateLhs,QInt8,RhsMapper,ConjugateRhs,Version>
-{
-EIGEN_DONT_INLINE static void run(
-  Index rows, Index cols,
-  const LhsMapper& lhs,
-  const RhsMapper& rhs,
-  QInt32* res, Index resIncr,
-  QInt8 alpha);
-};
-
-template<typename Index, typename LhsMapper, bool ConjugateLhs, typename RhsMapper, bool ConjugateRhs, int Version>
-EIGEN_DONT_INLINE void general_matrix_vector_product<Index,QInt8,LhsMapper,ColMajor,ConjugateLhs,QInt8,RhsMapper,ConjugateRhs,Version>::run(
-    Index rows, Index cols,
-    const LhsMapper& lhs,
-    const RhsMapper& rhs,
-    QInt32* res, Index resIncr,
-    QInt8 alpha)
-{
-  eigen_assert(alpha.value == 1);
-  eigen_assert(resIncr == 1);
-  eigen_assert(rows > 0);
-  eigen_assert(cols > 0);
-
-  for (Index i = 0; i < rows; ++i) {
-    for (Index j = 0; j < cols; ++j) {
-      res[i] += lhs(i, j) * rhs(j, 0);
-    }
-  }
-}
-
-
-// Mat-Vec product
-// The lhs is encoded using 8bit signed integers, the rhs using 8bit unsigned integers
-template<typename Index, typename LhsMapper, bool ConjugateLhs, typename RhsMapper, bool ConjugateRhs, int Version>
-struct general_matrix_vector_product<Index,QInt8,LhsMapper,ColMajor,ConjugateLhs,QUInt8,RhsMapper,ConjugateRhs,Version>
-{
-EIGEN_DONT_INLINE static void run(
-  Index rows, Index cols,
-  const LhsMapper& lhs,
-  const RhsMapper& rhs,
-  QInt32* res, Index resIncr,
-  QUInt8 alpha);
-};
-
-template<typename Index, typename LhsMapper, bool ConjugateLhs, typename RhsMapper, bool ConjugateRhs, int Version>
-EIGEN_DONT_INLINE void general_matrix_vector_product<Index,QInt8,LhsMapper,ColMajor,ConjugateLhs,QUInt8,RhsMapper,ConjugateRhs,Version>::run(
-    Index rows, Index cols,
-    const LhsMapper& lhs,
-    const RhsMapper& rhs,
-    QInt32* res, Index resIncr,
-    QUInt8 alpha)
-{
-  eigen_assert(alpha.value == 1);
-  eigen_assert(resIncr == 1);
-  eigen_assert(rows > 0);
-  eigen_assert(cols > 0);
-
-  for (Index i = 0; i < rows; ++i) {
-    for (Index j = 0; j < cols; ++j) {
-      res[i] += lhs(i, j) * rhs(j, 0);
-    }
-  }
-}
-
-
-// Mat-Vec product
-// The lhs is encoded using bit unsigned integers, the rhs using 8bit signed integers
-template<typename Index, typename LhsMapper, bool ConjugateLhs, typename RhsMapper, bool ConjugateRhs, int Version>
-struct general_matrix_vector_product<Index,QUInt8,LhsMapper,ColMajor,ConjugateLhs,QInt8,RhsMapper,ConjugateRhs,Version>
-{
-EIGEN_DONT_INLINE static void run(
-  Index rows, Index cols,
-  const LhsMapper& lhs,
-  const RhsMapper& rhs,
-  QInt32* res, Index resIncr,
-  QInt8 alpha);
-};
-
-template<typename Index, typename LhsMapper, bool ConjugateLhs, typename RhsMapper, bool ConjugateRhs, int Version>
-EIGEN_DONT_INLINE void general_matrix_vector_product<Index,QUInt8,LhsMapper,ColMajor,ConjugateLhs,QInt8,RhsMapper,ConjugateRhs,Version>::run(
-    Index rows, Index cols,
-    const LhsMapper& lhs,
-    const RhsMapper& rhs,
-    QInt32* res, Index resIncr,
-    QInt8 alpha)
-{
-  eigen_assert(alpha.value == 1);
-  eigen_assert(resIncr == 1);
-  eigen_assert(rows > 0);
-  eigen_assert(cols > 0);
-
-  for (Index i = 0; i < rows; ++i) {
-    for (Index j = 0; j < cols; ++j) {
-      res[i] += lhs(i, j) * rhs(j, 0);
-    }
-  }
-}
-
-}  // namespace internal
-}  // namespace Eigen
-
-
-
-#endif  // EIGEN_CXX11_FIXED_POINT_MAT_VEC_PRODUCT_H
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/PacketMathAVX2.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/PacketMathAVX2.h
deleted file mode 100644
index cb16362..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/PacketMathAVX2.h
+++ /dev/null
@@ -1,505 +0,0 @@
-#ifndef EIGEN3_UNSUPPORTED_EIGEN_CXX11_SRC_FIXEDPOINT_PACKETMATHAVX2_H_
-#define EIGEN3_UNSUPPORTED_EIGEN_CXX11_SRC_FIXEDPOINT_PACKETMATHAVX2_H_
-
-#ifdef _MSC_VER
-
-#include <immintrin.h>
-#include <emmintrin.h>
-#include <smmintrin.h>
-
-#endif
-
-inline int _mm256_extract_epi16_N0(const __m256i X)
-{
-	return _mm_extract_epi16(_mm256_extractf128_si256(X, 0 >> 3), 0 % 8);
-}
-
-inline int _mm256_extract_epi16_N1(const __m256i X)
-{
-	return _mm_extract_epi16(_mm256_extractf128_si256(X, 1 >> 3), 1 % 8);
-}
-
-inline int _mm256_extract_epi8_N0(const __m256i X)
-{
-	return _mm_extract_epi8(_mm256_extractf128_si256((X), 0 >> 4), 0 % 16);
-}
-
-inline int _mm256_extract_epi8_N1(const __m256i X)
-{
-	return _mm_extract_epi8(_mm256_extractf128_si256((X), 1 >> 4), 1 % 16);
-}
-
-
-namespace Eigen {
-namespace internal {
-
-typedef struct Packet32q8i {
-  __m256i val;
-  operator __m256i() const { return val; }
-  Packet32q8i();
-  Packet32q8i(__m256i val) : val(val) {}
-} Packet32q8i;
-
-typedef struct Packet16q16i {
-  __m256i val;
-  operator __m256i() const { return val; }
-  Packet16q16i();
-  Packet16q16i(__m256i val) : val(val) {}
-} Packet16q16i;
-
-typedef struct Packet32q8u {
-  __m256i val;
-  operator __m256i() const { return val; }
-  Packet32q8u();
-  Packet32q8u(__m256i val) : val(val) {}
-} Packet32q8u;
-
-typedef struct Packet16q8i {
-  __m128i val;
-  operator __m128i() const { return val; }
-  Packet16q8i();
-  Packet16q8i(__m128i val) : val(val) {}
-} Packet16q8i;
-
-typedef struct Packet16q8u {
-  __m128i val;
-  operator __m128i() const { return val; }
-  Packet16q8u();
-  Packet16q8u(__m128i val) : val(val) {}
-} Packet16q8u;
-
-typedef struct Packet8q16i {
-  __m128i val;
-  operator __m128i() const { return val; }
-  Packet8q16i();
-  Packet8q16i(__m128i val) : val(val) {}
-} Packet8q16i;
-
-typedef struct Packet8q32i {
-  __m256i val;
-  operator __m256i() const { return val; }
-  Packet8q32i();
-  Packet8q32i(__m256i val) : val(val) {}
-} Packet8q32i;
-
-typedef struct Packet4q32i {
-  __m128i val;
-  operator __m128i() const { return val; }
-  Packet4q32i();
-  Packet4q32i(__m128i val) : val(val) {}
-} Packet4q32i;
-
-#ifndef EIGEN_VECTORIZE_AVX512
-template <>
-struct packet_traits<QInt8> : default_packet_traits {
-  typedef Packet32q8i type;
-  typedef Packet16q8i half;
-  enum {
-    Vectorizable = 1,
-    AlignedOnScalar = 1,
-    size = 32,
-  };
-  enum {
-    HasAdd = 0,
-    HasSub = 0,
-    HasMul = 0,
-    HasNegate = 0,
-    HasAbs = 0,
-    HasAbs2 = 0,
-    HasMin = 1,
-    HasMax = 1,
-    HasConj = 0,
-    HasSetLinear = 0
-  };
-};
-template <>
-struct packet_traits<QUInt8> : default_packet_traits {
-  typedef Packet32q8u type;
-  typedef Packet16q8u half;
-  enum {
-    Vectorizable = 1,
-    AlignedOnScalar = 1,
-    size = 32,
-  };
-  enum {
-    HasAdd = 0,
-    HasSub = 0,
-    HasMul = 0,
-    HasNegate = 0,
-    HasAbs = 0,
-    HasAbs2 = 0,
-    HasMin = 1,
-    HasMax = 1,
-    HasConj = 0,
-    HasSetLinear = 0
-  };
-};
-template <>
-struct packet_traits<QInt16> : default_packet_traits {
-  typedef Packet16q16i type;
-  typedef Packet8q16i half;
-  enum {
-    Vectorizable = 1,
-    AlignedOnScalar = 1,
-    size = 16,
-  };
-  enum {
-    HasAdd = 0,
-    HasSub = 0,
-    HasMul = 0,
-    HasNegate = 0,
-    HasAbs = 0,
-    HasAbs2 = 0,
-    HasMin = 1,
-    HasMax = 1,
-    HasConj = 0,
-    HasSetLinear = 0
-  };
-};
-template <>
-struct packet_traits<QInt32> : default_packet_traits {
-  typedef Packet8q32i type;
-  typedef Packet4q32i half;
-  enum {
-    Vectorizable = 1,
-    AlignedOnScalar = 1,
-    size = 8,
-  };
-  enum {
-    HasAdd = 1,
-    HasSub = 1,
-    HasMul = 1,
-    HasNegate = 1,
-    HasAbs = 0,
-    HasAbs2 = 0,
-    HasMin = 1,
-    HasMax = 1,
-    HasConj = 0,
-    HasSetLinear = 0
-  };
-};
-#endif
-
-template <>
-struct unpacket_traits<Packet32q8i> {
-  typedef QInt8 type;
-  typedef Packet16q8i half;
-  enum { size = 32, alignment=Aligned32 };
-};
-template <>
-struct unpacket_traits<Packet16q16i> {
-  typedef QInt16 type;
-  typedef Packet8q16i half;
-  enum { size = 16, alignment=Aligned32 };
-};
-template <>
-struct unpacket_traits<Packet32q8u> {
-  typedef QUInt8 type;
-  typedef Packet16q8u half;
-  enum { size = 32, alignment=Aligned32 };
-};
-template <>
-struct unpacket_traits<Packet8q32i> {
-  typedef QInt32 type;
-  typedef Packet4q32i half;
-  enum { size = 8, alignment=Aligned32 };
-};
-
-// Unaligned load
-template <>
-EIGEN_STRONG_INLINE Packet32q8i ploadu<Packet32q8i>(const QInt8* from) {
-  EIGEN_DEBUG_UNALIGNED_LOAD return _mm256_loadu_si256(
-      reinterpret_cast<const __m256i*>(from));
-}
-template <>
-EIGEN_STRONG_INLINE Packet32q8u ploadu<Packet32q8u>(const QUInt8* from) {
-  EIGEN_DEBUG_UNALIGNED_LOAD return _mm256_loadu_si256(
-      reinterpret_cast<const __m256i*>(from));
-}
-template <>
-EIGEN_STRONG_INLINE Packet16q16i ploadu<Packet16q16i>(const QInt16* from) {
-  EIGEN_DEBUG_UNALIGNED_LOAD return _mm256_loadu_si256(
-      reinterpret_cast<const __m256i*>(from));
-}
-template <>
-EIGEN_STRONG_INLINE Packet8q32i ploadu<Packet8q32i>(const QInt32* from) {
-  EIGEN_DEBUG_UNALIGNED_LOAD return _mm256_loadu_si256(
-      reinterpret_cast<const __m256i*>(from));
-}
-
-// Aligned load
-template <>
-EIGEN_STRONG_INLINE Packet32q8i pload<Packet32q8i>(const QInt8* from) {
-  EIGEN_DEBUG_ALIGNED_LOAD return _mm256_load_si256(
-      reinterpret_cast<const __m256i*>(from));
-}
-template <>
-EIGEN_STRONG_INLINE Packet32q8u pload<Packet32q8u>(const QUInt8* from) {
-  EIGEN_DEBUG_ALIGNED_LOAD return _mm256_load_si256(
-      reinterpret_cast<const __m256i*>(from));
-}
-template <>
-EIGEN_STRONG_INLINE Packet16q16i pload<Packet16q16i>(const QInt16* from) {
-  EIGEN_DEBUG_ALIGNED_LOAD return _mm256_load_si256(
-      reinterpret_cast<const __m256i*>(from));
-}
-template <>
-EIGEN_STRONG_INLINE Packet8q32i pload<Packet8q32i>(const QInt32* from) {
-  EIGEN_DEBUG_ALIGNED_LOAD return _mm256_load_si256(
-      reinterpret_cast<const __m256i*>(from));
-}
-
-// Unaligned store
-template <>
-EIGEN_STRONG_INLINE void pstoreu<QInt8>(QInt8* to, const Packet32q8i& from) {
-  EIGEN_DEBUG_UNALIGNED_STORE _mm256_storeu_si256(
-      reinterpret_cast<__m256i*>(to), from.val);
-}
-template <>
-EIGEN_STRONG_INLINE void pstoreu<QUInt8>(QUInt8* to, const Packet32q8u& from) {
-  EIGEN_DEBUG_UNALIGNED_STORE _mm256_storeu_si256(
-      reinterpret_cast<__m256i*>(to), from.val);
-}
-template <>
-EIGEN_STRONG_INLINE void pstoreu<QInt16>(QInt16* to, const Packet16q16i& from) {
-  EIGEN_DEBUG_UNALIGNED_STORE _mm256_storeu_si256(
-      reinterpret_cast<__m256i*>(to), from.val);
-}
-template <>
-EIGEN_STRONG_INLINE void pstoreu<QInt32>(QInt32* to, const Packet8q32i& from) {
-  EIGEN_DEBUG_UNALIGNED_STORE _mm256_storeu_si256(
-      reinterpret_cast<__m256i*>(to), from.val);
-}
-
-// Aligned store
-template <>
-EIGEN_STRONG_INLINE void pstore<QInt32>(QInt32* to, const Packet8q32i& from) {
-  EIGEN_DEBUG_ALIGNED_STORE _mm256_store_si256(reinterpret_cast<__m256i*>(to),
-                                               from.val);
-}
-template <>
-EIGEN_STRONG_INLINE void pstore<QInt16>(QInt16* to, const Packet16q16i& from) {
-  EIGEN_DEBUG_ALIGNED_STORE _mm256_store_si256(reinterpret_cast<__m256i*>(to),
-                                               from.val);
-}
-template <>
-EIGEN_STRONG_INLINE void pstore<QUInt8>(QUInt8* to, const Packet32q8u& from) {
-  EIGEN_DEBUG_ALIGNED_STORE _mm256_store_si256(reinterpret_cast<__m256i*>(to),
-                                               from.val);
-}
-template <>
-EIGEN_STRONG_INLINE void pstore<QInt8>(QInt8* to, const Packet32q8i& from) {
-  EIGEN_DEBUG_ALIGNED_STORE _mm256_store_si256(reinterpret_cast<__m256i*>(to),
-                                               from.val);
-}
-
-// Extract first element.
-template <>
-EIGEN_STRONG_INLINE QInt32 pfirst<Packet8q32i>(const Packet8q32i& a) {
-  return _mm_cvtsi128_si32(_mm256_castsi256_si128(a));
-}
-template <>
-EIGEN_STRONG_INLINE QInt16 pfirst<Packet16q16i>(const Packet16q16i& a) {
-  return _mm256_extract_epi16_N0(a.val);
-}
-template <>
-EIGEN_STRONG_INLINE QUInt8 pfirst<Packet32q8u>(const Packet32q8u& a) {
-  return static_cast<uint8_t>(_mm256_extract_epi8_N0(a.val));
-}
-template <>
-EIGEN_STRONG_INLINE QInt8 pfirst<Packet32q8i>(const Packet32q8i& a) {
-  return _mm256_extract_epi8_N0(a.val);
-}
-
-// Initialize to constant value.
-template <>
-EIGEN_STRONG_INLINE Packet32q8i pset1<Packet32q8i>(const QInt8& from) {
-  return _mm256_set1_epi8(from.value);
-}
-template <>
-EIGEN_STRONG_INLINE Packet32q8u pset1<Packet32q8u>(const QUInt8& from) {
-  return _mm256_set1_epi8(static_cast<uint8_t>(from.value));
-}
-template <>
-EIGEN_STRONG_INLINE Packet8q32i pset1<Packet8q32i>(const QInt32& from) {
-  return _mm256_set1_epi32(from.value);
-}
-
-// Basic arithmetic packet ops for QInt32.
-template <>
-EIGEN_STRONG_INLINE Packet8q32i padd<Packet8q32i>(const Packet8q32i& a,
-                                                  const Packet8q32i& b) {
-  return _mm256_add_epi32(a.val, b.val);
-}
-template <>
-EIGEN_STRONG_INLINE Packet16q16i pset1<Packet16q16i>(const QInt16& from) {
-  return _mm256_set1_epi16(from.value);
-}
-template <>
-EIGEN_STRONG_INLINE Packet8q32i psub<Packet8q32i>(const Packet8q32i& a,
-                                                  const Packet8q32i& b) {
-  return _mm256_sub_epi32(a.val, b.val);
-}
-// Note: mullo truncates the result to 32 bits.
-template <>
-EIGEN_STRONG_INLINE Packet8q32i pmul<Packet8q32i>(const Packet8q32i& a,
-                                                  const Packet8q32i& b) {
-  return _mm256_mullo_epi32(a.val, b.val);
-}
-template <>
-EIGEN_STRONG_INLINE Packet8q32i pnegate<Packet8q32i>(const Packet8q32i& a) {
-  return _mm256_sub_epi32(_mm256_setzero_si256(), a.val);
-}
-
-// Min and max.
-template <>
-EIGEN_STRONG_INLINE Packet8q32i pmin<Packet8q32i>(const Packet8q32i& a,
-                                                  const Packet8q32i& b) {
-  return _mm256_min_epi32(a.val, b.val);
-}
-template <>
-EIGEN_STRONG_INLINE Packet8q32i pmax<Packet8q32i>(const Packet8q32i& a,
-                                                  const Packet8q32i& b) {
-  return _mm256_max_epi32(a.val, b.val);
-}
-
-template <>
-EIGEN_STRONG_INLINE Packet16q16i pmin<Packet16q16i>(const Packet16q16i& a,
-                                                    const Packet16q16i& b) {
-  return _mm256_min_epi16(a.val, b.val);
-}
-template <>
-EIGEN_STRONG_INLINE Packet16q16i pmax<Packet16q16i>(const Packet16q16i& a,
-                                                    const Packet16q16i& b) {
-  return _mm256_max_epi16(a.val, b.val);
-}
-
-template <>
-EIGEN_STRONG_INLINE Packet32q8u pmin<Packet32q8u>(const Packet32q8u& a,
-                                                  const Packet32q8u& b) {
-  return _mm256_min_epu8(a.val, b.val);
-}
-template <>
-EIGEN_STRONG_INLINE Packet32q8u pmax<Packet32q8u>(const Packet32q8u& a,
-                                                  const Packet32q8u& b) {
-  return _mm256_max_epu8(a.val, b.val);
-}
-
-template <>
-EIGEN_STRONG_INLINE Packet32q8i pmin<Packet32q8i>(const Packet32q8i& a,
-                                                  const Packet32q8i& b) {
-  return _mm256_min_epi8(a.val, b.val);
-}
-template <>
-EIGEN_STRONG_INLINE Packet32q8i pmax<Packet32q8i>(const Packet32q8i& a,
-                                                  const Packet32q8i& b) {
-  return _mm256_max_epi8(a.val, b.val);
-}
-
-// Reductions.
-template <>
-EIGEN_STRONG_INLINE QInt32 predux_min<Packet8q32i>(const Packet8q32i& a) {
-  __m256i tmp = _mm256_min_epi32(a, _mm256_permute2f128_si256(a, a, 1));
-  tmp =
-      _mm256_min_epi32(tmp, _mm256_shuffle_epi32(tmp, _MM_SHUFFLE(1, 0, 3, 2)));
-  return pfirst<Packet8q32i>(
-      _mm256_min_epi32(tmp, _mm256_shuffle_epi32(tmp, 1)));
-}
-template <>
-EIGEN_STRONG_INLINE QInt32 predux_max<Packet8q32i>(const Packet8q32i& a) {
-  __m256i tmp = _mm256_max_epi32(a, _mm256_permute2f128_si256(a, a, 1));
-  tmp =
-      _mm256_max_epi32(tmp, _mm256_shuffle_epi32(tmp, _MM_SHUFFLE(1, 0, 3, 2)));
-  return pfirst<Packet8q32i>(
-      _mm256_max_epi32(tmp, _mm256_shuffle_epi32(tmp, 1)));
-}
-
-template <>
-EIGEN_STRONG_INLINE QInt16 predux_min<Packet16q16i>(const Packet16q16i& a) {
-  __m256i tmp = _mm256_min_epi16(a, _mm256_permute2f128_si256(a, a, 1));
-  tmp =
-      _mm256_min_epi16(tmp, _mm256_shuffle_epi32(tmp, _MM_SHUFFLE(1, 0, 3, 2)));
-  tmp = _mm256_min_epi16(tmp, _mm256_shuffle_epi32(tmp, 1));
-  return std::min(_mm256_extract_epi16_N0(tmp), _mm256_extract_epi16_N1(tmp));
-}
-template <>
-EIGEN_STRONG_INLINE QInt16 predux_max<Packet16q16i>(const Packet16q16i& a) {
-  __m256i tmp = _mm256_max_epi16(a, _mm256_permute2f128_si256(a, a, 1));
-  tmp =
-      _mm256_max_epi16(tmp, _mm256_shuffle_epi32(tmp, _MM_SHUFFLE(1, 0, 3, 2)));
-  tmp = _mm256_max_epi16(tmp, _mm256_shuffle_epi32(tmp, 1));
-  return std::max(_mm256_extract_epi16_N0(tmp), _mm256_extract_epi16_N1(tmp));
-}
-
-template <>
-EIGEN_STRONG_INLINE QUInt8 predux_min<Packet32q8u>(const Packet32q8u& a) {
-  __m256i tmp = _mm256_min_epu8(a, _mm256_permute2f128_si256(a, a, 1));
-  tmp =
-      _mm256_min_epu8(tmp, _mm256_shuffle_epi32(tmp, _MM_SHUFFLE(1, 0, 3, 2)));
-  tmp = _mm256_min_epu8(tmp, _mm256_shuffle_epi32(tmp, 1));
-  tmp = _mm256_min_epu8(tmp,
-                        _mm256_shufflelo_epi16(tmp, _MM_SHUFFLE(1, 0, 3, 2)));
-  return std::min(static_cast<uint8_t>(_mm256_extract_epi8_N0(tmp)),
-                  static_cast<uint8_t>(_mm256_extract_epi8_N1(tmp)));
-}
-template <>
-EIGEN_STRONG_INLINE QUInt8 predux_max<Packet32q8u>(const Packet32q8u& a) {
-  __m256i tmp = _mm256_max_epu8(a, _mm256_permute2f128_si256(a, a, 1));
-  tmp =
-      _mm256_max_epu8(tmp, _mm256_shuffle_epi32(tmp, _MM_SHUFFLE(1, 0, 3, 2)));
-  tmp = _mm256_max_epu8(tmp, _mm256_shuffle_epi32(tmp, 1));
-  tmp = _mm256_max_epu8(tmp,
-                        _mm256_shufflelo_epi16(tmp, _MM_SHUFFLE(1, 0, 3, 2)));
-  return std::max(static_cast<uint8_t>(_mm256_extract_epi8_N0(tmp)),
-                  static_cast<uint8_t>(_mm256_extract_epi8_N1(tmp)));
-}
-
-template <>
-EIGEN_STRONG_INLINE QInt8 predux_min<Packet32q8i>(const Packet32q8i& a) {
-  __m256i tmp = _mm256_min_epi8(a, _mm256_permute2f128_si256(a, a, 1));
-  tmp = _mm256_min_epi8(tmp, _mm256_shuffle_epi32(tmp, _MM_SHUFFLE(1, 0, 3, 2)));
-  tmp = _mm256_min_epi8(tmp, _mm256_shuffle_epi32(tmp, 1));
-  tmp = _mm256_min_epi8(tmp, _mm256_shufflelo_epi16(tmp, _MM_SHUFFLE(1, 0, 3, 2)));
-  return std::min(_mm256_extract_epi8_N0(tmp), _mm256_extract_epi8_N1(tmp));
-}
-template <>
-EIGEN_STRONG_INLINE QInt8 predux_max<Packet32q8i>(const Packet32q8i& a) {
-  __m256i tmp = _mm256_max_epi8(a, _mm256_permute2f128_si256(a, a, 1));
-  tmp = _mm256_max_epi8(tmp, _mm256_shuffle_epi32(tmp, _MM_SHUFFLE(1, 0, 3, 2)));
-  tmp = _mm256_max_epi8(tmp, _mm256_shuffle_epi32(tmp, 1));
-  tmp = _mm256_max_epi8(tmp, _mm256_shufflelo_epi16(tmp, _MM_SHUFFLE(1, 0, 3, 2)));
-  return std::max(_mm256_extract_epi8_N0(tmp), _mm256_extract_epi8_N1(tmp));
-}
-
-// Vectorized scaling of Packet32q8i by float.
-template<>
-struct scalar_product_op<QInt32, double> : binary_op_base<QInt32, double> {
-  typedef typename ScalarBinaryOpTraits<QInt32, double>::ReturnType result_type;
-#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN
-  EIGEN_EMPTY_STRUCT_CTOR(scalar_product_op)
-#else
-  scalar_product_op() {
-    EIGEN_SCALAR_BINARY_OP_PLUGIN
-  }
-#endif
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const QInt32& a, const double& b) const { return a * b; }
-
-  EIGEN_STRONG_INLINE const Packet8q32i packetOp(const Packet8q32i& a, const double& b) const {
-    __m256d scale = _mm256_set1_pd(b);
-    __m256d a_lo = _mm256_cvtepi32_pd(_mm256_castsi256_si128(a));
-    __m128i result_lo = _mm256_cvtpd_epi32(_mm256_mul_pd(scale, a_lo));
-    __m256d a_hi = _mm256_cvtepi32_pd(_mm256_extracti128_si256(a, 1));
-    __m128i result_hi = _mm256_cvtpd_epi32(_mm256_mul_pd(scale, a_hi));
-    return _mm256_insertf128_si256(_mm256_castsi128_si256(result_lo), result_hi, 1);
-  }
-};
-
-template <>
-struct functor_traits<scalar_product_op<QInt32, double>> {
-  enum { Cost = 4 * NumTraits<float>::MulCost, PacketAccess = true };
-};
-
-}  // end namespace internal
-}  // end namespace Eigen
-
-#endif  // EIGEN3_UNSUPPORTED_EIGEN_CXX11_SRC_FIXEDPOINT_PACKETMATHAVX2_H_
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/PacketMathAVX512.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/PacketMathAVX512.h
deleted file mode 100644
index 8f9906d..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/PacketMathAVX512.h
+++ /dev/null
@@ -1,545 +0,0 @@
-#ifndef EIGEN3_UNSUPPORTED_EIGEN_CXX11_SRC_FIXEDPOINT_PACKETMATHAVX512_H_
-#define EIGEN3_UNSUPPORTED_EIGEN_CXX11_SRC_FIXEDPOINT_PACKETMATHAVX512_H_
-
-#include "PacketMathAVX2.h"
-
-namespace Eigen {
-namespace internal {
-
-typedef struct Packet64q8i {
-  __m512i val;
-  operator __m512i() const { return val; }
-  Packet64q8i();
-  Packet64q8i(__m512i val) : val(val) {}
-} Packet64q8i;
-
-typedef struct Packet32q16i {
-  __m512i val;
-  operator __m512i() const { return val; }
-  Packet32q16i();
-  Packet32q16i(__m512i val) : val(val) {}
-} Packet32q16i;
-
-typedef struct Packet64q8u {
-  __m512i val;
-  operator __m512i() const { return val; }
-  Packet64q8u();
-  Packet64q8u(__m512i val) : val(val) {}
-} Packet64q8u;
-
-typedef struct Packet16q32i {
-  __m512i val;
-  operator __m512i() const { return val; }
-  Packet16q32i();
-  Packet16q32i(__m512i val) : val(val) {}
-} Packet16q32i;
-
-template <>
-struct packet_traits<QInt8> : default_packet_traits {
-  typedef Packet64q8i type;
-  typedef Packet32q8i half;
-  enum {
-    Vectorizable = 1,
-    AlignedOnScalar = 1,
-    size = 64,
-  };
-  enum {
-    HasAdd = 0,
-    HasSub = 0,
-    HasMul = 0,
-    HasNegate = 0,
-    HasAbs = 0,
-    HasAbs2 = 0,
-    HasMin = 1,
-    HasMax = 1,
-    HasConj = 0,
-    HasSetLinear = 0
-  };
-};
-template <>
-struct packet_traits<QUInt8> : default_packet_traits {
-  typedef Packet64q8u type;
-  typedef Packet32q8u half;
-  enum {
-    Vectorizable = 1,
-    AlignedOnScalar = 1,
-    size = 64,
-  };
-  enum {
-    HasAdd = 0,
-    HasSub = 0,
-    HasMul = 0,
-    HasNegate = 0,
-    HasAbs = 0,
-    HasAbs2 = 0,
-    HasMin = 1,
-    HasMax = 1,
-    HasConj = 0,
-    HasSetLinear = 0
-  };
-};
-template <>
-struct packet_traits<QInt16> : default_packet_traits {
-  typedef Packet32q16i type;
-  typedef Packet16q16i half;
-  enum {
-    Vectorizable = 1,
-    AlignedOnScalar = 1,
-    size = 32,
-  };
-  enum {
-    HasAdd = 0,
-    HasSub = 0,
-    HasMul = 0,
-    HasNegate = 0,
-    HasAbs = 0,
-    HasAbs2 = 0,
-    HasMin = 1,
-    HasMax = 1,
-    HasConj = 0,
-    HasSetLinear = 0
-  };
-};
-template <>
-struct packet_traits<QInt32> : default_packet_traits {
-  typedef Packet16q32i type;
-  typedef Packet8q32i half;
-  enum {
-    Vectorizable = 1,
-    AlignedOnScalar = 1,
-    size = 16,
-  };
-  enum {
-    HasAdd = 1,
-    HasSub = 1,
-    HasMul = 1,
-    HasNegate = 1,
-    HasAbs = 0,
-    HasAbs2 = 0,
-    HasMin = 1,
-    HasMax = 1,
-    HasConj = 0,
-    HasSetLinear = 0
-  };
-};
-
-template <>
-struct unpacket_traits<Packet64q8i> {
-  typedef QInt8 type;
-  typedef Packet32q8i half;
-  enum { size = 64, alignment=Aligned64 };
-};
-template <>
-struct unpacket_traits<Packet32q16i> {
-  typedef QInt16 type;
-  typedef Packet16q16i half;
-  enum { size = 32, alignment=Aligned64 };
-};
-template <>
-struct unpacket_traits<Packet64q8u> {
-  typedef QUInt8 type;
-  typedef Packet32q8u half;
-  enum { size = 64, alignment=Aligned64 };
-};
-template <>
-struct unpacket_traits<Packet16q32i> {
-  typedef QInt32 type;
-  typedef Packet8q32i half;
-  enum { size = 16, alignment=Aligned64 };
-};
-
-// Unaligned load
-template <>
-EIGEN_STRONG_INLINE Packet64q8i ploadu<Packet64q8i>(const QInt8* from) {
-  EIGEN_DEBUG_UNALIGNED_LOAD return _mm512_loadu_si512(
-      reinterpret_cast<const __m512i*>(from));
-}
-template <>
-EIGEN_STRONG_INLINE Packet32q16i ploadu<Packet32q16i>(const QInt16* from) {
-  EIGEN_DEBUG_UNALIGNED_LOAD return _mm512_loadu_si512(
-      reinterpret_cast<const __m512i*>(from));
-}
-template <>
-EIGEN_STRONG_INLINE Packet64q8u ploadu<Packet64q8u>(const QUInt8* from) {
-  EIGEN_DEBUG_UNALIGNED_LOAD return _mm512_loadu_si512(
-      reinterpret_cast<const __m512i*>(from));
-}
-template <>
-EIGEN_STRONG_INLINE Packet16q32i ploadu<Packet16q32i>(const QInt32* from) {
-  EIGEN_DEBUG_UNALIGNED_LOAD return _mm512_loadu_si512(
-      reinterpret_cast<const __m512i*>(from));
-}
-
-// Aligned load
-template <>
-EIGEN_STRONG_INLINE Packet64q8i pload<Packet64q8i>(const QInt8* from) {
-  EIGEN_DEBUG_ALIGNED_LOAD return _mm512_load_si512(
-      reinterpret_cast<const __m512i*>(from));
-}
-template <>
-EIGEN_STRONG_INLINE Packet32q16i pload<Packet32q16i>(const QInt16* from) {
-  EIGEN_DEBUG_ALIGNED_LOAD return _mm512_load_si512(
-      reinterpret_cast<const __m512i*>(from));
-}
-template <>
-EIGEN_STRONG_INLINE Packet64q8u pload<Packet64q8u>(const QUInt8* from) {
-  EIGEN_DEBUG_ALIGNED_LOAD return _mm512_load_si512(
-      reinterpret_cast<const __m512i*>(from));
-}
-template <>
-EIGEN_STRONG_INLINE Packet16q32i pload<Packet16q32i>(const QInt32* from) {
-  EIGEN_DEBUG_ALIGNED_LOAD return _mm512_load_si512(
-      reinterpret_cast<const __m512i*>(from));
-}
-
-// Unaligned store
-template <>
-EIGEN_STRONG_INLINE void pstoreu<QInt8>(QInt8* to, const Packet64q8i& from) {
-  EIGEN_DEBUG_UNALIGNED_STORE _mm512_storeu_si512(
-      reinterpret_cast<__m512i*>(to), from.val);
-}
-template <>
-EIGEN_STRONG_INLINE void pstoreu<QInt16>(QInt16* to, const Packet32q16i& from) {
-  EIGEN_DEBUG_UNALIGNED_STORE _mm512_storeu_si512(
-      reinterpret_cast<__m512i*>(to), from.val);
-}
-template <>
-EIGEN_STRONG_INLINE void pstoreu<QUInt8>(QUInt8* to, const Packet64q8u& from) {
-  EIGEN_DEBUG_UNALIGNED_STORE _mm512_storeu_si512(
-      reinterpret_cast<__m512i*>(to), from.val);
-}
-template <>
-EIGEN_STRONG_INLINE void pstoreu<QInt32>(QInt32* to, const Packet16q32i& from) {
-  EIGEN_DEBUG_UNALIGNED_STORE _mm512_storeu_si512(
-      reinterpret_cast<__m512i*>(to), from.val);
-}
-
-// Aligned store
-template <>
-EIGEN_STRONG_INLINE void pstore<QInt32>(QInt32* to, const Packet16q32i& from) {
-  EIGEN_DEBUG_ALIGNED_STORE _mm512_store_si512(reinterpret_cast<__m512i*>(to),
-                                               from.val);
-}
-template <>
-EIGEN_STRONG_INLINE void pstore<QUInt8>(QUInt8* to, const Packet64q8u& from) {
-  EIGEN_DEBUG_ALIGNED_STORE _mm512_store_si512(reinterpret_cast<__m512i*>(to),
-                                               from.val);
-}
-template <>
-EIGEN_STRONG_INLINE void pstore<QInt8>(QInt8* to, const Packet64q8i& from) {
-  EIGEN_DEBUG_ALIGNED_STORE _mm512_store_si512(reinterpret_cast<__m512i*>(to),
-                                               from.val);
-}
-template <>
-EIGEN_STRONG_INLINE void pstore<QInt16>(QInt16* to, const Packet32q16i& from) {
-  EIGEN_DEBUG_ALIGNED_STORE _mm512_store_si512(reinterpret_cast<__m512i*>(to),
-                                               from.val);
-}
-
-// Extract first element.
-template <>
-EIGEN_STRONG_INLINE QInt32 pfirst<Packet16q32i>(const Packet16q32i& a) {
-  return _mm_cvtsi128_si32(_mm512_extracti32x4_epi32(a, 0));
-}
-template <>
-EIGEN_STRONG_INLINE QUInt8 pfirst<Packet64q8u>(const Packet64q8u& a) {
-  return static_cast<uint8_t>(
-           _mm_extract_epi8(_mm512_extracti32x4_epi32(a.val, 0), 0));
-}
-template <>
-EIGEN_STRONG_INLINE QInt8 pfirst<Packet64q8i>(const Packet64q8i& a) {
-  return _mm_extract_epi8(_mm512_extracti32x4_epi32(a.val, 0), 0);
-}
-template <>
-EIGEN_STRONG_INLINE QInt16 pfirst<Packet32q16i>(const Packet32q16i& a) {
-  return _mm_extract_epi16(_mm512_extracti32x4_epi32(a.val, 0), 0);
-}
-
-// Initialize to constant value.
-template <>
-EIGEN_STRONG_INLINE Packet64q8i pset1<Packet64q8i>(const QInt8& from) {
-  return _mm512_set1_epi8(from.value);
-}
-template <>
-EIGEN_STRONG_INLINE Packet32q16i pset1<Packet32q16i>(const QInt16& from) {
-  return _mm512_set1_epi16(from.value);
-}
-template <>
-EIGEN_STRONG_INLINE Packet64q8u pset1<Packet64q8u>(const QUInt8& from) {
-  return _mm512_set1_epi8(static_cast<uint8_t>(from.value));
-}
-template <>
-EIGEN_STRONG_INLINE Packet16q32i pset1<Packet16q32i>(const QInt32& from) {
-  return _mm512_set1_epi32(from.value);
-}
-
-// Basic arithmetic packet ops for QInt32.
-template <>
-EIGEN_STRONG_INLINE Packet16q32i padd<Packet16q32i>(const Packet16q32i& a,
-                                                    const Packet16q32i& b) {
-  return _mm512_add_epi32(a.val, b.val);
-}
-template <>
-EIGEN_STRONG_INLINE Packet16q32i psub<Packet16q32i>(const Packet16q32i& a,
-                                                    const Packet16q32i& b) {
-  return _mm512_sub_epi32(a.val, b.val);
-}
-// Note: mullo truncates the result to 32 bits.
-template <>
-EIGEN_STRONG_INLINE Packet16q32i pmul<Packet16q32i>(const Packet16q32i& a,
-                                                    const Packet16q32i& b) {
-  return _mm512_mullo_epi32(a.val, b.val);
-}
-template <>
-EIGEN_STRONG_INLINE Packet16q32i pnegate<Packet16q32i>(const Packet16q32i& a) {
-  return _mm512_sub_epi32(_mm512_setzero_si512(), a.val);
-}
-
-// Min and max.
-template <>
-EIGEN_STRONG_INLINE Packet16q32i pmin<Packet16q32i>(const Packet16q32i& a,
-                                                    const Packet16q32i& b) {
-  return _mm512_min_epi32(a.val, b.val);
-}
-template <>
-EIGEN_STRONG_INLINE Packet16q32i pmax<Packet16q32i>(const Packet16q32i& a,
-                                                    const Packet16q32i& b) {
-  return _mm512_max_epi32(a.val, b.val);
-}
-
-template <>
-EIGEN_STRONG_INLINE Packet64q8u pmin<Packet64q8u>(const Packet64q8u& a,
-                                                  const Packet64q8u& b) {
-#ifdef EIGEN_VECTORIZE_AVX512BW
-  return _mm512_min_epu8(a.val, b.val);
-#else
-  __m256i ap0 = _mm512_extracti32x8_epi32(a.val, 0);
-  __m256i ap1 = _mm512_extracti32x8_epi32(a.val, 1);
-  __m256i bp0 = _mm512_extracti32x8_epi32(b.val, 0);
-  __m256i bp1 = _mm512_extracti32x8_epi32(b.val, 1);
-  __m256i r0 = _mm256_min_epu8(ap0, bp0);
-  __m256i r1 = _mm256_min_epu8(ap1, bp1);
-  return _mm512_inserti32x8(_mm512_castsi256_si512(r0), r1, 1);
-#endif
-}
-template <>
-EIGEN_STRONG_INLINE Packet64q8u pmax<Packet64q8u>(const Packet64q8u& a,
-                                                  const Packet64q8u& b) {
-#ifdef EIGEN_VECTORIZE_AVX512BW
-  return _mm512_max_epu8(a.val, b.val);
-#else
-  __m256i ap0 = _mm512_extracti32x8_epi32(a.val, 0);
-  __m256i ap1 = _mm512_extracti32x8_epi32(a.val, 1);
-  __m256i bp0 = _mm512_extracti32x8_epi32(b.val, 0);
-  __m256i bp1 = _mm512_extracti32x8_epi32(b.val, 1);
-  __m256i r0 = _mm256_max_epu8(ap0, bp0);
-  __m256i r1 = _mm256_max_epu8(ap1, bp1);
-  return _mm512_inserti32x8(_mm512_castsi256_si512(r0), r1, 1);
-#endif
-}
-
-template <>
-EIGEN_STRONG_INLINE Packet64q8i pmin<Packet64q8i>(const Packet64q8i& a,
-                                                  const Packet64q8i& b) {
-#ifdef EIGEN_VECTORIZE_AVX512BW
-  return _mm512_min_epi8(a.val, b.val);
-#else
-  __m256i ap0 = _mm512_extracti32x8_epi32(a.val, 0);
-  __m256i ap1 = _mm512_extracti32x8_epi32(a.val, 1);
-  __m256i bp0 = _mm512_extracti32x8_epi32(b.val, 0);
-  __m256i bp1 = _mm512_extracti32x8_epi32(b.val, 1);
-  __m256i r0 = _mm256_min_epi8(ap0, bp0);
-  __m256i r1 = _mm256_min_epi8(ap1, bp1);
-  return _mm512_inserti32x8(_mm512_castsi256_si512(r0), r1, 1);
-#endif
-}
-template <>
-EIGEN_STRONG_INLINE Packet32q16i pmin<Packet32q16i>(const Packet32q16i& a,
-                                                    const Packet32q16i& b) {
-#ifdef EIGEN_VECTORIZE_AVX512BW
-  return _mm512_min_epi16(a.val, b.val);
-#else
-  __m256i ap0 = _mm512_extracti32x8_epi32(a.val, 0);
-  __m256i ap1 = _mm512_extracti32x8_epi32(a.val, 1);
-  __m256i bp0 = _mm512_extracti32x8_epi32(b.val, 0);
-  __m256i bp1 = _mm512_extracti32x8_epi32(b.val, 1);
-  __m256i r0 = _mm256_min_epi16(ap0, bp0);
-  __m256i r1 = _mm256_min_epi16(ap1, bp1);
-  return _mm512_inserti32x8(_mm512_castsi256_si512(r0), r1, 1);
-#endif
-}
-template <>
-EIGEN_STRONG_INLINE Packet64q8i pmax<Packet64q8i>(const Packet64q8i& a,
-                                                  const Packet64q8i& b) {
-#ifdef EIGEN_VECTORIZE_AVX512BW
-  return _mm512_max_epi8(a.val, b.val);
-#else
-  __m256i ap0 = _mm512_extracti32x8_epi32(a.val, 0);
-  __m256i ap1 = _mm512_extracti32x8_epi32(a.val, 1);
-  __m256i bp0 = _mm512_extracti32x8_epi32(b.val, 0);
-  __m256i bp1 = _mm512_extracti32x8_epi32(b.val, 1);
-  __m256i r0 = _mm256_max_epi8(ap0, bp0);
-  __m256i r1 = _mm256_max_epi8(ap1, bp1);
-  return _mm512_inserti32x8(_mm512_castsi256_si512(r0), r1, 1);
-#endif
-}
-template <>
-EIGEN_STRONG_INLINE Packet32q16i pmax<Packet32q16i>(const Packet32q16i& a,
-                                                    const Packet32q16i& b) {
-#ifdef EIGEN_VECTORIZE_AVX512BW
-  return _mm512_max_epi16(a.val, b.val);
-#else
-  __m256i ap0 = _mm512_extracti32x8_epi32(a.val, 0);
-  __m256i ap1 = _mm512_extracti32x8_epi32(a.val, 1);
-  __m256i bp0 = _mm512_extracti32x8_epi32(b.val, 0);
-  __m256i bp1 = _mm512_extracti32x8_epi32(b.val, 1);
-  __m256i r0 = _mm256_max_epi16(ap0, bp0);
-  __m256i r1 = _mm256_max_epi16(ap1, bp1);
-  return _mm512_inserti32x8(_mm512_castsi256_si512(r0), r1, 1);
-#endif
-}
-
-// Reductions.
-template <>
-EIGEN_STRONG_INLINE QInt32 predux_min<Packet16q32i>(const Packet16q32i& a) {
-  Packet4i lane0 = _mm512_extracti32x4_epi32(a.val, 0);
-  Packet4i lane1 = _mm512_extracti32x4_epi32(a.val, 1);
-  Packet4i lane2 = _mm512_extracti32x4_epi32(a.val, 2);
-  Packet4i lane3 = _mm512_extracti32x4_epi32(a.val, 3);
-  Packet4i res =
-      _mm_min_epi32(_mm_min_epi32(lane0, lane1), _mm_min_epi32(lane2, lane3));
-  res = _mm_min_epi32(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 0, 3, 2)));
-  return pfirst(
-           _mm_min_epi32(
-             res,
-             _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 0, 0, 1))));
-}
-template <>
-EIGEN_STRONG_INLINE QInt32 predux_max<Packet16q32i>(const Packet16q32i& a) {
-  Packet4i lane0 = _mm512_extracti32x4_epi32(a.val, 0);
-  Packet4i lane1 = _mm512_extracti32x4_epi32(a.val, 1);
-  Packet4i lane2 = _mm512_extracti32x4_epi32(a.val, 2);
-  Packet4i lane3 = _mm512_extracti32x4_epi32(a.val, 3);
-  Packet4i res =
-      _mm_max_epi32(_mm_max_epi32(lane0, lane1), _mm_max_epi32(lane2, lane3));
-  res = _mm_max_epi32(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 0, 3, 2)));
-  return pfirst(
-           _mm_max_epi32(
-             res,
-             _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 0, 0, 1))));
-}
-template <>
-EIGEN_STRONG_INLINE QInt16 predux_min<Packet32q16i>(const Packet32q16i& a) {
-  Packet4i lane0 = _mm512_extracti32x4_epi32(a.val, 0);
-  Packet4i lane1 = _mm512_extracti32x4_epi32(a.val, 1);
-  Packet4i lane2 = _mm512_extracti32x4_epi32(a.val, 2);
-  Packet4i lane3 = _mm512_extracti32x4_epi32(a.val, 3);
-  Packet4i res =
-      _mm_min_epi16(_mm_min_epi16(lane0, lane1), _mm_min_epi16(lane2, lane3));
-  res = _mm_min_epi16(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 0, 3, 2)));
-  std::uint32_t w =
-      pfirst(
-        _mm_min_epi16(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 0, 0, 1))));
-  return std::min({
-           static_cast<std::int16_t>(w >> 16),
-           static_cast<std::int16_t>(w)
-         });
-}
-template <>
-EIGEN_STRONG_INLINE QInt16 predux_max<Packet32q16i>(const Packet32q16i& a) {
-  Packet4i lane0 = _mm512_extracti32x4_epi32(a.val, 0);
-  Packet4i lane1 = _mm512_extracti32x4_epi32(a.val, 1);
-  Packet4i lane2 = _mm512_extracti32x4_epi32(a.val, 2);
-  Packet4i lane3 = _mm512_extracti32x4_epi32(a.val, 3);
-  Packet4i res =
-      _mm_max_epi16(_mm_max_epi16(lane0, lane1), _mm_max_epi16(lane2, lane3));
-  res = _mm_max_epi16(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 0, 3, 2)));
-  std::uint32_t w =
-      pfirst(
-        _mm_max_epi16(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 0, 0, 1))));
-  return std::max({
-           static_cast<std::int16_t>(w >> 16),
-           static_cast<std::int16_t>(w)
-         });
-}
-template <>
-EIGEN_STRONG_INLINE QUInt8 predux_min<Packet64q8u>(const Packet64q8u& a) {
-  Packet4i lane0 = _mm512_extracti32x4_epi32(a.val, 0);
-  Packet4i lane1 = _mm512_extracti32x4_epi32(a.val, 1);
-  Packet4i lane2 = _mm512_extracti32x4_epi32(a.val, 2);
-  Packet4i lane3 = _mm512_extracti32x4_epi32(a.val, 3);
-  Packet4i res =
-      _mm_min_epu8(_mm_min_epu8(lane0, lane1), _mm_min_epu8(lane2, lane3));
-  res = _mm_min_epu8(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 0, 3, 2)));
-  std::uint32_t w =
-      pfirst(
-        _mm_min_epu8(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 0, 0, 1))));
-  return std::min({
-           static_cast<std::uint8_t>(w >> 24),
-           static_cast<std::uint8_t>(w >> 16),
-           static_cast<std::uint8_t>(w >> 8),
-           static_cast<std::uint8_t>(w)
-         });
-}
-template <>
-EIGEN_STRONG_INLINE QUInt8 predux_max<Packet64q8u>(const Packet64q8u& a) {
-  Packet4i lane0 = _mm512_extracti32x4_epi32(a.val, 0);
-  Packet4i lane1 = _mm512_extracti32x4_epi32(a.val, 1);
-  Packet4i lane2 = _mm512_extracti32x4_epi32(a.val, 2);
-  Packet4i lane3 = _mm512_extracti32x4_epi32(a.val, 3);
-  Packet4i res =
-      _mm_max_epu8(_mm_max_epu8(lane0, lane1), _mm_max_epu8(lane2, lane3));
-  res = _mm_max_epu8(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 0, 3, 2)));
-  std::uint32_t w =
-      pfirst(
-        _mm_max_epu8(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 0, 0, 1))));
-  return std::max({
-           static_cast<std::uint8_t>(w >> 24),
-           static_cast<std::uint8_t>(w >> 16),
-           static_cast<std::uint8_t>(w >> 8),
-           static_cast<std::uint8_t>(w)
-         });
-}
-template <>
-EIGEN_STRONG_INLINE QInt8 predux_min<Packet64q8i>(const Packet64q8i& a) {
-  Packet4i lane0 = _mm512_extracti32x4_epi32(a.val, 0);
-  Packet4i lane1 = _mm512_extracti32x4_epi32(a.val, 1);
-  Packet4i lane2 = _mm512_extracti32x4_epi32(a.val, 2);
-  Packet4i lane3 = _mm512_extracti32x4_epi32(a.val, 3);
-  Packet4i res =
-      _mm_min_epi8(_mm_min_epi8(lane0, lane1), _mm_min_epi8(lane2, lane3));
-  res = _mm_min_epi8(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 0, 3, 2)));
-  std::uint32_t w =
-      pfirst(
-        _mm_min_epi8(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 0, 0, 1))));
-  return std::min({
-           static_cast<std::int8_t>(w >> 24),
-           static_cast<std::int8_t>(w >> 16),
-           static_cast<std::int8_t>(w >> 8),
-           static_cast<std::int8_t>(w)
-         });
-}
-template <>
-EIGEN_STRONG_INLINE QInt8 predux_max<Packet64q8i>(const Packet64q8i& a) {
-  Packet4i lane0 = _mm512_extracti32x4_epi32(a.val, 0);
-  Packet4i lane1 = _mm512_extracti32x4_epi32(a.val, 1);
-  Packet4i lane2 = _mm512_extracti32x4_epi32(a.val, 2);
-  Packet4i lane3 = _mm512_extracti32x4_epi32(a.val, 3);
-  Packet4i res =
-      _mm_max_epi8(_mm_max_epi8(lane0, lane1), _mm_max_epi8(lane2, lane3));
-  res = _mm_max_epi8(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 0, 3, 2)));
-  std::uint32_t w =
-      pfirst(
-        _mm_max_epi8(res, _mm_shuffle_epi32(res, _MM_SHUFFLE(0, 0, 0, 1))));
-  return std::min({
-           static_cast<std::int8_t>(w >> 24),
-           static_cast<std::int8_t>(w >> 16),
-           static_cast<std::int8_t>(w >> 8),
-           static_cast<std::int8_t>(w)
-         });
-}
-
-}  // end namespace internal
-}  // end namespace Eigen
-
-#endif  // EIGEN3_UNSUPPORTED_EIGEN_CXX11_SRC_FIXEDPOINT_PACKETMATHAVX512_H_
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/TypeCastingAVX2.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/TypeCastingAVX2.h
deleted file mode 100644
index 7b4ecc7..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/TypeCastingAVX2.h
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifndef EIGEN3_UNSUPPORTED_EIGEN_CXX11_SRC_FIXEDPOINT_TYPECASTINGAVX2_H_
-#define EIGEN3_UNSUPPORTED_EIGEN_CXX11_SRC_FIXEDPOINT_TYPECASTINGAVX2_H_
-
-namespace Eigen {
-namespace internal {
-
-typedef __m256 Packet8f;
-
-template <>
-struct type_casting_traits<QInt32, float> {
-  enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 };
-};
-
-template <>
-EIGEN_STRONG_INLINE Packet8f pcast<Packet8q32i>(const Packet8q32i& a) {
-  return _mm256_cvtepi32_ps(a.val);
-}
-
-template <>
-struct type_casting_traits<float, QInt32> {
-  enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 };
-};
-
-template <>
-EIGEN_STRONG_INLINE Packet8q32i pcast<Packet8f>(const Packet8f& a) {
-  return _mm256_cvtps_epi32(a);
-}
-
-template <>
-struct type_casting_traits<QInt32, QInt8> {
-  enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
-};
-
-template <>
-EIGEN_STRONG_INLINE Packet32q8i
-pcast<Packet8q32i, Packet32q8i>(const Packet8q32i& a, const Packet8q32i& b,
-                                const Packet8q32i& c, const Packet8q32i& d) {
-  __m256i converted = _mm256_packs_epi16(_mm256_packs_epi32(a.val, b.val),
-                                         _mm256_packs_epi32(c.val, d.val));
-  // Since packs does not cross 128 bit lane boundaries,
-  // we have to permute to properly order the final result.
-  const __m256i permute_mask = _mm256_set_epi32(7, 3, 6, 2, 5, 1, 4, 0);
-  return _mm256_permutevar8x32_epi32(converted, permute_mask);
-}
-
-template <>
-struct type_casting_traits<QInt32, QUInt8> {
-  enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
-};
-
-template <>
-EIGEN_STRONG_INLINE Packet32q8u
-pcast<Packet8q32i, Packet32q8u>(const Packet8q32i& a, const Packet8q32i& b,
-                                const Packet8q32i& c, const Packet8q32i& d) {
-  const __m256i converted = _mm256_packus_epi16(
-      _mm256_packs_epi32(a.val, b.val), _mm256_packs_epi32(c.val, d.val));
-  // Since packus does not cross 128 bit lane boundaries,
-  // we have to permute to properly order the final result.
-  const __m256i permute_mask = _mm256_set_epi32(7, 3, 6, 2, 5, 1, 4, 0);
-  return _mm256_permutevar8x32_epi32(converted, permute_mask);
-}
-
-}  // end namespace internal
-}  // end namespace Eigen
-
-#endif  // EIGEN3_UNSUPPORTED_EIGEN_CXX11_SRC_FIXEDPOINT_TYPECASTINGAVX2_H_
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/TypeCastingAVX512.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/TypeCastingAVX512.h
deleted file mode 100644
index 2673574..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/TypeCastingAVX512.h
+++ /dev/null
@@ -1,180 +0,0 @@
-#ifndef EIGEN3_UNSUPPORTED_EIGEN_CXX11_SRC_FIXEDPOINT_TYPECASTINGAVX512_H_
-#define EIGEN3_UNSUPPORTED_EIGEN_CXX11_SRC_FIXEDPOINT_TYPECASTINGAVX512_H_
-
-namespace Eigen {
-namespace internal {
-
-typedef __m512 Packet16f;
-typedef __m512i Packet16i;
-
-template <>
-struct type_casting_traits<QInt32, float> {
-  enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 };
-};
-
-template <>
-EIGEN_STRONG_INLINE Packet16f pcast<Packet16q32i>(const Packet16q32i& a) {
-  return _mm512_cvtepi32_ps(a.val);
-}
-
-template <>
-struct type_casting_traits<float, QInt32> {
-  enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 };
-};
-
-template <>
-EIGEN_STRONG_INLINE Packet16q32i pcast<Packet16f>(const Packet16f& a) {
-  return _mm512_cvtps_epi32(a);
-}
-
-template <>
-struct type_casting_traits<float, QInt16> {
-  enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
-};
-
-template <>
-EIGEN_STRONG_INLINE Packet32q16i
-pcast<Packet16f>(const Packet16f& a, const Packet16f& b) {
-  Packet16i a_int = _mm512_cvtps_epi32(a);
-  Packet16i b_int = _mm512_cvtps_epi32(b);
-#ifdef EIGEN_VECTORIZE_AVX512BW
-  return _mm512_packs_epi32(a_int, b_int);
-#else
-  Packet8i ab_int16_low =
-      _mm256_permute4x64_epi64(
-        _mm256_packs_epi32(
-          _mm512_castsi512_si256(a_int),
-          _mm512_castsi512_si256(b_int)),
-        _MM_SHUFFLE(0, 2, 1, 3));
-  Packet8i ab_int16_high =
-      _mm256_permute4x64_epi64(
-        _mm256_packs_epi32(
-          _mm512_extracti32x8_epi32(a_int, 1),
-          _mm512_extracti32x8_epi32(b_int, 1)),
-        _MM_SHUFFLE(0, 2, 1, 3));
-  return _mm512_inserti32x8(
-           _mm512_castsi256_si512(ab_int16_low),
-           ab_int16_high, 1);
-#endif
-}
-
-template <>
-struct type_casting_traits<float, QInt8> {
-  enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
-};
-
-template <>
-EIGEN_STRONG_INLINE Packet64q8i
-pcast<Packet16f>(const Packet16f& a,
-                 const Packet16f& b,
-                 const Packet16f& c,
-                 const Packet16f& d) {
-  Packet16i a_int = _mm512_cvtps_epi32(a);
-  Packet16i b_int = _mm512_cvtps_epi32(b);
-  Packet16i c_int = _mm512_cvtps_epi32(c);
-  Packet16i d_int = _mm512_cvtps_epi32(d);
-#ifdef EIGEN_VECTORIZE_AVX512BW
-  return _mm512_packs_epi16(
-           _mm512_packs_epi32(a_int, b_int),
-           _mm512_packs_epi32(c_int, d_int));
-#else
-  Packet8i ab_int16_low =
-      _mm256_permute4x64_epi64(
-        _mm256_packs_epi32(
-          _mm512_castsi512_si256(a_int),
-          _mm512_castsi512_si256(b_int)),
-        _MM_SHUFFLE(0, 2, 1, 3));
-  Packet8i cd_int16_low =
-      _mm256_permute4x64_epi64(
-        _mm256_packs_epi32(
-          _mm512_castsi512_si256(c_int),
-          _mm512_castsi512_si256(d_int)),
-        _MM_SHUFFLE(0, 2, 1, 3));
-  Packet8i ab_int16_high =
-      _mm256_permute4x64_epi64(
-        _mm256_packs_epi32(
-          _mm512_extracti32x8_epi32(a_int, 1),
-          _mm512_extracti32x8_epi32(b_int, 1)),
-        _MM_SHUFFLE(0, 2, 1, 3));
-  Packet8i cd_int16_high =
-      _mm256_permute4x64_epi64(
-        _mm256_packs_epi32(
-          _mm512_extracti32x8_epi32(c_int, 1),
-          _mm512_extracti32x8_epi32(d_int, 1)),
-        _MM_SHUFFLE(0, 2, 1, 3));
-  Packet8i abcd_int8_low =
-      _mm256_permute4x64_epi64(
-        _mm256_packs_epi16(ab_int16_low, cd_int16_low),
-        _MM_SHUFFLE(0, 2, 1, 3));
-  Packet8i abcd_int8_high =
-      _mm256_permute4x64_epi64(
-        _mm256_packs_epi16(ab_int16_high, cd_int16_high),
-        _MM_SHUFFLE(0, 2, 1, 3));
-  return _mm512_inserti32x8(
-           _mm512_castsi256_si512(abcd_int8_low),
-           abcd_int8_high, 1);
-#endif
-}
-
-template <>
-struct type_casting_traits<QInt32, QInt8> {
-  enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
-};
-
-template <>
-struct type_casting_traits<QInt32, QInt16> {
-  enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
-};
-
-template <>
-EIGEN_STRONG_INLINE Packet64q8i
-pcast<Packet16q32i, Packet64q8i>(const Packet16q32i& a,
-                                 const Packet16q32i& b,
-                                 const Packet16q32i& c,
-                                 const Packet16q32i& d) {
-  __m512i converted = _mm512_packs_epi16(_mm512_packs_epi32(a.val, b.val),
-                                         _mm512_packs_epi32(c.val, d.val));
-  return converted;
-}
-
-template <>
-EIGEN_STRONG_INLINE Packet32q16i
-pcast<Packet16q32i, Packet32q16i>(const Packet16q32i& a,
-                                  const Packet16q32i& b) {
-  __m512i converted = _mm512_packs_epi32(a.val, b.val);
-  return converted;
-}
-
-template <>
-struct type_casting_traits<QInt32, QUInt8> {
-  enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
-};
-
-template <>
-EIGEN_STRONG_INLINE Packet64q8u
-pcast<Packet16q32i, Packet64q8u>(const Packet16q32i& a, const Packet16q32i& b,
-                                 const Packet16q32i& c, const Packet16q32i& d) {
-  const __m512i converted = _mm512_packus_epi16(
-      _mm512_packus_epi32(a.val, b.val), _mm512_packus_epi32(c.val, d.val));
-  return converted;
-}
-
-template <>
-struct type_casting_traits<QInt32, QUInt16> {
-  enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
-};
-
-#if 0
-template <>
-EIGEN_STRONG_INLINE Packet32q16u
-pcast<Packet16q32i, Packet32q16u>(const Packet16q32i& a,
-                                  const Packet16q32i& b) {
-  const __m512i converted = _mm512_packus_epi32(a.val, b.val);
-  return converted;
-}
-#endif
-
-}  // end namespace internal
-}  // end namespace Eigen
-
-#endif  // EIGEN3_UNSUPPORTED_EIGEN_CXX11_SRC_FIXEDPOINT_TYPECASTINGAVX512_H_
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/Activations.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/Activations.h
deleted file mode 100644
index cbcce9e..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/Activations.h
+++ /dev/null
@@ -1,116 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#ifndef EIGEN_CXX11_NEURAL_NETWORKS_ACTIVATIONS_H
-#define EIGEN_CXX11_NEURAL_NETWORKS_ACTIVATIONS_H
-
-namespace Eigen {
-
-/** scalar_sigmoid_fast_derivative_op
-  * \ingroup CXX11_NeuralNetworks_Module
-  * \brief Template functor to compute the fast derivative of a sigmoid
-  *
-  * Input should be the backpropagated gradient.
-  *
-  * \sa class CwiseUnaryOp, Cwise::sigmoid_fast_derivative()
-  */
-template <typename T>
-struct scalar_sigmoid_fast_derivative_op {
-  EIGEN_EMPTY_STRUCT_CTOR(scalar_sigmoid_fast_derivative_op)
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T operator()(const T& y) const {
-    const T one = T(1);
-    return (one - y) * y;
-  }
-
-  template <typename Packet>
-  inline Packet packetOp(const Packet& y) const {
-    const Packet one = internal::pset1<Packet>(1);
-    return internal::pmul(internal::psub(one, y), y);
-  }
-};
-
-namespace internal {
-template <typename T>
-struct functor_traits<scalar_sigmoid_fast_derivative_op<T> > {
-  enum {
-    Cost = NumTraits<T>::AddCost * 2 + NumTraits<T>::MulCost,
-    PacketAccess = packet_traits<T>::HasAdd && packet_traits<T>::HasMul &&
-                   packet_traits<T>::HasNegate
-  };
-};
-}  // namespace internal
-
-/** scalar_tanh_fast_derivative_op
-  * \ingroup CXX11_NeuralNetworks_Module
-  * \brief Template functor to compute the fast derivative of a tanh
-  *
-  * Input should be the backpropagated gradient.
-  *
-  * \sa class CwiseUnaryOp, Cwise::tanh_fast_derivative()
-  */
-template <typename T>
-struct scalar_tanh_fast_derivative_op {
-  EIGEN_EMPTY_STRUCT_CTOR(scalar_tanh_fast_derivative_op)
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T operator()(const T& y) const {
-    const T one = T(1);
-    return one - (y * y);
-  }
-
-  template <typename Packet>
-  inline Packet packetOp(const Packet& y) const {
-    const Packet one = internal::pset1<Packet>(1);
-    return internal::psub(one, internal::pmul(y, y));
-  }
-};
-
-namespace internal {
-template <typename T>
-struct functor_traits<scalar_tanh_fast_derivative_op<T> > {
-  enum {
-    Cost = NumTraits<T>::AddCost * 2 + NumTraits<T>::MulCost * 1,
-    PacketAccess = packet_traits<T>::HasAdd && packet_traits<T>::HasMul &&
-                   packet_traits<T>::HasNegate
-  };
-};
-}  // namespace internal
-
-/**
- * \ingroup CXX11_NeuralNetworks_Module
- * \brief Template functor to clip the magnitude of the first scalar.
- *
- * \sa class CwiseBinaryOp, MatrixBase::Clip
- */
-template <typename Scalar>
-struct scalar_clip_op {
-  EIGEN_EMPTY_STRUCT_CTOR(scalar_clip_op)
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar
-  operator()(const Scalar& a, const Scalar& b) const {
-    return numext::mini(numext::maxi(a, -b), b);
-  }
-  template <typename Packet>
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet
-  packetOp(const Packet& a, const Packet& b) const {
-    return internal::pmin(internal::pmax(a, internal::pnegate(b)), b);
-  }
-};
-
-namespace internal {
-template <typename Scalar>
-struct functor_traits<scalar_clip_op<Scalar> > {
-  enum {
-    Cost = NumTraits<Scalar>::AddCost * 3,
-    PacketAccess = packet_traits<Scalar>::HasMax &&
-                   packet_traits<Scalar>::HasMin &&
-                   packet_traits<Scalar>::HasNegate
-  };
-};
-}  // namespace internal
-
-}  // end namespace Eigen
-
-#endif  // EIGEN_CXX11_NEURAL_NETWORKS_ACTIVATIONS_H
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/Attention.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/Attention.h
deleted file mode 100644
index d4bc7a3..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/Attention.h
+++ /dev/null
@@ -1,209 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#ifndef EIGEN_CXX11_NEURAL_NETWORKS_ATTENTION_H
-#define EIGEN_CXX11_NEURAL_NETWORKS_ATTENTION_H
-
-namespace Eigen {
-
-/** ExtractGlimpses
-  * \ingroup CXX11_NeuralNetworks_Module
-  *
-  * \brief Extract glimpses from an input tensor.
-  *
-  * The input parameter is expected to be a col-major tensor with a rank of 4 (depth, x, y, and batch).
-  * The width and height parameters specify the extension of the returned glimpses.
-  * The offsets parameter specifies the x, y locations of the center of the glimpses relative to the center of the input image. The vector is expected to contain one IndexPair for each image in the batch dimension.
-  * The normalized boolean indicates if incoming coordinates are normalized so that 0.0 and 1.0 correspond to the minimum and maximum of each height and width dimension.
-  * The centered boolean indicates if incoming coordinates are centered relative to the image, in which case -1.0 and 1.0 correspond to minimum and maximum of each dimension while 0.0 corresponds to the center.
-  *
-  * The result can be assigned to a tensor of rank equal to that of the input. The result will be laid out in col-major order (depth, x, y, batch).
-  * The dimensions of the result will be equal to the dimensions of the input except for width and height which will be equal to the requested glimpse size.
-  */
-namespace {
-template <typename Index>
-struct GlimpseExtractionOp {
-  GlimpseExtractionOp(const Index width, const Index height,
-                      const std::vector<IndexPair<float> >& offsets,
-                      const bool normalized,
-                      const bool centered,
-                      const bool uniform_noise) :
-      width_(width), height_(height), offsets_(offsets),
-      normalized_(normalized), centered_(centered), uniform_noise_(uniform_noise) { }
-
-  template <typename Input>
-  DSizes<Index, 4> dimensions(const Input& input) const {
-    typedef typename internal::traits<Input>::Index IndexType;
-    typedef TensorRef<Tensor<typename internal::traits<Input>::Scalar, 4,
-                             internal::traits<Input>::Layout, IndexType> > Ref;
-    Ref in(input);
-
-    DSizes<Index, 4> dims = in.dimensions();
-
-    dims[0] = in.dimension(0);
-    dims[1] = width_;
-    dims[2] = height_;
-    dims[3] = in.dimension(3);
-    return dims;
-  }
-
-  template <typename Input, typename Output, typename Device>
-  EIGEN_DEVICE_FUNC
-  void eval(const Input& input, Output& output, const Device& device) const
-  {
-    typedef typename internal::traits<Input>::Index IndexType;
-    typedef TensorRef<Tensor<typename internal::traits<Input>::Scalar, 4,
-                             internal::traits<Input>::Layout, IndexType> > Ref;
-    Ref in(input);
-
-    const Index num_channels = in.dimension(0);
-    const Index input_width = in.dimension(1);
-    const Index input_height = in.dimension(2);
-    const Index batch_size = in.dimension(3);
-    eigen_assert(input_width > 0);
-    eigen_assert(input_height > 0);
-
-    for (Index i = 0; i < batch_size; ++i) {
-      float x = offsets_[i].first, y = offsets_[i].second;
-
-      // Un-normalize coordinates back to pixel space if normalized.
-      if (normalized_) {
-        x *= input_width;
-        y *= input_height;
-      }
-      // Un-center if coordinates are centered on the image center.
-      if (centered_) {
-        x /= 2.0f;
-        y /= 2.0f;
-        x += input_width / 2.0f;
-        y += input_height / 2.0f;
-      }
-      // Remove half of the glimpse window.
-      x -= width_ / 2.0f;
-      y -= height_ / 2.0f;
-
-      const Index offset_x = (Index) x;
-      const Index offset_y = (Index) y;
-      Index glimpse_width = width_;
-      Index glimpse_height = height_;
-      bool partial_overlap = false;
-      DSizes<Index, 3> slice_offset(0, offset_x, offset_y);
-      DSizes<Index, 3> slice_extent(num_channels, width_, height_);
-      DSizes<Index, 3> base_offset(0, 0, 0);
-
-      if (offset_x < 0) {
-        slice_offset[1] = 0;
-        glimpse_width = (std::max<Index>)(0, width_ + offset_x);
-        slice_extent[1] = glimpse_width;
-        base_offset[1] = width_ - glimpse_width;
-        partial_overlap = true;
-      } else if (offset_x + width_ >= input_width) {
-        glimpse_width = (std::max<Index>)(0, input_width - offset_x);
-        slice_extent[1] = glimpse_width;
-        partial_overlap = true;
-      }
-      if (offset_y < 0) {
-        slice_offset[2] = 0;
-        glimpse_height = (std::max<Index>)(0, height_ + offset_y);
-        slice_extent[2] = glimpse_height;
-        base_offset[2] = height_ - glimpse_height;
-        partial_overlap = true;
-      } else if (offset_y + height_ >= input_height) {
-        glimpse_height = (std::max<Index>)(0, input_height - offset_y);
-        slice_extent[2] = glimpse_height;
-        partial_overlap = true;
-      }
-      slice_extent[1] = std::min<Index>(input_width, slice_extent[1]);
-      slice_extent[2] = std::min<Index>(input_height, slice_extent[2]);
-
-      if (partial_overlap) {
-        if (uniform_noise_) {
-          // Initialize the glimpse with uniform noise.
-          typedef typename internal::remove_const<
-            typename internal::traits<Input>::Scalar>::type Scalar;
-          TensorFixedSize<Scalar, Sizes<> > mini;
-          mini.device(device) = input.template chip<3>(i).minimum();
-          TensorFixedSize<float, Sizes<> > range;
-          range.device(device) =
-              (input.template chip<3>(i).maximum() - mini).template cast<float>();
-
-          DSizes<Index, 3> glimpse_size(num_channels, width_, height_);
-          TensorMap<Tensor<float, 3> > tmp(NULL, glimpse_size);
-          output.template chip<3>(i).device(device) =
-              mini.reshape(Sizes<1,1,1>()).broadcast(glimpse_size) +
-              (tmp.random() * range.reshape(Sizes<1,1,1>()).broadcast(glimpse_size)).template cast<Scalar>();
-        } else {
-          // Initialize the glimpse with white noise: compute the mean and sigma
-          // of each channel, and use them to shape the gaussian.
-          DSizes<Index, 2> glimpse_size(width_, height_);
-          DSizes<Index, 2> input_size(input_width, input_height);
-          typedef typename internal::remove_const<
-            typename internal::traits<Input>::Scalar>::type Scalar;
-
-          for (int j = 0; j < num_channels; ++j) {
-            TensorFixedSize<Scalar, Sizes<> > mean;
-            mean.device(device) = input.template chip<3>(i).template chip<0>(j).template cast<float>().mean();
-            TensorFixedSize<float, Sizes<> > sigma;
-            sigma.device(device) =
-                (input.template chip<3>(i).template chip<0>(j).template cast<float>() - mean.reshape(Sizes<1,1>()).broadcast(input_size)).square().mean().sqrt();
-            TensorFixedSize<Scalar, Sizes<> > mini;
-            mini.device(device) = input.template chip<3>(i).template chip<0>(j).minimum();
-            TensorFixedSize<float, Sizes<> > maxi;
-            maxi.device(device) = input.template chip<3>(i).template chip<0>(j).maximum();
-
-            TensorMap<Tensor<float, 2> > tmp(NULL, glimpse_size);
-            output.template chip<3>(i).template chip<0>(j).device(device) =
-                (mean.reshape(Sizes<1,1>()).broadcast(glimpse_size) +
-                 (tmp.random(internal::NormalRandomGenerator<float>()) * sigma.reshape(Sizes<1,1>()).broadcast(glimpse_size)).template cast<Scalar>()).cwiseMin(maxi.reshape(Sizes<1,1>()).broadcast(glimpse_size)).cwiseMax(mini.reshape(Sizes<1,1>()).broadcast(glimpse_size));
-          }
-        }
-
-        // Copy the part of the glimpse that cover the input image if any.
-        if (glimpse_width == 0 || glimpse_height == 0) {
-          continue;
-        }
-        output.template chip<3>(i).slice(base_offset, slice_extent).device(device) = input.template chip<3>(i).slice(slice_offset, slice_extent);
-      } else {
-        output.template chip<3>(i).device(device) = input.template chip<3>(i).slice(slice_offset, slice_extent);
-      }
-    }
-  }
-
- private:
-  const Index width_;
-  const Index height_;
-  const std::vector<IndexPair<float> > offsets_;
-  const bool normalized_;
-  const bool centered_;
-  const bool uniform_noise_;
-};
-}
-
-
-template <typename Input>
-EIGEN_ALWAYS_INLINE
-static const TensorCustomUnaryOp<const GlimpseExtractionOp<typename internal::traits<Input>::Index>, const Input>
-ExtractGlimpses(const Input& input,
-                const typename internal::traits<Input>::Index width,
-                const typename internal::traits<Input>::Index height,
-                const std::vector<IndexPair<float> >& offsets,
-                const bool normalized = true, const bool centered = true,
-                const bool uniform_noise = true)
-{
-  EIGEN_STATIC_ASSERT(internal::traits<Input>::Layout == ColMajor, YOU_MADE_A_PROGRAMMING_MISTAKE);
-  EIGEN_STATIC_ASSERT(internal::traits<Input>::NumDimensions == 4, YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-  typedef typename internal::traits<Input>::Index Index;
-  const GlimpseExtractionOp<Index> op(width, height, offsets, normalized,
-                                      centered, uniform_noise);
-  return input.customOp(op);
-}
-
-} // end namespace Eigen
-
-#endif // EIGEN_CXX11_NEURAL_NETWORKS_ATTENTION_H
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/BackwardCuboidConvolutions.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/BackwardCuboidConvolutions.h
deleted file mode 100644
index 12ce234..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/BackwardCuboidConvolutions.h
+++ /dev/null
@@ -1,523 +0,0 @@
-#ifndef EIGEN_CXX11_NEURAL_NETWORKS_BACKWARD_CUBOID_CONVOLUTIONS_H
-#define EIGEN_CXX11_NEURAL_NETWORKS_BACKWARD_CUBOID_CONVOLUTIONS_H
-
-#include "Patch3d.h"
-
-namespace Eigen {
-
-/** CuboidConvolutionBackwardInput
-  * \ingroup CXX11_NeuralNetworks_Module
-  *
-  * \brief Computes the backprop for the input of a 3D convolution.
-  *
-  * The output_backward parameter is expected to be a tensor with a rank of 4 or more (channels, depth, height, width, and optionally others)
-  * The kernel parameter is expected to be a 5D tensor (filters, channels, kernel_depth, kernel_height, kernel_width)
-  * output_backward and kernel have to be in the same layout.
-  *
-  * The dimensions of the result will be filters, depth, height, width (and others if applicable).
-  *
-  * It is possible to swap the order of the depth, width and height dimensions provided that the same order is used in the input, the kernel, and the output.
-  *
-  * All dimension orders above are given for col-major, and should be reversed for row-major.
-  */
-
-template <typename OutputBackward, typename Kernel>
-EIGEN_ALWAYS_INLINE static const typename internal::conditional<
-    internal::traits<OutputBackward>::Layout == ColMajor,
-    TensorReshapingOp<
-        const DSizes<typename internal::traits<OutputBackward>::Index,
-                     internal::traits<OutputBackward>::NumDimensions>,
-        const TensorContractionOp<
-            const array< IndexPair<typename internal::traits<OutputBackward>::Index>, 2>,
-            const TensorReshapingOp<
-                const DSizes< typename internal::traits<OutputBackward>::Index, 3>,
-                const TensorReverseOp<const array<bool, 5>, const Kernel>
-            >,
-            const TensorReshapingOp<
-                const DSizes< typename internal::traits<OutputBackward>::Index, 3>,
-                const TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const OutputBackward>
-            >
-        >
-    >,
-    TensorReshapingOp<
-        const DSizes<typename internal::traits<OutputBackward>::Index,
-                     internal::traits<OutputBackward>::NumDimensions>,
-        const TensorContractionOp<
-            const array< IndexPair<typename internal::traits<OutputBackward>::Index>, 2>,
-            const TensorReshapingOp<
-                const DSizes< typename internal::traits<OutputBackward>::Index, 3>,
-                const TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const OutputBackward>
-            >,
-            const TensorReshapingOp<
-                const DSizes<typename internal::traits<OutputBackward>::Index, 3>,
-                const TensorReverseOp<const array<bool, 5>, const Kernel>
-            >
-        >
-    >
->::type
-CuboidConvolutionBackwardInput(
-    const Kernel& kernel, const OutputBackward& output_backward,
-    typename internal::traits<OutputBackward>::Index inputPlanes,
-    typename internal::traits<OutputBackward>::Index inputRows,
-    typename internal::traits<OutputBackward>::Index inputCols,
-    const DenseIndex stridePlanes = 1, const DenseIndex strideRows = 1,
-    const DenseIndex strideCols = 1) {
-  typedef typename internal::traits<OutputBackward>::Index TensorIndex;
-  const TensorRef<const Tensor<typename internal::traits<Kernel>::Scalar, internal::traits<Kernel>::NumDimensions, internal::traits<Kernel>::Layout, TensorIndex> > kern(kernel);
-  const TensorRef<const Tensor<typename internal::traits<OutputBackward>::Scalar, internal::traits<OutputBackward>::NumDimensions, internal::traits<OutputBackward>::Layout, TensorIndex> > out(output_backward);
-
-  EIGEN_STATIC_ASSERT(internal::traits<Kernel>::Layout == internal::traits<OutputBackward>::Layout, YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-  static const bool isColMajor = (internal::traits<OutputBackward>::Layout == ColMajor);
-
-  static const int NumDims = internal::traits<OutputBackward>::NumDimensions;
-
-  // Number of filters to apply. This is the same as the output depth of the result
-  const TensorIndex kernelFilters = isColMajor ? kern.dimensions()[0] : kern.dimensions()[4];
-  // Number of channels. This is the same as the input depth.
-  const TensorIndex kernelChannels = isColMajor ? kern.dimensions()[1] : kern.dimensions()[3];
-  const TensorIndex kernelPlanes = isColMajor ? kern.dimensions()[2] : kern.dimensions()[2];
-  const TensorIndex kernelRows = isColMajor ? kern.dimensions()[3] : kern.dimensions()[1];
-  const TensorIndex kernelCols = isColMajor ? kern.dimensions()[4] : kern.dimensions()[0];
-
-  const TensorIndex outputPlanes = isColMajor ? out.dimensions()[1] : out.dimensions()[NumDims - 2];
-  const TensorIndex outputRows = isColMajor ? out.dimensions()[2] : out.dimensions()[NumDims - 3];
-  const TensorIndex outputCols = isColMajor ? out.dimensions()[3] : out.dimensions()[NumDims - 4];
-
-  TensorIndex forward_pad_z, forward_pad_y, forward_pad_x;
-  const TensorIndex size_z = ceil(inputPlanes / static_cast<float>(stridePlanes));
-  const TensorIndex size_y = ceil(inputRows / static_cast<float>(strideRows));
-  const TensorIndex size_x = ceil(inputCols / static_cast<float>(strideCols));
-
-  // Infer padding type.
-  if (size_z == outputPlanes && size_y == outputRows && size_x == outputCols) {
-    // SAME padding.
-    const TensorIndex dz = size_z * stridePlanes + kernelPlanes - 1 - inputPlanes;
-    const TensorIndex dy = size_y * strideRows + kernelRows - 1 - inputRows;
-    const TensorIndex dx = size_x * strideCols + kernelCols - 1 - inputCols;
-
-    forward_pad_z = dz - dz / 2;
-    forward_pad_y = dy - dy / 2;
-    forward_pad_x = dx - dx / 2;
-  } else {
-    // VALID padding.
-    forward_pad_z = 0;
-    forward_pad_y = 0;
-    forward_pad_x = 0;
-  }
-  const TensorIndex padding_ztop = kernelPlanes - 1 - forward_pad_z;
-  const TensorIndex padding_top = kernelRows - 1 - forward_pad_y;
-  const TensorIndex padding_left = kernelCols - 1 - forward_pad_x;
-
-  const TensorIndex padding_zbottom = inputPlanes + kernelPlanes - 1 - (outputPlanes - 1) * stridePlanes - 1 - padding_ztop;
-  const TensorIndex padding_bottom = inputRows + kernelRows - 1 - (outputRows - 1) * strideRows - 1 - padding_top;
-  const TensorIndex padding_right = inputCols + kernelCols - 1 - (outputCols - 1) * strideCols - 1 - padding_left;
-
-  eigen_assert(padding_ztop >= 0);
-  eigen_assert(padding_zbottom >= 0);
-  eigen_assert(padding_top >= 0);
-  eigen_assert(padding_left >= 0);
-  eigen_assert(padding_bottom >= 0);
-  eigen_assert(padding_right >= 0);
-
-  // The kernel has dimensions filters X channels X patch_planes X patch_rows X patch_cols.
-  // We need to reverse the kernel along the spatial dimensions.
-  array<bool, 5> kernel_reverse;
-  if (isColMajor) {
-    kernel_reverse[0] = false;
-    kernel_reverse[1] = false;
-    kernel_reverse[2] = true;
-    kernel_reverse[3] = true;
-    kernel_reverse[4] = true;
-  } else {
-    kernel_reverse[0] = true;
-    kernel_reverse[1] = true;
-    kernel_reverse[2] = true;
-    kernel_reverse[3] = false;
-    kernel_reverse[4] = false;
-  }
-
-  DSizes<TensorIndex, 3> kernel_dims;
-  if (isColMajor) {
-    kernel_dims[0] = kernelFilters;
-    kernel_dims[1] = kernelChannels;
-    kernel_dims[2] = kernelRows * kernelCols * kernelPlanes;
-  } else {
-    kernel_dims[0] = kernelRows * kernelCols * kernelPlanes;
-    kernel_dims[1] = kernelChannels;
-    kernel_dims[2] = kernelFilters;
-  }
-
-  // The output_backward has dimensions out_depth X out_planes X out_rows X out_cols X OTHERS
-  // When we extract the image patches from output_backward, it will have dimensions:
-  //   out_depth X (patch_planes * patch_rows * patch_cols) X (input_planes * input_rows * input_cols * OTHERS)
-  DSizes<TensorIndex, 3> pre_contract_dims;
-  if (isColMajor) {
-    pre_contract_dims[0] = kernelFilters;
-    pre_contract_dims[1] = kernelRows * kernelCols * kernelPlanes;
-    pre_contract_dims[2] = inputRows * inputCols * inputPlanes;
-    for (int i = 4; i < NumDims; ++i) {
-      pre_contract_dims[2] *= out.dimension(i);
-    }
-  } else {
-    pre_contract_dims[2] = kernelFilters;
-    pre_contract_dims[1] = kernelRows * kernelCols * kernelPlanes;
-    pre_contract_dims[0] = inputRows * inputCols * inputPlanes;
-    for (int i = 0; i < NumDims - 4; ++i) {
-      pre_contract_dims[0] *= out.dimension(i);
-    }
-  }
-
-  // We will contract along dimensions (0, 2) in kernel and (0, 1) in
-  // output_backward, if this is col-major, and
-  // dimensions (0, 2) in kernel and (1, 2) in output_backward, if this row-major.
-  array<IndexPair<TensorIndex>, 2> contract_dims;
-  if (isColMajor) {
-    // col-major: kernel.contract(output.patches)
-    contract_dims[0] = IndexPair<TensorIndex>(0, 0);
-    contract_dims[1] = IndexPair<TensorIndex>(2, 1);
-  } else {
-    // row-major: output.patches.contract(kernel)
-    contract_dims[0] = IndexPair<TensorIndex>(1, 0);
-    contract_dims[1] = IndexPair<TensorIndex>(2, 2);
-  }
-
-  // Post contraction, the dimensions of the input_backprop is
-  //  channels X input_planes X input_rows X input_cols X OTHERS
-  DSizes<TensorIndex, NumDims> post_contract_dims;
-  if (isColMajor) {
-    post_contract_dims[0] = kernelChannels;
-    post_contract_dims[1] = inputPlanes;
-    post_contract_dims[2] = inputRows;
-    post_contract_dims[3] = inputCols;
-    for (int i = 4; i < NumDims; ++i) {
-      post_contract_dims[i] = out.dimension(i);
-    }
-  } else {
-    post_contract_dims[NumDims - 1] = kernelChannels;
-    post_contract_dims[NumDims - 2] = inputPlanes;
-    post_contract_dims[NumDims - 3] = inputRows;
-    post_contract_dims[NumDims - 4] = inputCols;
-    for (int i = 0; i < NumDims - 4; ++i) {
-      post_contract_dims[i] = out.dimension(i);
-    }
-  }
-
-  DSizes<TensorIndex, NumDims> strides;
-  for (int i = 0; i < NumDims; i++) {
-    strides[i] = 1;
-  }
-  if (isColMajor) {
-    strides[1] = stridePlanes;
-    strides[2] = strideRows;
-    strides[3] = strideCols;
-  } else {
-    strides[NumDims - 2] = stridePlanes;
-    strides[NumDims - 3] = strideRows;
-    strides[NumDims - 4] = strideCols;
-  }
-
-  return choose(
-      Cond<internal::traits<OutputBackward>::Layout == ColMajor>(),
-      kernel.reverse(kernel_reverse)
-          .reshape(kernel_dims)
-          .contract(
-              output_backward.extract_volume_patches(kernelPlanes, kernelRows, kernelCols,
-                                                     1, 1, 1, stridePlanes, strideRows, strideCols,
-                               padding_ztop, padding_zbottom,
-                               padding_top, padding_bottom,
-                               padding_left, padding_right)
-                  .reshape(pre_contract_dims),
-              contract_dims)
-          .reshape(post_contract_dims),
-      output_backward.extract_volume_patches(kernelPlanes, kernelRows, kernelCols,
-                                             1, 1, 1, stridePlanes, strideRows, strideCols,
-                       padding_ztop, padding_zbottom,
-                       padding_top, padding_bottom,
-                       padding_left, padding_right)
-          .reshape(pre_contract_dims)
-          .contract(kernel.reverse(kernel_reverse).reshape(kernel_dims),
-                    contract_dims)
-          .reshape(post_contract_dims));
-}
-
-
-/** CuboidConvolutionBackwardKernel
-  * \ingroup CXX11_NeuralNetworks_Module
-  *
-  * \brief Computes the backprop for the filter of a 3D convolution.
-  *
-  * The output_backward parameter is expected to be a tensor with a rank of 4 or more (channels, depth, height, width, and optionally others)
-  * The kernel parameter is expected to be a 4D tensor (filters, channels, kernel_depth, kernel_height, kernel_width)
-  * output_backward and kernel have to be in the same layout.
-  *
-  * The dimensions of the result will be filters, depth, height, width (and others if applicable).
-  *
-  * It is possible to swap the order of the depth, width and height dimensions provided that the same order is used in the input, the kernel, and the output.
-  *
-  * All dimension orders above are given for col-major, and should be reversed for row-major.
-  */
-template <typename OutputBackward, typename Input>
-EIGEN_ALWAYS_INLINE static const typename internal::conditional<
-    internal::traits<OutputBackward>::Layout == ColMajor,
-    const TensorShufflingOp<
-        const array<typename internal::traits<OutputBackward>::Index, 5>,
-        const TensorReverseOp<
-            const array<bool, 5>,
-            const TensorReshapingOp<
-                const DSizes<typename internal::traits<OutputBackward>::Index, 5>,
-                const TensorContractionOp<
-                    const array< IndexPair<typename internal::traits<Input>::Index>, 2>,
-                    const TensorReshapingOp<
-                        const DSizes<typename internal::traits<Input>::Index, 3>,
-                        const Input>,
-                    const TensorReshapingOp<
-                        const DSizes< typename internal::traits<OutputBackward>::Index, 4>,
-                        const TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const OutputBackward>
-                    >
-                >
-            >
-        >
-    >,
-    const TensorShufflingOp<
-        const array<typename internal::traits<OutputBackward>::Index, 5>,
-        const TensorReverseOp<
-            const array<bool, 5>,
-            const TensorReshapingOp<
-                const DSizes<typename internal::traits<OutputBackward>::Index, 5>,
-                const TensorContractionOp<
-                    const array< IndexPair<typename internal::traits<Input>::Index>, 2>,
-                    const TensorReshapingOp<
-                        const DSizes< typename internal::traits<OutputBackward>::Index, 4>,
-                        const TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const OutputBackward>
-                    >,
-                    const TensorReshapingOp<
-                        const DSizes<typename internal::traits<Input>::Index, 3>,
-                        const Input
-                    >
-                >
-            >
-        >
-    >
->::type
-CuboidConvolutionBackwardKernel(
-    const Input& input, const OutputBackward& output_backward,
-    typename internal::traits<Input>::Index kernelPlanes,
-    typename internal::traits<Input>::Index kernelRows,
-    typename internal::traits<Input>::Index kernelCols,
-    const DenseIndex stridePlanes = 1,
-    const DenseIndex strideRows = 1,
-    const DenseIndex strideCols = 1) {
-  typedef typename internal::traits<Input>::Index TensorIndex;
-  TensorRef<Tensor<typename internal::traits<Input>::Scalar, internal::traits<Input>::NumDimensions, internal::traits<Input>::Layout, TensorIndex> > in(input);
-  TensorRef<Tensor<typename internal::traits<OutputBackward>::Scalar, internal::traits<OutputBackward>::NumDimensions, internal::traits<OutputBackward>::Layout, TensorIndex> > out(output_backward);
-
-  EIGEN_STATIC_ASSERT(internal::traits<Input>::Layout == internal::traits<OutputBackward>::Layout, YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-  static const bool isColMajor = (internal::traits<Input>::Layout == ColMajor);
-
-  static const int NumDims = internal::traits<Input>::NumDimensions;
-  EIGEN_STATIC_ASSERT(internal::traits<Input>::NumDimensions == internal::traits<OutputBackward>::NumDimensions, YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-  const TensorIndex inputPlanes = isColMajor ? in.dimension(1) : in.dimension(NumDims - 2);
-  const TensorIndex inputRows = isColMajor ? in.dimension(2) : in.dimension(NumDims - 3);
-  const TensorIndex inputCols = isColMajor ? in.dimension(3) : in.dimension(NumDims - 4);
-
-  const TensorIndex outputPlanes = isColMajor ? out.dimension(1) : out.dimension(NumDims - 2);
-  const TensorIndex outputRows = isColMajor ? out.dimension(2) : out.dimension(NumDims - 3);
-  const TensorIndex outputCols = isColMajor ? out.dimension(3) : out.dimension(NumDims - 4);
-
-  const TensorIndex kernelFilters = isColMajor ? out.dimension(0) : out.dimension(NumDims - 1);
-  const TensorIndex kernelChannels = isColMajor ? in.dimension(0) : in.dimension(NumDims - 1);
-
-  TensorIndex forward_pad_z, forward_pad_y, forward_pad_x;
-  const TensorIndex size_z = ceil(inputPlanes / static_cast<float>(stridePlanes));
-  const TensorIndex size_y = ceil(inputRows / static_cast<float>(strideRows));
-  const TensorIndex size_x = ceil(inputCols / static_cast<float>(strideCols));
-
-  // Infer padding type.
-  if (size_z == outputPlanes && size_y == outputRows && size_x == outputCols) {
-    // SAME padding.
-    const TensorIndex dz = size_z * stridePlanes + kernelPlanes - 1 - inputPlanes;
-    const TensorIndex dy = size_y * strideRows + kernelRows - 1 - inputRows;
-    const TensorIndex dx = size_x * strideCols + kernelCols - 1 - inputCols;
-
-    forward_pad_z = dz - dz / 2;
-    forward_pad_y = dy - dy / 2;
-    forward_pad_x = dx - dx / 2;
-  } else {
-    // VALID padding.
-    forward_pad_z = 0;
-    forward_pad_y = 0;
-    forward_pad_x = 0;
-  }
-
-  const TensorIndex padding_ztop = kernelPlanes - 1 - forward_pad_z;
-  const TensorIndex padding_top = kernelRows - 1 - forward_pad_y;
-  const TensorIndex padding_left = kernelCols - 1 - forward_pad_x;
-
-  const TensorIndex padding_zbottom = inputPlanes + kernelPlanes - 1 - (outputPlanes - 1) * stridePlanes - 1 - padding_ztop;
-  const TensorIndex padding_bottom = inputRows + kernelRows - 1 - (outputRows - 1) * strideRows - 1 - padding_top;
-  const TensorIndex padding_right = inputCols + kernelCols - 1 - (outputCols - 1) * strideCols - 1 - padding_left;
-
-  eigen_assert(padding_ztop >= 0);
-  eigen_assert(padding_zbottom >= 0);
-  eigen_assert(padding_top >= 0);
-  eigen_assert(padding_left >= 0);
-  eigen_assert(padding_bottom >= 0);
-  eigen_assert(padding_right >= 0);
-
-  // The output_backward has dimensions out_depth X out_plaens X out_rows X out_cols X OTHERS
-  // When we extract the image patches from output_backward (with input as the
-  // kernel), it will have dimensions
-  //  (out_depth) X (input_planes * input_rows * input_cols) X (kernel_planes * kernel_rows * kernel_cols) X OTHERS
-  DSizes<TensorIndex, 4> pre_contract_dims;
-  if (isColMajor) {
-    pre_contract_dims[0] = kernelFilters;
-    pre_contract_dims[1] = inputRows * inputCols * inputPlanes;
-    pre_contract_dims[2] = kernelRows * kernelCols * kernelPlanes;
-    pre_contract_dims[3] = 1;
-    for (int i = 4; i < NumDims; ++i) {
-      pre_contract_dims[3] *= out.dimension(i);
-    }
-  } else {
-    pre_contract_dims[3] = kernelFilters;
-    pre_contract_dims[2] = inputRows * inputCols * inputPlanes;
-    pre_contract_dims[1] = kernelRows * kernelCols * kernelPlanes;
-    pre_contract_dims[0] = 1;
-    for (int i = 0; i < NumDims - 4; ++i) {
-      pre_contract_dims[0] *= out.dimension(i);
-    }
-  }
-
-  // The input has dimensions in_depth X (input_planes * input_rows * input_cols) X OTHERS
-  DSizes<TensorIndex, 3> input_dims;
-  if (isColMajor) {
-    input_dims[0] = kernelChannels;
-    input_dims[1] = inputRows * inputCols * inputPlanes;
-    input_dims[2] = 1;
-    for (int i = 4; i < NumDims; ++i) {
-      input_dims[2] *= in.dimension(i);
-    }
-    eigen_assert(input_dims[2] == pre_contract_dims[3]);
-  } else {
-    input_dims[2] = kernelChannels;
-    input_dims[1] = inputRows * inputCols * inputPlanes;
-    input_dims[0] = 1;
-    for (int i = 0; i < NumDims - 4; ++i) {
-      input_dims[0] *= in.dimension(i);
-    }
-    eigen_assert(input_dims[0] == pre_contract_dims[0]);
-  }
-
-  // We will contract along dimensions (1, 2) in in and (1, 3) in out, if
-  // this is col-major.
-  // For row-major, it's dimensions (0, 1) in in and (0, 2) in out.
-  array<IndexPair<TensorIndex>, 2> contract_dims;
-  if (isColMajor) {
-    // col-major: in.contract(output.patches)
-    contract_dims[0] = IndexPair<TensorIndex>(1, 1);
-    contract_dims[1] = IndexPair<TensorIndex>(2, 3);
-  } else {
-    // row-major: output.patches.contract(in)
-    contract_dims[0] = IndexPair<TensorIndex>(0, 0);
-    contract_dims[1] = IndexPair<TensorIndex>(2, 1);
-  }
-
-  // After the contraction, the kernel will have dimension
-  //   in_depth X out_depth X kernel_patches X kernel_rows X kernel_cols
-  // We will need to shuffle the first two dimensions and reverse the spatial dimensions.
-  // The end shape is:
-  //   out_depth X in_shape X kernel_planes X kernel_rows X kernel_cols
-
-  // This is the shape of the kernel *before* the shuffling.
-  DSizes<TensorIndex, 5> kernel_dims;
-  if (isColMajor) {
-    kernel_dims[0] = kernelChannels;
-    kernel_dims[1] = kernelFilters;
-    kernel_dims[2] = kernelPlanes;
-    kernel_dims[3] = kernelRows;
-    kernel_dims[4] = kernelCols;
-  } else {
-    kernel_dims[0] = kernelCols;
-    kernel_dims[1] = kernelRows;
-    kernel_dims[2] = kernelPlanes;
-    kernel_dims[3] = kernelFilters;
-    kernel_dims[4] = kernelChannels;
-  }
-
-  // Flip filters and channels.
-  array<TensorIndex, 5> kernel_shuffle;
-  if (isColMajor) {
-    kernel_shuffle[0] = 1;
-    kernel_shuffle[1] = 0;
-    kernel_shuffle[2] = 2;
-    kernel_shuffle[3] = 3;
-    kernel_shuffle[4] = 4;
-  } else {
-    kernel_shuffle[0] = 0;
-    kernel_shuffle[1] = 1;
-    kernel_shuffle[2] = 2;
-    kernel_shuffle[3] = 4;
-    kernel_shuffle[4] = 3;
-  }
-
-  // Reverse the spatial dimensions.
-  array<bool, 5> kernel_reverse;
-  if (isColMajor) {
-    kernel_reverse[0] = false;
-    kernel_reverse[1] = false;
-    kernel_reverse[2] = true;
-    kernel_reverse[3] = true;
-    kernel_reverse[4] = true;
-  } else {
-    kernel_reverse[0] = true;
-    kernel_reverse[1] = true;
-    kernel_reverse[2] = true;
-    kernel_reverse[3] = false;
-    kernel_reverse[4] = false;
-  }
-
-  DSizes<TensorIndex, NumDims> strides;
-  for (int i = 0; i < NumDims; i++) {
-    strides[i] = 1;
-  }
-  if (isColMajor) {
-    strides[1] = stridePlanes;
-    strides[2] = strideRows;
-    strides[3] = strideCols;
-  } else {
-    strides[NumDims - 2] = stridePlanes;
-    strides[NumDims - 3] = strideRows;
-    strides[NumDims - 4] = strideCols;
-  }
-  return choose(
-      Cond<internal::traits<Input>::Layout == ColMajor>(),
-      input.reshape(input_dims)
-          .contract(
-              output_backward.extract_volume_patches(
-                                 inputPlanes, inputRows, inputCols, 1,
-                                 1, 1, stridePlanes, strideRows, strideCols,
-
-                                 padding_ztop, padding_zbottom, padding_top,
-                                 padding_bottom, padding_left, padding_right)
-                  .reshape(pre_contract_dims),
-              contract_dims)
-          .reshape(kernel_dims)
-          .reverse(kernel_reverse)
-          .shuffle(kernel_shuffle),
-      output_backward.extract_volume_patches(
-                         inputPlanes, inputRows, inputCols, 1, 1, 1,
-                         stridePlanes, strideRows, strideCols, padding_ztop,
-                         padding_zbottom, padding_top, padding_bottom,
-                         padding_left, padding_right)
-          .reshape(pre_contract_dims)
-          .contract(input.reshape(input_dims), contract_dims)
-          .reshape(kernel_dims)
-          .reverse(kernel_reverse)
-          .shuffle(kernel_shuffle));
-}
-
-} // end namespace Eigen
-
-#endif // EIGEN_CXX11_NEURAL_NETWORKS_BACKWARD_CUBOID_CONVOLUTIONS_H
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/BackwardSpatialConvolutions.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/BackwardSpatialConvolutions.h
deleted file mode 100644
index 0f4ada2..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/BackwardSpatialConvolutions.h
+++ /dev/null
@@ -1,351 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2015 Ke Yang <yangke@gmail.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#ifndef EIGEN_CXX11_NEURAL_NETWORKS_BACKWARD_SPATIAL_CONVOLUTIONS_H
-#define EIGEN_CXX11_NEURAL_NETWORKS_BACKWARD_SPATIAL_CONVOLUTIONS_H
-
-namespace Eigen {
-
-/** SpatialConvolutionBackwardInput
-  * \ingroup CXX11_NeuralNetworks_Module
-  *
-  * \brief Computes the backprop for the input of a 2D convolution.
-  *
-  * The output_backward parameter is expected to be a tensor with a rank of 3 or more (channels, height, width, and optionally others)
-  * The kernel parameter is expected to be a 4D tensor (filters, channels, kernel_height, kernel_width)
-  * The output_backward and the kernel must both be in col-major layout. The result will also be in col-major layout.
-  *
-  * If in_stride > 1, then applies convolution with holes (aka atrous convolution), sampling every in_stride input pixels.
-  *
-  * The result can be assigned to a tensor of rank equal to the rank of the output_backward. The dimensions of the result will be filters, height, width (and others if applicable).
-  *
-  * It is possible to swap the order of the width and height dimensions provided that the same order is used in the input, the kernel, and the output.
-  *
-  */
-
-template <typename OutputBackward, typename Kernel>
-EIGEN_ALWAYS_INLINE
-static const typename internal::conditional<
-  internal::traits<OutputBackward>::Layout == ColMajor,
-  TensorReshapingOp<const DSizes<typename internal::traits<OutputBackward>::Index, internal::traits<OutputBackward>::NumDimensions>, const TensorContractionOp<const array<IndexPair<typename internal::traits<OutputBackward>::Index>, 2>, const TensorReshapingOp<const DSizes<typename internal::traits<OutputBackward>::Index, 3>, const TensorReverseOp<const array<bool, 4>, const Kernel> >, const TensorReshapingOp<const DSizes<typename internal::traits<OutputBackward>::Index, 3>, const TensorImagePatchOp<Dynamic, Dynamic, const OutputBackward> > > >,
-  TensorReshapingOp<const DSizes<typename internal::traits<OutputBackward>::Index, internal::traits<OutputBackward>::NumDimensions>, const TensorContractionOp<const array<IndexPair<typename internal::traits<OutputBackward>::Index>, 2>, const TensorReshapingOp<const DSizes<typename internal::traits<OutputBackward>::Index, 3>, const TensorImagePatchOp<Dynamic, Dynamic, const OutputBackward> >, const TensorReshapingOp<const DSizes<typename internal::traits<OutputBackward>::Index, 3>, const TensorReverseOp<const array<bool, 4>, const Kernel> > > > >::type
-SpatialConvolutionBackwardInput(const Kernel& kernel, const OutputBackward& output_backward, typename internal::traits<OutputBackward>::Index inputRows, typename internal::traits<OutputBackward>::Index inputCols, const DenseIndex stride = 1, const DenseIndex in_stride = 1) {
-
-  typedef typename internal::traits<OutputBackward>::Index TensorIndex;
-  TensorRef<Tensor<typename internal::traits<Kernel>::Scalar, internal::traits<Kernel>::NumDimensions, internal::traits<Kernel>::Layout, TensorIndex> > kern(kernel);
-  TensorRef<Tensor<typename internal::traits<OutputBackward>::Scalar, internal::traits<OutputBackward>::NumDimensions, internal::traits<OutputBackward>::Layout, TensorIndex> > out(output_backward);
-
-  EIGEN_STATIC_ASSERT(internal::traits<Kernel>::Layout == internal::traits<OutputBackward>::Layout, YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-  static const bool isColMajor = (internal::traits<OutputBackward>::Layout == ColMajor);
-
-  static const int NumDims = internal::traits<OutputBackward>::NumDimensions;
-
-  // Number of filters to apply. This is the same as the output depth of the result
-  const TensorIndex kernelFilters = isColMajor ? kern.dimensions()[0] : kern.dimensions()[3];
-  // Number of channels. This is the same as the input depth.
-  const TensorIndex kernelChannels = isColMajor ? kern.dimensions()[1] : kern.dimensions()[2];
-  const TensorIndex kernelRows = isColMajor ? kern.dimensions()[2] : kern.dimensions()[1];
-  const TensorIndex kernelCols = isColMajor ? kern.dimensions()[3] : kern.dimensions()[0];
-
-  // This is the effective kernel size, taking into account the (in_stride - 1) zero-values
-  // inserted between consecutive kernel elements in atrous convolution
-  const TensorIndex kernelRowsEff = kernelRows + (kernelRows - 1) * (in_stride - 1);
-  const TensorIndex kernelColsEff = kernelCols + (kernelCols - 1) * (in_stride - 1);
-
-  const TensorIndex outputRows = isColMajor ? output_backward.dimension(1) : output_backward.dimension(NumDims - 2);
-  const TensorIndex outputCols = isColMajor ? output_backward.dimension(2) : output_backward.dimension(NumDims - 3);
-
-  // Computing the forward padding
-  const TensorIndex forward_pad_top = ((outputRows - 1) * stride + kernelRowsEff - inputRows) / 2;
-  const TensorIndex forward_pad_left = ((outputCols - 1) * stride + kernelColsEff - inputCols) / 2;
-
-  const TensorIndex padding_top = kernelRowsEff - 1 - forward_pad_top;
-  const TensorIndex padding_left = kernelColsEff - 1 - forward_pad_left;
-  const TensorIndex padding_bottom = inputRows + kernelRowsEff - 1 - (outputRows - 1) * stride - 1 - padding_top;
-  const TensorIndex padding_right = inputCols + kernelColsEff - 1 - (outputCols - 1) * stride - 1 - padding_left;
-
-  eigen_assert(padding_top >= 0);
-  eigen_assert(padding_left >= 0);
-  eigen_assert(padding_bottom >= 0);
-  eigen_assert(padding_right >= 0);
-
-  // The kernel has dimensions filters X channels X patch_rows X patch_cols
-  // We need to reverse the kernel along dimensions corresponding to rows and
-  // cols.
-  // TODO(yangke): we can make things slightly faster by collapsing the dimensions
-  // where we don't reverse. Try that once we have a faster compiler.
-  array<bool, 4> kernel_reverse;
-  if (isColMajor) {
-    kernel_reverse[0] = false;
-    kernel_reverse[1] = false;
-    kernel_reverse[2] = true;
-    kernel_reverse[3] = true;
-  } else {
-    kernel_reverse[0] = true;
-    kernel_reverse[1] = true;
-    kernel_reverse[2] = false;
-    kernel_reverse[3] = false;
-  }
-
-  DSizes<TensorIndex, 3> kernel_dims;
-  if (isColMajor) {
-    kernel_dims[0] = kernelFilters;
-    kernel_dims[1] = kernelChannels;
-    kernel_dims[2] = kernelRows * kernelCols;
-  } else {
-    kernel_dims[0] = kernelRows * kernelCols;
-    kernel_dims[1] = kernelChannels;
-    kernel_dims[2] = kernelFilters;
-  }
-
-  // The output_backward has dimensions out_depth X out_rows X out_cols X OTHERS
-  // When we extract the image patches from output_backward, it will have dimensions
-  //   out_depth X (patch_rows * patch_cols) X (input_rows * input_cols * OTHERS)
-  DSizes<TensorIndex, 3> pre_contract_dims;
-  if (isColMajor) {
-    pre_contract_dims[0] = kernelFilters;
-    pre_contract_dims[1] = kernelRows * kernelCols;
-    pre_contract_dims[2] = inputRows * inputCols;
-    for (int i = 3; i < NumDims; ++i) {
-      pre_contract_dims[2] *= out.dimension(i);
-    }
-  } else {
-    pre_contract_dims[2] = kernelFilters;
-    pre_contract_dims[1] = kernelRows * kernelCols;
-    pre_contract_dims[0] = inputRows * inputCols;
-    for (int i = 0; i < NumDims - 3; ++i) {
-      pre_contract_dims[0] *= out.dimension(i);
-    }
-  }
-
-  // We will contract along dimensions (0, 2) in kernel and (0, 1) in
-  // output_backward, if this is col-major, and
-  // dimensions (0, 2) in kernel and (1, 2) in output_backward, if this row-major.
-  array<IndexPair<TensorIndex>, 2> contract_dims;
-  if (isColMajor) {
-    // col-major: kernel.contract(output.patches)
-    contract_dims[0] = IndexPair<TensorIndex>(0, 0);
-    contract_dims[1] = IndexPair<TensorIndex>(2, 1);
-  } else {
-    // row-major: output.patches.contract(kernel)
-    contract_dims[0] = IndexPair<TensorIndex>(1, 0);
-    contract_dims[1] = IndexPair<TensorIndex>(2, 2);
-  }
-
-  // Post contraction, the dimensions of the input_backprop is
-  //  channels X input_rows X input_cols X OTHERS
-  DSizes<TensorIndex, NumDims> post_contract_dims;
-  if (isColMajor) {
-    post_contract_dims[0] = kernelChannels;
-    post_contract_dims[1] = inputRows;
-    post_contract_dims[2] = inputCols;
-    for (int i = 3; i < NumDims; ++i) {
-      post_contract_dims[i] = out.dimension(i);
-    }
-  } else {
-    post_contract_dims[NumDims - 1] = kernelChannels;
-    post_contract_dims[NumDims - 2] = inputRows;
-    post_contract_dims[NumDims - 3] = inputCols;
-    for (int i = 0; i < NumDims - 3; ++i) {
-      post_contract_dims[i] = out.dimension(i);
-    }
-  }
-
-  return choose(Cond<internal::traits<OutputBackward>::Layout == ColMajor>(),
-                kernel.reverse(kernel_reverse).reshape(kernel_dims).contract(output_backward.extract_image_patches(kernelRows, kernelCols, 1, 1, in_stride, in_stride, stride, stride, padding_top, padding_bottom, padding_left, padding_right, 0).reshape(pre_contract_dims), contract_dims).reshape(post_contract_dims),
-                output_backward.extract_image_patches(kernelRows, kernelCols, 1, 1, in_stride, in_stride, stride, stride, padding_top, padding_bottom, padding_left, padding_right, 0).reshape(pre_contract_dims).contract(kernel.reverse(kernel_reverse).reshape(kernel_dims), contract_dims).reshape(post_contract_dims));
-}
-
-
-/** SpatialConvolutionBackwardKernel
-  * \ingroup CXX11_NeuralNetworks_Module
-  *
-  * \brief Computes the backprop for the filter of a 2D convolution.
-  *
-  * The output_backward parameter is expected to be a tensor with a rank of 3 or more (channels, height, width, and optionally others)
-  * The kernel parameter is expected to be a 4D tensor (filters, channels, kernel_height, kernel_width)
-  * The output_backward and the kernel must both be in col-major layout. The result will also be in col-major layout.
-  *
-  * If in_stride > 1, then applies convolution with holes (aka atrous convolution), sampling every in_stride input pixels.
-  *
-  * The result can be assigned to a tensor of rank equal to the rank of the output_backward. The dimensions of the result will be filters, height, width (and others if applicable).
-  *
-  * It is possible to swap the order of the width and height dimensions provided that the same order is used in the input, the kernel, and the output.
-  *
-  */
-// TODO(gpapan): Resolve a bug in TensorContractionInputMapper at SpatialConvolutions.h that yangke circumvented by using .reshape().reshape().
-// This can significantly accelerate SpatialConvolutionBackwardKernel.
-
-template <typename OutputBackward, typename Input>
-EIGEN_ALWAYS_INLINE
-static const typename internal::conditional<
-  internal::traits<OutputBackward>::Layout == ColMajor,
-  const TensorShufflingOp<const array<typename internal::traits<OutputBackward>::Index, 4>, const TensorReverseOp<const array<bool, 4>, const TensorReshapingOp<const DSizes<typename internal::traits<OutputBackward>::Index, 4>, const TensorContractionOp<const array<IndexPair<typename internal::traits<Input>::Index>, 2>, const TensorReshapingOp<const DSizes<typename internal::traits<Input>::Index, 3>, const Input>, const TensorReshapingOp<const DSizes<typename internal::traits<OutputBackward>::Index, 4>, const TensorReshapingOp<const DSizes<typename internal::traits<OutputBackward>::Index, 4>, const TensorImagePatchOp<Dynamic, Dynamic, const OutputBackward> > > > > > >,
-  const TensorShufflingOp<const array<typename internal::traits<OutputBackward>::Index, 4>, const TensorReverseOp<const array<bool, 4>, const TensorReshapingOp<const DSizes<typename internal::traits<OutputBackward>::Index, 4>, const TensorContractionOp<const array<IndexPair<typename internal::traits<Input>::Index>, 2>, const TensorReshapingOp<const DSizes<typename internal::traits<OutputBackward>::Index, 4>, const TensorReshapingOp<const DSizes<typename internal::traits<OutputBackward>::Index, 4>, const TensorImagePatchOp<Dynamic, Dynamic, const OutputBackward> > >, const TensorReshapingOp<const DSizes<typename internal::traits<Input>::Index, 3>, const Input> > > > > >::type
-SpatialConvolutionBackwardKernel(const Input& input, const OutputBackward& output_backward, typename internal::traits<Input>::Index kernelRows, typename internal::traits<Input>::Index kernelCols, const DenseIndex stride = 1, const DenseIndex in_stride = 1) {
-
-  typedef typename internal::traits<Input>::Index TensorIndex;
-  TensorRef<Tensor<typename internal::traits<Input>::Scalar, internal::traits<Input>::NumDimensions, internal::traits<Input>::Layout, TensorIndex> > in(input);
-  TensorRef<Tensor<typename internal::traits<OutputBackward>::Scalar, internal::traits<OutputBackward>::NumDimensions, internal::traits<OutputBackward>::Layout, TensorIndex> > out(output_backward);
-
-  EIGEN_STATIC_ASSERT(internal::traits<Input>::Layout == internal::traits<OutputBackward>::Layout, YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-  // stride and in_stride cannot both be larger than 1
-  eigen_assert(!(stride > 1 && in_stride > 1));
-
-  static const bool isColMajor = (internal::traits<Input>::Layout == ColMajor);
-
-  static const int NumDims = internal::traits<Input>::NumDimensions;
-  EIGEN_STATIC_ASSERT(internal::traits<Input>::NumDimensions == internal::traits<OutputBackward>::NumDimensions, YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-  const TensorIndex inputRows = isColMajor ? in.dimension(1) : in.dimension(NumDims - 2);
-  const TensorIndex inputCols = isColMajor ? in.dimension(2) : in.dimension(NumDims - 3);
-
-  const TensorIndex outputRows = isColMajor ? output_backward.dimension(1) : output_backward.dimension(NumDims - 2);
-  const TensorIndex outputCols = isColMajor ? output_backward.dimension(2) : output_backward.dimension(NumDims - 3);
-
-  // Number of filters to apply. This is the same as the output depth of the result
-  const TensorIndex kernelFilters = isColMajor ? out.dimensions()[0] : out.dimensions()[NumDims - 1];
-
-  // Number of channels. This is the same as the input depth.
-  const TensorIndex kernelChannels = isColMajor ? in.dimensions()[0] : in.dimensions()[NumDims - 1];
-
-  // This is the effective kernel size, taking into account the (in_stride - 1) zero-values
-  // inserted between consecutive kernel elements in atrous convolution
-  const TensorIndex kernelRowsEff = kernelRows + (kernelRows - 1) * (in_stride - 1);
-  const TensorIndex kernelColsEff = kernelCols + (kernelCols - 1) * (in_stride - 1);
-
-  // Computing the forward padding
-  const TensorIndex forward_pad_top = ((outputRows - 1) * stride + kernelRowsEff - inputRows) / 2;
-  const TensorIndex forward_pad_left = ((outputCols - 1) * stride + kernelColsEff - inputCols) / 2;
-
-  // TODO: factor out the padding computation.
-  const TensorIndex padding_top = kernelRowsEff - 1 - forward_pad_top;
-  const TensorIndex padding_left = kernelColsEff - 1 - forward_pad_left;
-  const TensorIndex padding_bottom = inputRows + kernelRowsEff - 1 - (outputRows - 1) * stride - 1 - padding_top;
-  const TensorIndex padding_right = inputCols + kernelColsEff - 1 - (outputCols - 1) * stride - 1 - padding_left;
-
-  eigen_assert(padding_top >= 0);
-  eigen_assert(padding_left >= 0);
-  eigen_assert(padding_bottom >= 0);
-  eigen_assert(padding_right >= 0);
-
-  // The output_backward has dimensions out_depth X out_rows X out_cols X OTHERS
-  // When we extract the image patches from output_backward (with input as the
-  // kernel), it will have dimensions
-  //  (out_depth) X (input_rows * input_cols) X (kernel_rows * kernel_cols) X OTHERS
-  DSizes<TensorIndex, 4> pre_contract_dims;
-  if (isColMajor) {
-    pre_contract_dims[0] = kernelFilters;
-    pre_contract_dims[1] = inputRows * inputCols;
-    pre_contract_dims[2] = kernelRows * kernelCols;
-    pre_contract_dims[3] = 1;
-    for (int i = 3; i < NumDims; ++i) {
-      pre_contract_dims[3] *= out.dimension(i);
-    }
-  } else {
-    pre_contract_dims[3] = kernelFilters;
-    pre_contract_dims[2] = inputRows * inputCols;
-    pre_contract_dims[1] = kernelRows * kernelCols;
-    pre_contract_dims[0] = 1;
-    for (int i = 0; i < NumDims - 3; ++i) {
-      pre_contract_dims[0] *= out.dimension(i);
-    }
-  }
-
-  // The input has dimensions in_depth X (input_rows * input_cols) X OTHERS
-  DSizes<TensorIndex, 3> input_dims;
-  if (isColMajor) {
-    input_dims[0] = kernelChannels;
-    input_dims[1] = inputRows * inputCols;
-    input_dims[2] = 1;
-    for (int i = 3; i < NumDims; ++i) {
-      input_dims[2] *= in.dimension(i);
-    }
-    eigen_assert(input_dims[2] == pre_contract_dims[3]);
-  } else {
-    input_dims[2] = kernelChannels;
-    input_dims[1] = inputRows * inputCols;
-    input_dims[0] = 1;
-    for (int i = 0; i < NumDims - 3; ++i) {
-      input_dims[0] *= in.dimension(i);
-    }
-    eigen_assert(input_dims[0] == pre_contract_dims[0]);
-  }
-
-  // We will contract along dimensions (1, 2) in and (1, 3) in out, if
-  // this is col-major.
-  // For row-major, it's dimensions (0, 1) in and (0, 2) in out.
-  array<IndexPair<TensorIndex>, 2> contract_dims;
-  if (isColMajor) {
-    // col-major: in.contract(output.patches)
-    contract_dims[0] = IndexPair<TensorIndex>(1, 1);
-    contract_dims[1] = IndexPair<TensorIndex>(2, 3);
-  } else {
-    // row-major: output.patches.contract(in)
-    contract_dims[0] = IndexPair<TensorIndex>(0, 0);
-    contract_dims[1] = IndexPair<TensorIndex>(2, 1);
-  }
-
-  // After the contraction, the kernel will have dimension
-  // in_depth X out_depth X kernel_rows X kernel_cols
-  // We will need to shuffle the first two dimensions and reverse the latter
-  // two dimensions.
-  // The end shape is
-  // out_depth X in_shape X kernel_rows X kernel_cols
-
-  // This is the shape of the kernel *before* the shuffling.
-  DSizes<TensorIndex, 4> kernel_dims;
-  if (isColMajor) {
-    kernel_dims[0] = kernelChannels;
-    kernel_dims[1] = kernelFilters;
-    kernel_dims[2] = kernelRows;
-    kernel_dims[3] = kernelCols;
-  } else {
-    kernel_dims[0] = kernelCols;
-    kernel_dims[1] = kernelRows;
-    kernel_dims[2] = kernelFilters;
-    kernel_dims[3] = kernelChannels;
-  }
-
-  array<TensorIndex, 4> kernel_shuffle;
-  if (isColMajor) {
-    kernel_shuffle[0] = 1;
-    kernel_shuffle[1] = 0;
-    kernel_shuffle[2] = 2;
-    kernel_shuffle[3] = 3;
-  } else {
-    kernel_shuffle[0] = 0;
-    kernel_shuffle[1] = 1;
-    kernel_shuffle[2] = 3;
-    kernel_shuffle[3] = 2;
-  }
-
-  array<bool, 4> kernel_reverse;
-  if (isColMajor) {
-    kernel_reverse[0] = false;
-    kernel_reverse[1] = false;
-    kernel_reverse[2] = true;
-    kernel_reverse[3] = true;
-  } else {
-    kernel_reverse[0] = true;
-    kernel_reverse[1] = true;
-    kernel_reverse[2] = false;
-    kernel_reverse[3] = false;
-  }
-
-  return choose(Cond<internal::traits<Input>::Layout == ColMajor>(),
-                input.reshape(input_dims).contract(output_backward.extract_image_patches(inputRows, inputCols, in_stride, in_stride, 1, 1, stride, stride, padding_top, padding_bottom, padding_left, padding_right, 0).reshape(pre_contract_dims).reshape(pre_contract_dims), contract_dims).reshape(kernel_dims).reverse(kernel_reverse).shuffle(kernel_shuffle),
-                output_backward.extract_image_patches(inputRows, inputCols, in_stride, in_stride, 1, 1, stride, stride, padding_top, padding_bottom, padding_left, padding_right, 0).reshape(pre_contract_dims).reshape(pre_contract_dims).contract(input.reshape(input_dims), contract_dims).reshape(kernel_dims).reverse(kernel_reverse).shuffle(kernel_shuffle));
-}
-
-} // end namespace Eigen
-
-#endif // EIGEN_CXX11_NEURAL_NETWORKS_BACKWARD_SPATIAL_CONVOLUTIONS_H
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/CuboidConvolution.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/CuboidConvolution.h
deleted file mode 100644
index dfb9dce..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/CuboidConvolution.h
+++ /dev/null
@@ -1,179 +0,0 @@
-#ifndef EIGEN_CXX11_SRC_NEURAL_NETWORKS_CUBOID_CONVOLUTION_H
-#define EIGEN_CXX11_SRC_NEURAL_NETWORKS_CUBOID_CONVOLUTION_H
-
-#include "Patch3d.h"
-
-namespace Eigen {
-
-/** CuboidConvolution
-  * \ingroup CXX11_NeuralNetworks_Module
-  *
-  * \brief Applies a 3D convolution over a multichannel input voxel block.
-  *
-  * The input parameter is expected to be a tensor with a rank of 4 or more (channels, depth, height, width, and optionally others).
-  * The kernel parameter is expected to be a 5D tensor (filters, channels, kernel_depth, kernel_height, kernel_width).
-  * The result can be assigned to a tensor of rank equal to the rank of the input. The dimensions of the result will be filters, depth, height, width (and others if applicable).
-  *
-  * The input and kernel have to be in the same layout, and both row-major and
-  * col-major are supported. The shapes given above are for col-major layout.
-  * For row-major, all dimensions should be reversed.
-  *
-  * It is possible to swap the order of the depth, width, and height dimensions provided that the same order is used in the input, the kernel, and the output.
-  */
-template <typename Input, typename Kernel>
-EIGEN_ALWAYS_INLINE
-static const typename internal::conditional <
-    internal::traits<Input>::Layout == ColMajor,
-    TensorReshapingOp<
-        const DSizes<typename internal::traits<Input>::Index,
-                     internal::traits<Input>::NumDimensions>,
-        const TensorContractionOp<
-            const array<IndexPair<typename internal::traits<Input>::Index>, 1>,
-            const TensorReshapingOp<
-                const DSizes<typename internal::traits<Input>::Index, 2>,
-                const Kernel>,
-            const TensorReshapingOp<
-                const DSizes<typename internal::traits<Input>::Index, 2>,
-                const TensorVolumePatchOp<Dynamic, Dynamic, Dynamic,
-                                          const Input> > > >,
-    TensorReshapingOp<
-        const DSizes<typename internal::traits<Input>::Index,
-                     internal::traits<Input>::NumDimensions>,
-        const TensorContractionOp<
-            const array<IndexPair<typename internal::traits<Input>::Index>, 1>,
-            const TensorReshapingOp<
-                const DSizes<typename internal::traits<Input>::Index, 2>,
-                const TensorVolumePatchOp<Dynamic, Dynamic, Dynamic,
-                                          const Input> > ,
-                const TensorReshapingOp<
-                    const DSizes<typename internal::traits<Input>::Index, 2>,
-                    const Kernel> > > >::type
-CuboidConvolution(const Input& input, const Kernel& kernel,
-                  const DenseIndex stridePlanes = 1,
-                  const DenseIndex strideRows = 1,
-                  const DenseIndex strideCols = 1,
-                  const PaddingType padding_type = PADDING_SAME) {
-  typedef typename internal::traits<Input>::Index TensorIndex;
-  TensorRef<Tensor<typename internal::traits<Input>::Scalar, internal::traits<Input>::NumDimensions, internal::traits<Input>::Layout, TensorIndex> > in(input);
-  TensorRef<Tensor<typename internal::traits<Kernel>::Scalar, internal::traits<Kernel>::NumDimensions, internal::traits<Kernel>::Layout, TensorIndex> > kern(kernel);
-
-  EIGEN_STATIC_ASSERT(internal::traits<Input>::Layout == internal::traits<Kernel>::Layout, YOU_MADE_A_PROGRAMMING_MISTAKE);
-  static const bool isColMajor = (internal::traits<Input>::Layout == ColMajor);
-  static const int NumDims = internal::traits<Input>::NumDimensions;
-
-  // Number of filters to apply. This is the same as the output depth of the result.
-  const TensorIndex kernelFilters = isColMajor ? kern.dimensions()[0] : kern.dimensions()[4];
-  const TensorIndex kernelChannels = isColMajor ? kern.dimensions()[1] : kern.dimensions()[3];
-
-  // Spatial size of the kernel.
-  const TensorIndex kernelDepth = isColMajor ? kern.dimensions()[2] : kern.dimensions()[2];
-  const TensorIndex kernelRows = isColMajor ? kern.dimensions()[3] : kern.dimensions()[1];
-  const TensorIndex kernelCols = isColMajor ? kern.dimensions()[4] : kern.dimensions()[0];
-
-  if (isColMajor) {
-    eigen_assert(kernelChannels == in.dimension(0));
-  } else {
-    eigen_assert(kernelChannels == in.dimension(NumDims - 1));
-  }
-
-  const TensorIndex inputPlanes = isColMajor ? in.dimension(1) : in.dimension(NumDims - 2);
-  const TensorIndex inputRows = isColMajor ? in.dimension(2) : in.dimension(NumDims - 3);
-  const TensorIndex inputCols = isColMajor ? in.dimension(3) : in.dimension(NumDims - 4);
-
-  const float stride_planes_f = static_cast<float>(stridePlanes);
-  const float stride_rows_f = static_cast<float>(strideRows);
-  const float stride_cols_f = static_cast<float>(strideCols);
-  TensorIndex out_depth;
-  TensorIndex out_height;
-  TensorIndex out_width;
-  switch (padding_type) {
-    case PADDING_VALID:
-      out_depth = ceil((inputPlanes - kernelDepth + 1.f) / stride_planes_f);
-      out_height = ceil((inputRows - kernelRows + 1.f) / stride_rows_f);
-      out_width = ceil((inputCols - kernelCols + 1.f) / stride_cols_f);
-      break;
-    case PADDING_SAME:
-      out_depth = ceil(inputPlanes / stride_planes_f);
-      out_height = ceil(inputRows / stride_rows_f);
-      out_width = ceil(inputCols / stride_cols_f);
-      break;
-    default:
-      eigen_assert(false && "unexpected padding");
-  }
-
-  DSizes<TensorIndex, 2> kernel_dims;
-  if (isColMajor) {
-    kernel_dims[0] = kernelFilters;
-    kernel_dims[1] = kernelChannels * kernelDepth * kernelRows * kernelCols;
-  } else {
-    kernel_dims[0] = kernelChannels * kernelDepth * kernelRows * kernelCols;
-    kernel_dims[1] = kernelFilters;
-  }
-
-  // Molds the output of the patch extraction result into a 2D tensor:
-  // - the first dimension (dims[0]): the patch values to be multiplied with the kernels
-  // - the second dimension (dims[1]): everything else
-  DSizes<TensorIndex, 2> pre_contract_dims;
-  if (isColMajor) {
-    pre_contract_dims[0] = kernelChannels * kernelDepth * kernelRows * kernelCols;
-    pre_contract_dims[1] = out_depth * out_height * out_width;
-    for (int i = 4; i < NumDims; ++i) {
-      pre_contract_dims[1] *= in.dimension(i);
-    }
-  } else {
-    pre_contract_dims[1] = kernelChannels * kernelDepth * kernelRows * kernelCols;
-    pre_contract_dims[0] = out_depth * out_height * out_width;
-    for (int i = 0; i < NumDims - 4; ++i) {
-      pre_contract_dims[0] *= in.dimension(i);
-    }
-  }
-
-  array<IndexPair<TensorIndex>, 1> contract_dims;
-  contract_dims[0] = IndexPair<TensorIndex>(1, 0);
-
-  // Molds the output of the contraction into the shape expected by the user
-  // (assuming ColMajor):
-  // - 1st dim: kernel filters
-  // - 2nd dim: output depth
-  // - 3nd dim: output height
-  // - 4rd dim: output width
-  // - 5th dim and beyond: everything else including batch size
-  DSizes<TensorIndex, NumDims> post_contract_dims;
-  if (isColMajor) {
-    post_contract_dims[0] = kernelFilters;
-    post_contract_dims[1] = out_depth;
-    post_contract_dims[2] = out_height;
-    post_contract_dims[3] = out_width;
-    for (int i = 4; i < NumDims; ++i) {
-      post_contract_dims[i] = in.dimension(i);
-    }
-  } else {
-    post_contract_dims[NumDims - 1] = kernelFilters;
-    post_contract_dims[NumDims - 2] = out_depth;
-    post_contract_dims[NumDims - 3] = out_height;
-    post_contract_dims[NumDims - 4] = out_width;
-    for (int i = 0; i < NumDims - 4; ++i) {
-      post_contract_dims[i] = in.dimension(i);
-    }
-  }
-
-  return choose(
-      Cond<internal::traits<Input>::Layout == ColMajor>(),
-      kernel.reshape(kernel_dims)
-          .contract(input.extract_volume_patches(
-                             kernelDepth, kernelRows, kernelCols, stridePlanes,
-                             strideRows, strideCols, padding_type)
-                        .reshape(pre_contract_dims),
-                    contract_dims)
-          .reshape(post_contract_dims),
-      input.extract_volume_patches(kernelDepth, kernelRows, kernelCols,
-                                   stridePlanes, strideRows, strideCols,
-                                   padding_type)
-          .reshape(pre_contract_dims)
-          .contract(kernel.reshape(kernel_dims), contract_dims)
-          .reshape(post_contract_dims));
-}
-
-} // end namespace Eigen
-
-#endif  // EIGEN_CXX11_SRC_NEURAL_NETWORKS_CUBOID_CONVOLUTION_H
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/Patch3d.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/Patch3d.h
deleted file mode 100644
index 2864f83..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/Patch3d.h
+++ /dev/null
@@ -1,240 +0,0 @@
-#ifndef EIGEN_CXX11_SRC_NEURAL_NETWORKS_PATCH3D_H
-#define EIGEN_CXX11_SRC_NEURAL_NETWORKS_PATCH3D_H
-
-#if not defined(__CUDACC__)
-#include <type_traits>
-#endif
-
-namespace Eigen {
-namespace internal {
-
-/** Extract3DPatches
- * \ingroup CXX11_NeuralNetworksModule
- *
- * \brief Extracts 3D patches from a multichannel input volume.
- *
- * The input parameter is expected to be a tensor with a rank of 4 or more
- * (channels, depth, height, width, optional others in col-major, and the
- * reverse order in row-major).
-
- * The return value will be a tensor of 3 more dimension than the input tensor.
- * In col-major, the first 4 dimensions of the result are: channels, patch_depth,
- * patch_height, patch_width. The next dimensions will identify the patch
- * position on the 3D grid of extracted patches: z, y, x. The remaining
- * dimensions, if any, will be the same as the 'other' dimensions of the input
- * tensor.
- */
-
-template <typename Input>
-EIGEN_ALWAYS_INLINE static const TensorStridingOp<
-    const array<typename internal::traits<Input>::Index,
-                internal::traits<Input>::NumDimensions + 3>,
-    const TensorReshapingOp<
-        const DSizes<typename internal::traits<Input>::Index,
-                     internal::traits<Input>::NumDimensions + 3>,
-        const TensorPatchOp<
-            const DSizes<typename internal::traits<Input>::Index,
-                         internal::traits<Input>::NumDimensions>,
-            const TensorPaddingOp<
-                const array<IndexPair<typename internal::traits<Input>::Index>,
-                            internal::traits<Input>::NumDimensions>,
-                const Input> > > >
-Extract3DPatches(
-    const Input& input, const DenseIndex patchPlanes,
-    const DenseIndex patchRows, const DenseIndex patchCols,
-    const DenseIndex stridePlanes, const DenseIndex strideRows,
-    const DenseIndex strideCols,
-    const DenseIndex paddingZTop, const DenseIndex paddingZBottom,
-    const DenseIndex paddingTop, const DenseIndex paddingBottom,
-    const DenseIndex paddingLeft, const DenseIndex paddingRight,
-    const typename internal::traits<Input>::Scalar padding_value = 0) {
-
-  typedef typename internal::traits<Input>::Index TensorIndex;
-  TensorRef<Tensor<typename internal::traits<Input>::Scalar, internal::traits<Input>::NumDimensions, internal::traits<Input>::Layout, TensorIndex> > in(input);
-
-  EIGEN_STATIC_ASSERT(internal::traits<Input>::NumDimensions >= 4, YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-  static const bool isColMajor = (internal::traits<Input>::Layout == ColMajor);
-  static const int NumDims = internal::traits<Input>::NumDimensions;
-  static const int ExtDims = NumDims + 3;
-
-  // Tensor size after patch extraction. We add three dimensions to unpack the
-  // linear patch index into a 3D grid over which stride() can work.
-  DSizes<TensorIndex, ExtDims> pre_stride_dims;
-
-  if (isColMajor) {
-    pre_stride_dims[0] = in.dimension(0);
-    pre_stride_dims[1] = patchPlanes;
-    pre_stride_dims[2] = patchRows;
-    pre_stride_dims[3] = patchCols;
-  } else {
-    pre_stride_dims[ExtDims - 1] = in.dimension(NumDims - 1);
-    pre_stride_dims[ExtDims - 4] = patchCols;
-    pre_stride_dims[ExtDims - 3] = patchRows;
-    pre_stride_dims[ExtDims - 2] = patchPlanes;
-  }
-
-  const TensorIndex inputPlanes = isColMajor ? in.dimension(1) : in.dimension(NumDims - 2);
-  const TensorIndex inputRows = isColMajor ? in.dimension(2) : in.dimension(NumDims - 3);
-  const TensorIndex inputCols = isColMajor ? in.dimension(3) : in.dimension(NumDims - 4);
-
-  array<IndexPair<TensorIndex>, NumDims> paddings;
-  for (int i = 0; i < NumDims; ++i) {
-    paddings[i] = IndexPair<TensorIndex>(0, 0);
-  }
-
-  paddings[isColMajor ? 1 : (NumDims - 2)] = IndexPair<TensorIndex>(paddingZTop, paddingZBottom);
-  paddings[isColMajor ? 2 : (NumDims - 3)] = IndexPair<TensorIndex>(paddingTop, paddingBottom);
-  paddings[isColMajor ? 3 : (NumDims - 4)] = IndexPair<TensorIndex>(paddingLeft, paddingRight);
-
-  pre_stride_dims[isColMajor ? 4 : (ExtDims - 5)] = inputPlanes + paddingZBottom + paddingZTop - patchPlanes + 1;
-  pre_stride_dims[isColMajor ? 5 : (ExtDims - 6)] = inputRows + paddingTop + paddingBottom - patchRows + 1;
-  pre_stride_dims[isColMajor ? 6 : (ExtDims - 7)] = inputCols + paddingLeft + paddingRight - patchCols + 1;
-
-  if (isColMajor) {
-    for (int i = 7; i < NumDims + 3; ++i) {
-      pre_stride_dims[i] = in.dimension(i - 3);
-    }
-  } else {
-    for (int i = 0; i < NumDims - 4; ++i) {
-      pre_stride_dims[i] = in.dimension(i);
-    }
-  }
-
-  DSizes<TensorIndex, NumDims> patch_dims;
-  if (isColMajor) {
-    patch_dims[0] = in.dimension(0);
-    patch_dims[1] = patchPlanes;
-    patch_dims[2] = patchRows;
-    patch_dims[3] = patchCols;
-    for (int i = 4; i < NumDims; ++i) {
-      patch_dims[i] = 1;
-    }
-  } else {
-    patch_dims[NumDims - 1] = in.dimension(NumDims - 1);
-    patch_dims[NumDims - 4] = patchCols;
-    patch_dims[NumDims - 3] = patchRows;
-    patch_dims[NumDims - 2] = patchPlanes;
-    for (int i = 0; i < NumDims - 4; i++) {
-      patch_dims[i] = 1;
-    }
-  }
-
-  array<TensorIndex, NumDims + 3> strides;
-  if (isColMajor) {
-    // No striding within the patches.
-    for (int i = 0; i < 4; ++i) {
-      strides[i] = 1;
-    }
-    // Apply striding in the spatial patch grid dimensions only.
-    strides[4] = stridePlanes;
-    strides[5] = strideRows;
-    strides[6] = strideCols;
-    // No striding in the remaining dimensions (batches, ...).
-    for (int i = 7; i < NumDims + 3; i++) {
-      strides[i] = 1;
-    }
-  } else {
-    // No striding within the patches.
-    for (int i = 1; i <= 4; ++i) {
-      strides[ExtDims - i] = 1;
-    }
-    // Apply striding in the spatial patch grid dimensions only.
-    strides[ExtDims - 7] = strideCols;
-    strides[ExtDims - 6] = strideRows;
-    strides[ExtDims - 5] = stridePlanes;
-    // No striding in the remaining dimensions (batches, ...).
-    for (int i = 0; i < NumDims - 4; i++) {
-      strides[i] = 1;
-    }
-  }
-
-  // TODO(mjanusz): Consider getting rid of pad(), and stride() and extend
-  // extract_patches to take additional parameters for padding/striding,
-  // similarly to extract_image_patches.
-  return input.pad(paddings, padding_value).extract_patches(patch_dims).reshape(pre_stride_dims).stride(strides);
-}
-
-
-template <typename Input>
-EIGEN_ALWAYS_INLINE static const TensorStridingOp<
-    const array<typename internal::traits<Input>::Index,
-                internal::traits<Input>::NumDimensions + 3>,
-    const TensorReshapingOp<
-        const DSizes<typename internal::traits<Input>::Index,
-                     internal::traits<Input>::NumDimensions + 3>,
-        const TensorPatchOp<
-            const DSizes<typename internal::traits<Input>::Index,
-                         internal::traits<Input>::NumDimensions>,
-            const TensorPaddingOp<
-                const array<IndexPair<typename internal::traits<Input>::Index>,
-                            internal::traits<Input>::NumDimensions>,
-                const Input> > > >
-Extract3DPatches(
-    const Input& input, const DenseIndex patchPlanes,
-    const DenseIndex patchRows, const DenseIndex patchCols,
-    const DenseIndex stridePlanes, const DenseIndex strideRows,
-    const DenseIndex strideCols, const PaddingType padding_type,
-    const typename internal::traits<Input>::Scalar padding_value = 0) {
-  typedef typename internal::traits<Input>::Index TensorIndex;
-  TensorRef<Tensor<typename internal::traits<Input>::Scalar, internal::traits<Input>::NumDimensions, internal::traits<Input>::Layout, TensorIndex> > in(input);
-
-  EIGEN_STATIC_ASSERT(internal::traits<Input>::NumDimensions >= 4, YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-  static const bool isColMajor = (internal::traits<Input>::Layout == ColMajor);
-  static const int NumDims = internal::traits<Input>::NumDimensions;
-
-  const TensorIndex inputPlanes = isColMajor ? in.dimension(1) : in.dimension(NumDims - 2);
-  const TensorIndex inputRows = isColMajor ? in.dimension(2) : in.dimension(NumDims - 3);
-  const TensorIndex inputCols = isColMajor ? in.dimension(3) : in.dimension(NumDims - 4);
-
-  switch (padding_type) {
-    case PADDING_VALID:
-      // No padding in any dimension.
-      return Extract3DPatches(input, patchPlanes, patchRows, patchCols,
-                              stridePlanes, strideRows, strideCols,
-                              0, 0, 0, 0, 0, 0, padding_value);
-    case PADDING_SAME: {
-      // The side of the tensor before striding should be just the expected
-      // output times the stride.
-      const TensorIndex size_z = ceil(inputPlanes / static_cast<float>(stridePlanes)) * stridePlanes;
-      const TensorIndex size_y = ceil(inputRows / static_cast<float>(strideRows)) * strideRows;
-      const TensorIndex size_x = ceil(inputCols / static_cast<float>(strideCols)) * strideCols;
-
-      // The size of the patch space is going to be: padded_input_size - patch_size + 1.
-      // This has to match the expected size before striding (pre_stride_dims).
-      // The deltas below extend the input to the expected size.
-      const TensorIndex dz = size_z + patchPlanes - 1 - inputPlanes;
-      const TensorIndex dy = size_y + patchRows - 1 - inputRows;
-      const TensorIndex dx = size_x + patchCols - 1 - inputCols;
-
-      return Extract3DPatches(input, patchPlanes, patchRows, patchCols,
-                              stridePlanes, strideRows, strideCols,
-                              dz - dz / 2, dz / 2,
-                              dy - dy / 2, dy / 2,
-                              dx - dx / 2, dx / 2,
-                              padding_value);
-    }
-    default:
-      eigen_assert(false && "unexpected padding");
-      // unreachable code to avoid missing return warning.
-      return Extract3DPatches(input, patchPlanes, patchRows, patchCols,
-                              stridePlanes, strideRows, strideCols,
-                              0, 0, 0, 0, 0, 0, padding_value);
-  }
-}
-
-// TODO(mjanusz): Switch this to a 'using' alias once CUDA supports C++11.
-template <typename Input>
-struct Extract3DPatchesType {
-  typedef const TensorStridingOp< const array<typename internal::traits<Input>::Index, internal::traits<Input>::NumDimensions + 3>,
-      const TensorReshapingOp< const DSizes<typename internal::traits<Input>::Index, internal::traits<Input>::NumDimensions + 3>,
-      const TensorPatchOp< const DSizes<typename internal::traits<Input>::Index, internal::traits<Input>::NumDimensions>,
-      const TensorPaddingOp< const array< IndexPair<typename internal::traits<Input>::Index>, internal::traits<Input>::NumDimensions>,
-      const Input> > > > type;
-};
-
-}  // end namespace internal
-}  // end namespace Eigen
-
-#endif  // EIGEN_CXX11_SRC_NEURAL_NETWORKS_PATCH3D_H
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/Pooling.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/Pooling.h
deleted file mode 100644
index 942b060..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/Pooling.h
+++ /dev/null
@@ -1,433 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#ifndef EIGEN_CXX11_NEURAL_NETWORKS_POOLING_H
-#define EIGEN_CXX11_NEURAL_NETWORKS_POOLING_H
-
-#include "Patch3d.h"
-
-namespace Eigen {
-
-/** SpatialMaxPooling
-  * \ingroup CXX11_NeuralNetworks_Module
-  *
-  * \brief Applies a max-pooling over a multichannel input image.
-  *
-  * The input parameter is expected to be a with a rank of 4 (channels, height, width, others in col-major, and the reverse of that in row-major).
-  *
-  * The result can be assigned to a tensor of rank equal to the rank of the input. The dimensions of the result will be channels, height, width, and others (in col-major, and the reverse of that if the input was row-major).
-  *
-  * The order of the width and height dimensions can be swapped if needed.
-  *
-*/
-#if !defined(EIGEN_HAS_INDEX_LIST)
-template <typename Input>
-EIGEN_ALWAYS_INLINE
-static const TensorReshapingOp<const Eigen::DSizes<typename internal::traits<Input>::Index, internal::traits<Input>::NumDimensions>, const TensorReductionOp<internal::MaxReducer<typename internal::remove_const<typename internal::traits<Input>::Scalar>::type>, const Eigen::array<int, 2>, const TensorImagePatchOp<Dynamic, Dynamic, const Input> > >
-#else
-template <typename Input>
-EIGEN_ALWAYS_INLINE
-static const TensorReshapingOp<const Eigen::DSizes<typename internal::traits<Input>::Index, internal::traits<Input>::NumDimensions>, const TensorReductionOp<internal::MaxReducer<typename internal::remove_const<typename internal::traits<Input>::Scalar>::type>, typename internal::conditional<internal::traits<Input>::Layout == ColMajor, const Eigen::IndexList<Eigen::type2index<1>, Eigen::type2index<2> >, const Eigen::IndexList<Eigen::type2index<2>, Eigen::type2index<3> > >::type, const TensorImagePatchOp<Dynamic, Dynamic, const Input> > >
-#endif
-SpatialMaxPooling(const Input& input, DenseIndex patchRows, DenseIndex patchCols,
-                  DenseIndex strideRows, DenseIndex strideCols, const PaddingType padding_type,
-                  DenseIndex in_strideRows = 1, DenseIndex in_strideCols = 1)
-{
-  EIGEN_STATIC_ASSERT(internal::traits<Input>::NumDimensions == 4, YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-  typedef typename internal::traits<Input>::Index TensorIndex;
-  TensorRef<Tensor<typename internal::traits<Input>::Scalar, internal::traits<Input>::NumDimensions, internal::traits<Input>::Layout, TensorIndex> > in(input);
-
-  const DenseIndex patchRowsEff = patchRows + (patchRows - 1) * (in_strideRows - 1);
-  const DenseIndex patchColsEff = patchCols + (patchCols - 1) * (in_strideCols - 1);
-
-  static const bool isColMajor = (internal::traits<Input>::Layout == ColMajor);
-  static const int idxRows = isColMajor ? 1 : 2;
-  static const int idxCols = isColMajor ? 2 : 1;
-
-  // Molds the output of the reduction into the shape expected by the user.
-  // (assuming col-major):
-  // - 1st dim: channels
-  // - 2nd dim: output height
-  // - 3rd dim: output width
-  // - 4th dim and beyond: everything else including batch size
-  Eigen::DSizes<TensorIndex, internal::traits<Input>::NumDimensions> post_reduce_dims;
-  post_reduce_dims[0] = in.dimension(0);
-  if (padding_type == PADDING_VALID) {
-    post_reduce_dims[idxRows] = numext::ceil((in.dimension(idxRows) - patchRowsEff + 1.f) / static_cast<float>(strideRows));
-    post_reduce_dims[idxCols] = numext::ceil((in.dimension(idxCols) - patchColsEff + 1.f) / static_cast<float>(strideCols));
-  } else {
-    post_reduce_dims[idxRows] = numext::ceil(in.dimension(idxRows) / static_cast<float>(strideRows));
-    post_reduce_dims[idxCols] = numext::ceil(in.dimension(idxCols) / static_cast<float>(strideCols));
-  }
-  post_reduce_dims[3] = in.dimension(3);
-
-#if !defined(EIGEN_HAS_INDEX_LIST)
-  // nvcc doesn't support cxx11
-  Eigen::array<int, 2> reduction_dims;
-  if (isColMajor) {
-    reduction_dims[0] = 1;
-    reduction_dims[1] = 2;
-  } else {
-    reduction_dims[0] = 2;
-    reduction_dims[1] = 3;
-  }
-#else
-  // Take advantage of cxx11 to give the compiler information it can use to
-  // optimize the code.
-  typename internal::conditional<internal::traits<Input>::Layout == ColMajor, const Eigen::IndexList<Eigen::type2index<1>, Eigen::type2index<2> >, const Eigen::IndexList<Eigen::type2index<2>, Eigen::type2index<3> > >::type reduction_dims;
-#endif
-
-  return input.extract_image_patches(patchRows, patchCols, strideRows, strideCols, in_strideRows, in_strideCols, padding_type, -Eigen::NumTraits<typename internal::remove_const<typename internal::traits<Input>::Scalar>::type>::highest()).maximum(reduction_dims).reshape(post_reduce_dims);
-}
-
-/** CuboidMaxPooling
-  * \ingroup CXX11_NeuralNetworks_Module
-  *
-  * \brief Applies a max-pooling over a multichannel input volume.
-  *
-  * The input parameter is expected to be a tensor with a rank of 5 (channels, depth, height, width, others in col-major, and the reverse of that in row-major).
-  *
-  * The result can be assigned to a tensor of rank equal to the rank of the input. The dimensions of the result will be channels, depth, height, width, and others (in col-major, and the reverse of that if the input was row-major).
-  *
-  * The order of the depth, width and height dimensions can be swapped if needed.
-  *
-*/
-#if !defined(EIGEN_HAS_INDEX_LIST)
-template <typename Input>
-EIGEN_ALWAYS_INLINE static const TensorReshapingOp<
-    const Eigen::DSizes<DenseIndex, internal::traits<Input>::NumDimensions>,
-    const TensorReductionOp<
-        internal::MaxReducer<float>, const Eigen::array<int, 1>,
-        const TensorReshapingOp<
-            const Eigen::DSizes<DenseIndex, 3>,
-            const TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const Input> > > >
-#else
-template <typename Input>
-EIGEN_ALWAYS_INLINE static const TensorReshapingOp<
-    const Eigen::DSizes<DenseIndex, internal::traits<Input>::NumDimensions>,
-    const TensorReductionOp<
-        internal::MaxReducer<float>,
-        const Eigen::IndexList<Eigen::type2index<1> >,
-        const TensorReshapingOp<
-            const Eigen::DSizes<DenseIndex, 3>,
-            const TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const Input> > > >
-#endif
-CuboidMaxPooling(const Input& input, DenseIndex patchPlanes,
-                 DenseIndex patchRows, DenseIndex patchCols,
-                 DenseIndex stridePlanes, DenseIndex strideRows,
-                 DenseIndex strideCols, const PaddingType padding_type) {
-  EIGEN_STATIC_ASSERT(internal::traits<Input>::NumDimensions == 5, YOU_MADE_A_PROGRAMMING_MISTAKE);
-  static const bool isColMajor = (internal::traits<Input>::Layout == ColMajor);
-
-  typedef typename internal::traits<Input>::Index TensorIndex;
-  TensorRef<Tensor<typename internal::traits<Input>::Scalar, internal::traits<Input>::NumDimensions, internal::traits<Input>::Layout, TensorIndex> > in(input);
-
-  static const int idxPlanes = isColMajor ? 1 : 3;
-  static const int idxRows = 2;
-  static const int idxCols = isColMajor ? 3 : 1;
-
-  // Molds the output of the reduction into the shape expected by the used
-  // (assuming col-major):
-  // - 1st dim: channels
-  // - 2nd dim: output depth
-  // - 3rd dim: output height
-  // - 4th dim: output width
-  // - 5th dim and beyond: everything else including batch size
-  Eigen::DSizes<DenseIndex, internal::traits<Input>::NumDimensions> post_reduce_dims;
-  post_reduce_dims[0] = in.dimension(0);
-  if (padding_type == PADDING_VALID) {
-    post_reduce_dims[idxPlanes] = numext::ceil((in.dimension(idxPlanes) - patchPlanes + 1.f) / static_cast<float>(stridePlanes));
-    post_reduce_dims[idxRows] = numext::ceil((in.dimension(idxRows) - patchRows + 1.f) / static_cast<float>(strideRows));
-    post_reduce_dims[idxCols] = numext::ceil((in.dimension(idxCols) - patchCols + 1.f) / static_cast<float>(strideCols));
-  } else {
-    post_reduce_dims[idxPlanes] = numext::ceil(in.dimension(idxPlanes) / static_cast<float>(stridePlanes));
-    post_reduce_dims[idxRows] = numext::ceil(in.dimension(idxRows) / static_cast<float>(strideRows));
-    post_reduce_dims[idxCols] = numext::ceil(in.dimension(idxCols) / static_cast<float>(strideCols));
-  }
-  post_reduce_dims[4] = in.dimension(4);
-
-  Eigen::DSizes<DenseIndex, 3> pre_reduce_dims;
-  pre_reduce_dims[1] = patchRows * patchCols * patchPlanes;
-  if (isColMajor) {
-    pre_reduce_dims[0] = post_reduce_dims[0];
-    pre_reduce_dims[2] = post_reduce_dims[1] * post_reduce_dims[2] * post_reduce_dims[3] * post_reduce_dims[4];
-  } else {
-    pre_reduce_dims[0] = post_reduce_dims[0] * post_reduce_dims[1] * post_reduce_dims[2] * post_reduce_dims[3];
-    pre_reduce_dims[2] = post_reduce_dims[4];
-  }
-
-#if !defined(EIGEN_HAS_INDEX_LIST)
-  // nvcc doesn't support cxx11
-  Eigen::array<int, 1> reduction_dims;
-  reduction_dims[0] = 1;
-#else
-  // Take advantage of cxx11 to give the compiler information it can use to
-  // optimize the code.
-  Eigen::IndexList<Eigen::type2index<1> > reduction_dims;
-#endif
-  return input.extract_volume_patches(patchPlanes, patchRows, patchCols,
-                                      stridePlanes, strideRows, strideCols,
-                                      padding_type, -Eigen::NumTraits<float>::highest())
-      .reshape(pre_reduce_dims)
-      .maximum(reduction_dims)
-      .reshape(post_reduce_dims);
-}
-
-
-/** SpatialAvgPooling
-  * \ingroup CXX11_NeuralNetworks_Module
-  *
-  * \brief Applies an average pooling over a multichannel input image.
-  *
-  * The input parameter is expected to be a tensor with a rank of 4 (channels, height, width, others in col-major, and the reverse of that in row-major).
-  *
-  * The result can be assigned to a tensor of rank equal to the rank of the input. The dimensions of the result will be channels, height, width, and others (in col-major, and the reverse of that if the input was row-major).
-  *
-  * The order of the width and height dimensions can be swapped if needed.
-  *
-*/
-namespace internal {
-
-template <typename T> struct AvgPoolMeanReducer
-{
-#if (EIGEN_ARCH_i386 || EIGEN_ARCH_x86_64) && !defined(__CUDACC__)
-  // We only support packet access for floats.
-  static const bool PacketAccess = internal::is_same<T, float>::value;
-#else
-  static const bool PacketAccess = false;
-#endif
-  static const bool IsStateful = true;
-
-  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE AvgPoolMeanReducer() : scalarCount_(0) {
-    typedef typename packet_traits<T>::type Packet;
-    packetCount_ = pset1<Packet>(0.0);
-  }
-
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const T t, T* accum) {
-    if (t != -Eigen::NumTraits<T>::highest()) {
-      (*accum) = (*accum) + t;
-      scalarCount_++;
-    }
-  }
-
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T initialize() const {
-    return static_cast<T>(0);
-  }
-
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T finalize(const T accum) const {
-    eigen_assert(scalarCount_ > 0);
-    return accum / scalarCount_;
-  }
-
-#if (EIGEN_ARCH_i386 || EIGEN_ARCH_x86_64) && !defined(__CUDACC__)
-#ifdef EIGEN_VECTORIZE_AVX
-#define pequal(a,b) _mm256_cmp_ps(a,b,_CMP_EQ_UQ)
-#define psel(a,b,false_mask) _mm256_blendv_ps(a,b,false_mask)
-#else
-#define pequal(a,b) _mm_cmpeq_ps(a,b)
-#define psel(a,b,false_mask) _mm_or_ps(_mm_andnot_ps(false_mask, a), _mm_and_ps(false_mask, b))
-#endif
-
-  template <typename Packet>
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reducePacket(const Packet& p, Packet* accum) {
-    reducePacketWithType(static_cast<T>(0), p, accum);
-  }
-
-  template <typename Packet>
-  void reducePacketWithType(T, const Packet& p, Packet* accum) {
-    Packet skip_mask = pequal(p, pset1<Packet>(-Eigen::NumTraits<T>::highest()));
-    (*accum) = padd<Packet>(*accum, psel(p, pset1<Packet>(0), skip_mask));
-    packetCount_ = padd<Packet>(packetCount_, psel(pset1<Packet>(1), pset1<Packet>(0), skip_mask));
-  }
-
-  template <typename Packet>
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet initializePacket() const {
-    return pset1<Packet>(0);
-  }
-
-  template <typename Packet>
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet finalizePacket(const Packet& vaccum) const {
-    return pdiv(vaccum, packetCount_);
-  }
-  template <typename Packet>
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T finalizeBoth(const T saccum, const Packet& vaccum) const {
-    return (saccum + predux(vaccum)) / (scalarCount_ + predux(packetCount_));
-  }
-#endif
-
- protected:
-    typedef typename packet_traits<T>::type Packet;
-    int scalarCount_;
-    Packet packetCount_;
-};
-
-}  // namespace internal
-
-#if !defined(EIGEN_HAS_INDEX_LIST)
-template <typename Input>
-EIGEN_ALWAYS_INLINE
-static const TensorReshapingOp<const Eigen::DSizes<typename internal::traits<Input>::Index, internal::traits<Input>::NumDimensions>, const TensorReductionOp<internal::AvgPoolMeanReducer<typename internal::remove_const<typename internal::traits<Input>::Scalar>::type>, const Eigen::array<int, 2>, const TensorImagePatchOp<Dynamic, Dynamic, const Input> > >
-#else
-template <typename Input>
-EIGEN_ALWAYS_INLINE
-static const TensorReshapingOp<const Eigen::DSizes<typename internal::traits<Input>::Index, internal::traits<Input>::NumDimensions>, const TensorReductionOp<internal::AvgPoolMeanReducer<typename internal::remove_const<typename internal::traits<Input>::Scalar>::type>, typename internal::conditional<internal::traits<Input>::Layout == ColMajor, const Eigen::IndexList<Eigen::type2index<1>, Eigen::type2index<2> >, const Eigen::IndexList<Eigen::type2index<2>, Eigen::type2index<3> > >::type, const TensorImagePatchOp<Dynamic, Dynamic, const Input> > >
-#endif
-SpatialAvgPooling(const Input& input, DenseIndex patchRows, DenseIndex patchCols,
-                  DenseIndex strideRows, DenseIndex strideCols, const PaddingType padding_type,
-                  DenseIndex in_strideRows = 1, DenseIndex in_strideCols = 1)
-{
-  EIGEN_STATIC_ASSERT(internal::traits<Input>::NumDimensions == 4, YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-  typedef typename internal::traits<Input>::Index TensorIndex;
-  TensorRef<Tensor<typename internal::traits<Input>::Scalar, internal::traits<Input>::NumDimensions, internal::traits<Input>::Layout, TensorIndex> > in(input);
-
-  const DenseIndex patchRowsEff = patchRows + (patchRows - 1) * (in_strideRows - 1);
-  const DenseIndex patchColsEff = patchCols + (patchCols - 1) * (in_strideCols - 1);
-
-  static const bool isColMajor = (internal::traits<Input>::Layout == ColMajor);
-  static const int idxRows = isColMajor ? 1 : 2;
-  static const int idxCols = isColMajor ? 2 : 1;
-
-  // Molds the output of the reduction into the shape expected by the user.
-  // (assuming col-major):
-  // - 1st dim: channels
-  // - 2nd dim: output height
-  // - 3rd dim: output width
-  // - 4th dim and beyond: everything else including batch size
-  Eigen::DSizes<TensorIndex, internal::traits<Input>::NumDimensions> post_reduce_dims;
-  post_reduce_dims[0] = in.dimension(0);
-  if (padding_type == PADDING_VALID) {
-    post_reduce_dims[idxRows] = numext::ceil((in.dimension(idxRows) - patchRowsEff + 1.f) / static_cast<float>(strideRows));
-    post_reduce_dims[idxCols] = numext::ceil((in.dimension(idxCols) - patchColsEff + 1.f) / static_cast<float>(strideCols));
-  } else {
-    post_reduce_dims[idxRows] = numext::ceil(in.dimension(idxRows) / static_cast<float>(strideRows));
-    post_reduce_dims[idxCols] = numext::ceil(in.dimension(idxCols) / static_cast<float>(strideCols));
-  }
-  post_reduce_dims[3] = in.dimension(3);
-
-  typedef typename internal::remove_const<typename internal::traits<Input>::Scalar>::type CoeffReturnType;
-  internal::AvgPoolMeanReducer<CoeffReturnType> mean_with_nan;
-
-#if !defined(EIGEN_HAS_INDEX_LIST)
-  // nvcc doesn't support cxx11
-  Eigen::array<int, 2> reduction_dims;
-  if (isColMajor) {
-    reduction_dims[0] = 1;
-    reduction_dims[1] = 2;
-  } else {
-    reduction_dims[0] = 2;
-    reduction_dims[1] = 3;
-  }
-#else
-  // Take advantage of cxx11 to give the compiler information it can use to
-  // optimize the code.
-  typename internal::conditional<internal::traits<Input>::Layout == ColMajor, const Eigen::IndexList<Eigen::type2index<1>, Eigen::type2index<2> >, const Eigen::IndexList<Eigen::type2index<2>, Eigen::type2index<3> > >::type reduction_dims;
-#endif
-  return input.extract_image_patches(patchRows, patchCols, strideRows, strideCols, in_strideRows, in_strideCols, padding_type, -Eigen::NumTraits<typename internal::remove_const<typename internal::traits<Input>::Scalar>::type>::highest()).reduce(reduction_dims, mean_with_nan).reshape(post_reduce_dims);
-}
-
-
-/** CuboidAvgPooling
-  * \ingroup CXX11_NeuralNetworks_Module
-  *
-  * \brief Applies an average pooling over a multichannel input volume.
-  *
-  * The input parameter is expected to be a tensor with a rank of 5 (channels, depth, height, width, others, and the reverse of that in row-major).
-  *
-  * The result can be assigned to a tensor of rank equal to the rank of the input. The dimensions of the result will be channels, depth, width, and others (in col-major, and the reverse of that if the input was row-major).
-  *
-  * The order of the depth, width and height dimensions can be swapped if needed.
-  *
-*/
-#if !defined(EIGEN_HAS_INDEX_LIST)
-template <typename Input>
-EIGEN_ALWAYS_INLINE static const TensorReshapingOp<
-    const Eigen::DSizes<DenseIndex, internal::traits<Input>::NumDimensions>,
-    const TensorReductionOp<
-        internal::AvgPoolMeanReducer<float>, const Eigen::array<int, 1>,
-        const TensorReshapingOp<
-            const Eigen::DSizes<DenseIndex, 3>,
-            const TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const Input> > > >
-#else
-template <typename Input>
-EIGEN_ALWAYS_INLINE static const TensorReshapingOp<
-      const Eigen::DSizes<DenseIndex, internal::traits<Input>::NumDimensions>,
-      const TensorReductionOp<
-          internal::AvgPoolMeanReducer<float>,
-          const Eigen::IndexList<Eigen::type2index<1> >,
-          const TensorReshapingOp<
-              const Eigen::DSizes<DenseIndex, 3>,
-              const TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const Input> > > >
-#endif
-CuboidAvgPooling(const Input& input, DenseIndex patchPlanes,
-                 DenseIndex patchRows, DenseIndex patchCols,
-                 DenseIndex stridePlanes, DenseIndex strideRows,
-                 DenseIndex strideCols, const PaddingType padding_type) {
-  EIGEN_STATIC_ASSERT(internal::traits<Input>::NumDimensions == 5, YOU_MADE_A_PROGRAMMING_MISTAKE);
-  static const bool isColMajor = (internal::traits<Input>::Layout == ColMajor);
-
-  typedef typename internal::traits<Input>::Index TensorIndex;
-  TensorRef<Tensor<typename internal::traits<Input>::Scalar, internal::traits<Input>::NumDimensions, internal::traits<Input>::Layout, TensorIndex> > in(input);
-
-  static const int idxPlanes = isColMajor ? 1 : 3;
-  static const int idxRows = 2;
-  static const int idxCols = isColMajor ? 3 : 1;
-  // Molds the output of the reduction into the shape expected by the used
-  // (assuming col-major):
-  // - 1st dim: channels
-  // - 2nd dim: outupt depth
-  // - 3rd dim: output height
-  // - 4th dim: output width
-  // - 5th dim and beyond: everything else including batch size
-  Eigen::DSizes<DenseIndex, internal::traits<Input>::NumDimensions> post_reduce_dims;
-  post_reduce_dims[0] = in.dimension(0);
-  if (padding_type == PADDING_VALID) {
-    post_reduce_dims[idxPlanes] = numext::ceil((in.dimension(idxPlanes) - patchPlanes + 1.f) / static_cast<float>(stridePlanes));
-    post_reduce_dims[idxRows] = numext::ceil((in.dimension(idxRows) - patchRows + 1.f) / static_cast<float>(strideRows));
-    post_reduce_dims[idxCols] = numext::ceil((in.dimension(idxCols) - patchCols + 1.f) / static_cast<float>(strideCols));
-  } else {
-    post_reduce_dims[idxPlanes] = numext::ceil(in.dimension(idxPlanes) / static_cast<float>(stridePlanes));
-    post_reduce_dims[idxRows] = numext::ceil(in.dimension(idxRows) / static_cast<float>(strideRows));
-    post_reduce_dims[idxCols] = numext::ceil(in.dimension(idxCols) / static_cast<float>(strideCols));
-  }
-  post_reduce_dims[4] = in.dimension(4);
-
-  Eigen::DSizes<DenseIndex, 3> pre_reduce_dims;
-  pre_reduce_dims[1] = patchRows * patchCols * patchPlanes;
-  if (isColMajor) {
-    pre_reduce_dims[0] = post_reduce_dims[0];
-    pre_reduce_dims[2] = post_reduce_dims[1] * post_reduce_dims[2] * post_reduce_dims[3] * post_reduce_dims[4];
-  } else {
-    pre_reduce_dims[0] = post_reduce_dims[0] * post_reduce_dims[1] * post_reduce_dims[2] * post_reduce_dims[3];
-    pre_reduce_dims[2] = post_reduce_dims[4];
-  }
-
-  typedef typename internal::remove_const<typename internal::traits<Input>::Scalar>::type CoeffReturnType;
-  internal::AvgPoolMeanReducer<CoeffReturnType> mean_with_nan;
-
-#if !defined(EIGEN_HAS_INDEX_LIST)
-  // nvcc doesn't support cxx11
-  Eigen::array<int, 1> reduction_dims;
-  reduction_dims[0] = 1;
-#else
-  // Take advantage of cxx11 to give the compiler information it can use to
-  // optimize the code.
-  Eigen::IndexList<Eigen::type2index<1> > reduction_dims;
-#endif
-  return input.extract_volume_patches(patchPlanes, patchRows, patchCols,
-                                      stridePlanes, strideRows, strideCols,
-                                      padding_type, -Eigen::NumTraits<float>::highest())
-      .reshape(pre_reduce_dims)
-      .reduce(reduction_dims, mean_with_nan)
-      .reshape(post_reduce_dims);
-}
-
-} // end namespace Eigen
-
-#endif // EIGEN_CXX11_NEURAL_NETWORKS_POOLING_H
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/SoftMax.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/SoftMax.h
deleted file mode 100644
index f0e21ab..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/SoftMax.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#ifndef EIGEN_CXX11_NEURAL_NETWORKS_SOFTMAX_H
-#define EIGEN_CXX11_NEURAL_NETWORKS_SOFTMAX_H
-
-namespace Eigen {
-
-/** SoftMax
-  * \ingroup CXX11_NeuralNetworks_Module
-  *
-  * \brief Applies a softmax
-  *
-  * The input parameter is expected to be a col-major tensor with a rank of 2 (depth and other).
-  *
-  * The result can be assigned to a tensor of rank and dimensions equal to that of the input. The result will be laid out in col-major order.
-  *
-*/
-
-namespace {
-class SoftmaxOp {
- public:
-  EIGEN_ALWAYS_INLINE SoftmaxOp(const float beta) : beta_(beta) { }
-
-  template <typename Input> EIGEN_ALWAYS_INLINE
-  typename Input::Dimensions dimensions(const Input& input) const {
-    return input.dimensions();
-  }
-
-  template <typename Input, typename Output, typename Device>
-  void eval(const Input& input, Output& output, const Device& device) const
-  {
-#if !defined(EIGEN_HAS_INDEX_LIST)
-    // nvcc doesn't support cxx11
-    Eigen::array<typename internal::traits<Input>::Index, 1> depth_dim;
-    depth_dim[0] = 0;
-    Eigen::array<typename internal::traits<Input>::Index, 2> bcast;
-    bcast[0] = dimensions(input)[0];
-    bcast[1] = 1;
-    DSizes<typename internal::traits<Input>::Index, 2> dims2d;
-    dims2d[0] = 1;
-    dims2d[1] = dimensions(input)[1];
-#else
-    // Take advantage of cxx11 to give the compiler information it can use to
-    // optimize the code.
-    Eigen::IndexList<Eigen::type2index<0>> depth_dim;
-    Eigen::IndexList<int, Eigen::type2index<1>> bcast;
-    bcast.set(0, dimensions(input)[0]);
-    Eigen::IndexList<Eigen::type2index<1>, typename internal::traits<Input>::Index> dims2d;
-    dims2d.set(1, dimensions(input)[1]);
-#endif
-
-    output.device(device) = ((input - input.maximum(depth_dim).eval().reshape(dims2d).broadcast(bcast)) * beta_).exp();
-    output.device(device) = output / (output.sum(depth_dim).eval().reshape(dims2d).broadcast(bcast));
-  }
-
- private:
-  const float beta_;
-};
-}
-
-
-template <typename Input>
-EIGEN_ALWAYS_INLINE
-static const TensorCustomUnaryOp<const SoftmaxOp, const Input>
-SoftMax(const Input& input, const float beta)
-{
-  EIGEN_STATIC_ASSERT(internal::traits<Input>::Layout == ColMajor, YOU_MADE_A_PROGRAMMING_MISTAKE);
-  EIGEN_STATIC_ASSERT(internal::traits<Input>::NumDimensions == 2, YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-  const SoftmaxOp op(beta);
-  return input.customOp(op);
-}
-
-
-} // end namespace Eigen
-
-#endif // EIGEN_CXX11_NEURAL_NETWORKS_SOFTMAX_H
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/SpatialConvolutions.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/SpatialConvolutions.h
deleted file mode 100644
index 8e2ddca..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/SpatialConvolutions.h
+++ /dev/null
@@ -1,775 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#ifndef EIGEN_CXX11_NEURAL_NETWORKS_SPATIAL_CONVOLUTIONS_H
-#define EIGEN_CXX11_NEURAL_NETWORKS_SPATIAL_CONVOLUTIONS_H
-
-namespace Eigen {
-
-namespace internal {
-
-// These optimizations require vector instructions
-#ifdef EIGEN_VECTORIZE
-
-// TODO: Consolidate this part of the code with the image patch extraction code
-// since they are both very similar.
-template <typename NewDimension, DenseIndex Rows, DenseIndex Cols, typename ArgType, typename Device,
-          typename Scalar_, typename Index,
-          typename nocontract_t, typename contract_t,
-          int Side, size_t packet_size,
-          bool inner_dim_contiguous, bool inner_dim_reordered, int Alignment>
-class TensorContractionInputMapper<Scalar_, Index, Side, TensorEvaluator<const TensorReshapingOp<NewDimension, const TensorImagePatchOp<Rows, Cols, ArgType> >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment>
-{
- public:
-  typedef TensorContractionInputMapper<Scalar_, Index, Side, TensorEvaluator<const TensorReshapingOp<NewDimension, const TensorImagePatchOp<Rows, Cols, ArgType> >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment> Self;
-  typedef TensorContractionSubMapper<Scalar_, Index, Side, TensorEvaluator<const TensorReshapingOp<NewDimension, const TensorImagePatchOp<Rows, Cols, ArgType> >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment> SubMapper;
-  typedef SubMapper VectorMapper;
-  typedef SubMapper LinearMapper;
-  typedef Scalar_ Scalar;
-  typedef typename packet_traits<Scalar>::type Packet;
-
-  TensorContractionInputMapper(const TensorEvaluator<const TensorReshapingOp<NewDimension, const TensorImagePatchOp<Rows, Cols, ArgType> >, Device>& tensor,
-                               const nocontract_t&, const nocontract_t&,
-                               const contract_t&, const contract_t&)
-      : m_impl(tensor.impl().impl())
-  {
-    Index patch_rows;
-    Index patch_depth;
-    if (internal::traits<ArgType>::Layout == ColMajor) {
-      patch_depth = tensor.impl().dimensions()[0];
-      patch_rows = tensor.impl().dimensions()[1];
-      m_patch_cols = tensor.impl().dimensions()[2];
-      m_num_patches = tensor.impl().dimensions()[3];
-    } else {
-      static const int NumDims = tensor.impl().dimensions().size();
-      patch_depth = tensor.impl().dimensions()[NumDims - 1];
-      patch_rows = tensor.impl().dimensions()[NumDims - 2];
-      m_patch_cols = tensor.impl().dimensions()[NumDims - 3];
-      m_num_patches = tensor.impl().dimensions()[NumDims - 4];
-    }
-    m_patch_row_inflate_strides = tensor.impl().rowInflateStride();
-    m_patch_col_inflate_strides = tensor.impl().colInflateStride();
-
-    m_colStride = patch_rows;
-
-    m_outputRows = tensor.impl().outputRows();
-    m_row_strides = tensor.impl().userRowStride();
-    m_col_strides = tensor.impl().userColStride();
-
-    m_in_row_strides = tensor.impl().userInRowStride();
-    m_in_col_strides = tensor.impl().userInColStride();
-
-    if (internal::traits<ArgType>::Layout == ColMajor) {
-      m_inputRows = tensor.impl().impl().dimensions()[1];
-      m_inputCols = tensor.impl().impl().dimensions()[2];
-    } else {
-      static const int NumDims = tensor.impl().impl().dimensions().size();
-      m_inputRows = tensor.impl().impl().dimensions()[NumDims - 2];
-      m_inputCols = tensor.impl().impl().dimensions()[NumDims - 3];
-    }
-
-    m_rowInputStride = patch_depth;
-    m_colInputStride = patch_depth * m_inputRows;
-    m_patchInputStride = patch_depth * m_inputRows * m_inputCols;
-
-    m_rowPaddingTop = tensor.impl().rowPaddingTop();
-    m_colPaddingLeft = tensor.impl().colPaddingLeft();
-
-    m_fastInputRowStride = internal::TensorIntDivisor<Index>(m_patch_row_inflate_strides);
-    m_fastInputColStride = internal::TensorIntDivisor<Index>(m_patch_col_inflate_strides);
-    m_fastNumPatches = internal::TensorIntDivisor<Index>(m_num_patches);
-    m_fastColStride = internal::TensorIntDivisor<Index>(m_colStride);
-    m_fastOutputRows = internal::TensorIntDivisor<Index>(m_outputRows);
-    m_fastDimZero = internal::TensorIntDivisor<Index>(patch_depth);
-  }
-
-  TensorContractionInputMapper(const TensorContractionInputMapper& base_mapper) :
-      m_impl(base_mapper.m_impl) {
-    m_patch_cols = base_mapper.m_patch_cols;
-    m_num_patches = base_mapper.m_num_patches;
-    m_patch_row_inflate_strides = base_mapper.m_patch_row_inflate_strides;
-    m_patch_col_inflate_strides = base_mapper.m_patch_col_inflate_strides;
-
-    m_colStride = base_mapper.m_colStride;
-
-    m_rowInputStride = base_mapper.m_rowInputStride;
-    m_colInputStride = base_mapper.m_colInputStride;
-    m_patchInputStride = base_mapper.m_patchInputStride;
-
-    m_inputRows = base_mapper.m_inputRows;
-    m_inputCols = base_mapper.m_inputCols;
-
-    m_outputRows = base_mapper.m_outputRows;
-    m_row_strides = base_mapper.m_row_strides;
-    m_col_strides = base_mapper.m_col_strides;
-
-    m_in_row_strides = base_mapper.m_in_row_strides;
-    m_in_col_strides = base_mapper.m_in_col_strides;
-
-    m_rowPaddingTop = base_mapper.m_rowPaddingTop;
-    m_colPaddingLeft = base_mapper.m_colPaddingLeft;
-
-    m_fastInputRowStride = base_mapper.m_fastInputRowStride;
-    m_fastInputColStride = base_mapper.m_fastInputColStride;
-    m_fastNumPatches = base_mapper.m_fastNumPatches;
-    m_fastColStride = base_mapper.m_fastColStride;
-    m_fastOutputRows = base_mapper.m_fastOutputRows;
-    m_fastDimZero = base_mapper.m_fastDimZero;
-  }
-
- // If true, turns off some optimizations for loading packets since the image
-  // patches are "non-standard" such as there are non-trivial strides or
-  // inflations in the input.
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE bool nonStandardPatches() const {
-    return m_in_row_strides != 1 || m_in_col_strides != 1 || m_patch_row_inflate_strides != 1 || m_patch_col_inflate_strides != 1;
-  }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_STRONG_INLINE SubMapper getSubMapper(Index i, Index j) const {
-    return SubMapper(*this, i, j);
-  }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_STRONG_INLINE LinearMapper getLinearMapper(Index i, Index j) const {
-    return LinearMapper(*this, i, j);
-  }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Scalar operator()(Index row) const {
-    Index rowIndex, colIndex, otherIndex;
-    computeBaseIndices(0, rowIndex, colIndex, otherIndex);
-    return loadCoeff(row, rowIndex, colIndex, otherIndex);
-  }
-
-  // Load the coefficient at the patchIndex location instead of the usual m_rowIndex,
-  // m_colIndex, m_otherIndex. This is currently only used by the gpu code.  EIGEN_DEVICE_FUNC
-  EIGEN_DEVICE_FUNC
-  EIGEN_STRONG_INLINE Scalar operator()(Index row, Index patchIndex) const {
-    Index rowIndex, colIndex, otherIndex;
-    computeBaseIndices(patchIndex, rowIndex, colIndex, otherIndex);
-    return loadCoeff(row, rowIndex, colIndex, otherIndex);
-  }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Packet loadPacket(Index row) const {
-    Index rowIndex, colIndex, otherIndex;
-    computeBaseIndices(0, rowIndex, colIndex, otherIndex);
-    return loadPacket(row, rowIndex, colIndex, otherIndex);
-  }
-
-  // Load the packet at the patchIndex location instead of the usual m_rowIndex,
-  // m_colIndex, m_otherIndex. This is currently only used by the gpu code.
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Packet loadPacket(Index row, Index patchIndex) const {
-    Index rowIndex, colIndex, otherIndex;
-    computeBaseIndices(patchIndex, rowIndex, colIndex, otherIndex);
-    return loadPacket(row, rowIndex, colIndex, otherIndex);
-  }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE const TensorEvaluator<ArgType, Device>& impl() const { return m_impl; }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Index patchDepth() const { return m_rowInputStride; }
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Index patchRows() const { return m_colStride; }
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Index patchCols() const { return m_patch_cols; }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Packet packetNoPadding(const Index depth, const Index baseIndex) const {
-    const Index inputIndex = depth + baseIndex;
-    return m_impl.template packet<Unaligned>(inputIndex);
-  }
-
- private:
-  friend class TensorContractionSubMapper<Scalar, Index, Side, TensorEvaluator<const TensorReshapingOp<NewDimension, const TensorImagePatchOp<Rows, Cols, ArgType> >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment>;
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_STRONG_INLINE Scalar loadCoeff(Index patchId, Index rowIndex, Index colIndex, Index otherIndex) const {
-    // Find the offset of the element wrt the location of the first element.
-    const Index patchOffset = patchId / m_fastDimZero;
-
-    const Index colOffset = patchOffset / m_fastColStride;
-    const Index inputCol = colIndex + colOffset * m_in_col_strides;
-    const Index origInputCol = (m_patch_col_inflate_strides == 1) ? inputCol : ((inputCol >= 0) ? (inputCol / m_fastInputColStride) : 0);
-    const Index rowOffset = patchOffset - colOffset * m_colStride;
-    const Index inputRow = rowIndex + rowOffset * m_in_row_strides;
-    const Index origInputRow = (m_patch_row_inflate_strides == 1) ? inputRow : ((inputRow >= 0) ? (inputRow / m_fastInputRowStride) : 0);
-    if (origInputCol < 0 | origInputRow < 0 | origInputCol >= m_inputCols | origInputRow >= m_inputRows |
-        (inputCol != origInputCol * m_patch_col_inflate_strides) | (inputRow != origInputRow * m_patch_row_inflate_strides)) {
-      return Scalar(0);
-    }
-    const Index depth = patchId - patchOffset * patchDepth();
-    const Index inputIndex = depth + origInputRow * m_rowInputStride + origInputCol * m_colInputStride + otherIndex;
-    return m_impl.coeff(inputIndex);
-  }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_STRONG_INLINE Scalar loadCoeffStandard(Index patchId, Index rowIndex, Index colIndex, Index otherIndex) const {
-    eigen_assert(!nonStandardPatches());
-
-    // Find the offset of the element wrt the location of the first element.
-    const Index patchOffset = patchId / m_fastDimZero;
-
-    const Index colOffset = patchOffset / m_fastColStride;
-    const Index inputCol = colIndex + colOffset;
-    const Index rowOffset = patchOffset - colOffset * m_colStride;
-    const Index inputRow = rowIndex + rowOffset;
-    if (inputCol < 0 || inputCol >= m_inputCols || inputRow < 0 || inputRow >= m_inputRows) {
-      return Scalar(0);
-    }
-    const Index depth = patchId - patchOffset * patchDepth();
-    const Index inputIndex = depth + inputRow * m_rowInputStride + inputCol * m_colInputStride + otherIndex;
-    return m_impl.coeff(inputIndex);
-  }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Packet loadPacket(Index patchId, Index rowIndex, Index colIndex, Index otherIndex) const {
-    const Index packetSize = internal::unpacket_traits<Packet>::size;
-    EIGEN_STATIC_ASSERT(packetSize > 1, YOU_MADE_A_PROGRAMMING_MISTAKE)
-    eigen_assert(patchId < patchDepth()*patchRows()*m_patch_cols);
-
-    if (nonStandardPatches()) {
-      return packetWithPossibleZero(patchId, rowIndex, colIndex, otherIndex);
-    }
-    return loadPacketStandard(patchId, rowIndex, colIndex, otherIndex);
-  }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Packet loadPacketStandard(Index patchId, Index rowIndex, Index colIndex, Index otherIndex) const {
-    const Index packetSize = internal::unpacket_traits<Packet>::size;
-    EIGEN_STATIC_ASSERT(packetSize > 1, YOU_MADE_A_PROGRAMMING_MISTAKE)
-    eigen_assert(patchId < patchDepth()*patchRows()*m_patch_cols);
-
-    eigen_assert(!nonStandardPatches());
-
-    if ((patchDepth() % packetSize) == 0) {
-      return loadPacketFast(patchId, rowIndex, colIndex, otherIndex);
-    }
-    else {
-      const Index patchOffsets[2] = {patchId / m_fastDimZero, (patchId + packetSize - 1) / m_fastDimZero};
-
-      const Index colOffsets[2] = {patchOffsets[0] / m_fastColStride, patchOffsets[1] / m_fastColStride};
-
-      const Index inputCols[2] = {colIndex + colOffsets[0], colIndex + colOffsets[1]};
-      if (inputCols[0] >= m_inputCols | inputCols[1] < 0) {
-        // all zeros
-        return internal::pset1<Packet>(Scalar(0));
-      }
-
-      if (inputCols[0] == inputCols[1]) {
-        const Index rowOffsets[2] = {patchOffsets[0] - colOffsets[0]*m_colStride, patchOffsets[1] - colOffsets[1]*m_colStride};
-        eigen_assert(rowOffsets[0] <= rowOffsets[1]);
-        const Index inputRows[2] = {rowIndex + rowOffsets[0], rowIndex + rowOffsets[1]};
-
-        if (inputRows[0] >= m_inputRows | inputRows[1] < 0) {
-          // all zeros
-          return internal::pset1<Packet>(Scalar(0));
-        }
-
-        if (inputRows[0] >= 0 & inputRows[1] < m_inputRows) {
-          // no padding
-          const Index depth = patchId - patchOffsets[0] * patchDepth();
-          const Index inputIndex = depth + inputRows[0] * m_rowInputStride + inputCols[0] * m_colInputStride + otherIndex;
-          return m_impl.template packet<Unaligned>(inputIndex);
-        }
-      }
-    }
-    return packetWithPossibleZero(patchId, rowIndex, colIndex, otherIndex);
-  }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Packet loadPacketFast(Index patchId, Index rowIndex, Index colIndex, Index otherIndex) const {
-    const Index packetSize = internal::unpacket_traits<Packet>::size;
-    EIGEN_STATIC_ASSERT(packetSize > 1, YOU_MADE_A_PROGRAMMING_MISTAKE)
-    eigen_assert(patchId < patchDepth()*patchRows()*m_patch_cols);
-
-    eigen_assert(!nonStandardPatches());
-    eigen_assert((patchDepth() % packetSize) == 0);
-    // Find the offset of the element wrt the location of the first element.
-    const Index patchOffset = patchId / m_fastDimZero;
-    eigen_assert((patchId + packetSize - 1)  / m_fastDimZero == patchOffset);
-
-    const Index colOffset = patchOffset / m_fastColStride;
-    const Index inputCol = colIndex + colOffset;
-    const Index rowOffset = patchOffset - colOffset*m_colStride;
-    const Index inputRow = rowIndex + rowOffset;
-    if (inputCol < 0 | inputRow < 0 | inputCol >= m_inputCols | inputRow >= m_inputRows) {
-      // all zeros
-      return internal::pset1<Packet>(Scalar(0));
-    }
-    // no padding
-    const Index depth = patchId - patchOffset * patchDepth();
-    const Index inputIndex = depth + inputRow * m_rowInputStride + inputCol * m_colInputStride + otherIndex;
-    return m_impl.template packet<Unaligned>(inputIndex);
-  }
-
-  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet packetWithPossibleZero(Index patchId, Index rowIndex, Index colIndex, Index otherIndex) const
-  {
-    const int packetSize = internal::unpacket_traits<Packet>::size;
-    EIGEN_ALIGN_MAX typename internal::remove_const<Scalar>::type values[packetSize];
-    for (int i = 0; i < packetSize; ++i) {
-      values[i] = loadCoeff(patchId+i, rowIndex, colIndex, otherIndex);
-    }
-    Packet rslt = internal::pload<Packet>(values);
-    return rslt;
-  }
-
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void computeBaseIndices(Index patchIndex, Index& rowIndex, Index& colIndex, Index& otherIndex) const {
-    const int NumInputDims = array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;
-    otherIndex = (NumInputDims == 3) ? 0 : patchIndex / m_fastNumPatches;
-    const Index patch2DIndex = (NumInputDims == 3) ? patchIndex : (patchIndex - otherIndex * m_num_patches);
-    otherIndex *= m_patchInputStride;
-    colIndex = patch2DIndex / m_fastOutputRows;
-    rowIndex = patch2DIndex - colIndex * m_outputRows;
-    colIndex = colIndex * m_col_strides - m_colPaddingLeft;
-    rowIndex = rowIndex * m_row_strides - m_rowPaddingTop;
-  }
-
-  Index m_patch_cols;    // number of colums in the patch
-  Index m_num_patches;   // number of patches to extract.
-  Index m_patch_row_inflate_strides;  // the strides for row inflation in the image patch
-  Index m_patch_col_inflate_strides;  // the strides for col inflation in the image patch
-  // Fast representation of inflation strides.
-  internal::TensorIntDivisor<Index> m_fastInputRowStride;
-  internal::TensorIntDivisor<Index> m_fastInputColStride;
-
-  Index m_otherStride;
-  Index m_colStride;
-  internal::TensorIntDivisor<Index> m_fastNumPatches;
-  internal::TensorIntDivisor<Index> m_fastColStride;
-
-  Index m_rowInputStride;     // row stride in the input tensor
-  Index m_colInputStride;     // col stride in the input tensor
-  Index m_patchInputStride;   // patch stride in the input tensor
-
-  Index m_inputRows;     // Number of rows in the input tensor
-  Index m_inputCols;     // Number of cols in the input tensor
-
-  Index m_outputRows;    // Number of patch rows
-
-  Index m_row_strides;   // User specified row stride
-  Index m_col_strides;   // User specified col stride
-
-  Index m_in_row_strides;  // User specified input row stride
-  Index m_in_col_strides;  // User specified input col stride
-
-  Index m_rowPaddingTop;    // Row padding
-  Index m_colPaddingLeft;   // Column padding
-
-  internal::TensorIntDivisor<Index> m_fastOutputRows;
-  internal::TensorIntDivisor<Index> m_fastDimZero;
-
-  const TensorEvaluator<ArgType, Device> m_impl;
-};
-
-
-template <typename NewDimension, DenseIndex Rows, DenseIndex Cols, typename ArgType, typename Device,
-          typename Scalar_, typename Index,
-          typename nocontract_t, typename contract_t,
-          int Side, size_t packet_size,
-          bool inner_dim_contiguous, bool inner_dim_reordered, int Alignment>
-class TensorContractionSubMapper<Scalar_, Index, Side, TensorEvaluator<const TensorReshapingOp<NewDimension, const TensorImagePatchOp<Rows, Cols, ArgType> >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment>
-{
- public:
-  typedef Scalar_ Scalar;
-  typedef typename packet_traits<Scalar>::type Packet;
-  typedef typename packet_traits<Scalar>::half HalfPacket;
-
-  typedef TensorContractionInputMapper<Scalar, Index, Side, TensorEvaluator<const TensorReshapingOp<NewDimension, const TensorImagePatchOp<Rows, Cols, ArgType> >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment> ParentMapper;
-  typedef TensorContractionSubMapper<Scalar, Index, Side, TensorEvaluator<const TensorReshapingOp<NewDimension, const TensorImagePatchOp<Rows, Cols, ArgType> >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment> Self;
-  typedef Self LinearMapper;
-
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorContractionSubMapper(const ParentMapper& base_mapper, Index vert_offset, Index horiz_offset)
-      : m_base_mapper(base_mapper), m_depth_offset(vert_offset), m_col_offset(horiz_offset) {
-    m_base_mapper.computeBaseIndices(m_col_offset, m_rowIndex, m_colIndex, m_otherIndex);
-  }
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorContractionSubMapper(const Self& base_mapper, Index vert_offset, Index horiz_offset)
-      : m_base_mapper(base_mapper.m_base_mapper), m_depth_offset(vert_offset+base_mapper.m_depth_offset), m_col_offset(horiz_offset+base_mapper.m_col_offset) {
-    m_base_mapper.computeBaseIndices(m_col_offset, m_rowIndex, m_colIndex, m_otherIndex);
-  }
-  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Scalar operator()(Index i) const {
-    return m_base_mapper.loadCoeff(i + m_depth_offset, m_rowIndex, m_colIndex, m_otherIndex);
-  }
-  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Scalar operator()(Index i, Index j) const {
-    return m_base_mapper(i + m_depth_offset, j + m_col_offset);
-  }
-
-  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet loadPacket(Index i) const {
-   return m_base_mapper.loadPacket(i + m_depth_offset, m_rowIndex, m_colIndex, m_otherIndex);
-  }
-  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet loadPacket(Index i, Index j) const {
-    return m_base_mapper.template loadPacket(i + m_depth_offset, j + m_col_offset);
-  }
-
-  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Scalar loadCoeffStandard(Index i) const {
-    return m_base_mapper.loadCoeffStandard(i + m_depth_offset, m_rowIndex, m_colIndex, m_otherIndex);
-  }
-
-  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet loadPacketFast(Index i) const {
-   return m_base_mapper.loadPacketFast(i + m_depth_offset, m_rowIndex, m_colIndex, m_otherIndex);
-  }
-  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet loadPacketStandard(Index i) const {
-   return m_base_mapper.loadPacketStandard(i + m_depth_offset, m_rowIndex, m_colIndex, m_otherIndex);
-  }
-  template <typename Packet>
-  EIGEN_DEVICE_FUNC bool aligned(Index) const {
-    return false;
-  }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE bool nonStandardPatches() const {
-    return m_base_mapper.nonStandardPatches();
-  }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Index patchDepth() const { return m_base_mapper.m_rowInputStride; }
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Index patchRows() const { return m_base_mapper.m_colStride; }
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Index patchCols() const { return m_base_mapper.m_patch_cols; }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Packet packetNoPadding(const Index depth, const Index baseIndex) const {
-    const Index inputIndex = depth + baseIndex;
-    return m_base_mapper.m_impl.template packet<Unaligned>(inputIndex);
-  }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE bool padRow(const Index row) const {
-    const Index r = m_rowIndex + row;
-    return r < 0 | r >= m_base_mapper.m_inputRows;
-  }
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE bool padCol(const Index col) const {
-    const Index c = m_colIndex + col;
-    return c < 0 | c >= m_base_mapper.m_inputCols;
-    }
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Index baseIndex(const Index row, const Index col) const {
-    const Index r = m_rowIndex + row;
-    const Index c = m_colIndex + col;
-    return r * m_base_mapper.m_rowInputStride + c * m_base_mapper.m_colInputStride + m_otherIndex;
-  }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Index rowOffset() const {
-    const Index patchOffset = m_depth_offset / m_base_mapper.m_fastDimZero;
-    const Index colOffset = patchOffset / m_base_mapper.m_fastColStride;
-    return patchOffset-colOffset*m_base_mapper.m_colStride;
-    }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Index colOffset() const {
-    const Index patchOffset = m_depth_offset / m_base_mapper.m_fastDimZero;
-    const Index colOffset = patchOffset / m_base_mapper.m_fastColStride;
-    return colOffset;
-    }
-
-  EIGEN_DEVICE_FUNC
-  EIGEN_ALWAYS_INLINE Index depthOffset() const {
-    const Index patchOffset = m_depth_offset % m_base_mapper.patchDepth();
-    return patchOffset;
-  }
-
-  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE LinearMapper getLinearMapper(Index i, Index j) const {
-    return LinearMapper(m_base_mapper, i + m_depth_offset, j + m_col_offset);
- }
-
- private:
-  const ParentMapper& m_base_mapper;  // that was a reference before
-  Index m_depth_offset;  // First row in the input matrix
-  Index m_col_offset;    // First col in the input matrix
-
-  Index m_rowIndex;        // precomputed row index corresponding to the col offset
-  Index m_colIndex;        // precomputed col index corresponding to the col offset
-  Index m_otherIndex;      // precomputed other index corresponding to the col offset
-
-};
-
-
-template <typename NewDimension, DenseIndex Rows, DenseIndex Cols, typename ArgType, typename Device,
-          typename Scalar, typename Index,
-          typename nocontract_t, typename contract_t,
-          int Side, size_t packet_size,
-          bool inner_dim_contiguous, bool inner_dim_reordered, int Alignment, int nr>
-struct gemm_pack_rhs<Scalar, Index, TensorContractionSubMapper<Scalar, Index, Side, TensorEvaluator<const TensorReshapingOp<NewDimension, const TensorImagePatchOp<Rows, Cols, ArgType> >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment>, nr, ColMajor, false, false> {
-
-  typedef TensorContractionSubMapper<Scalar, Index, Side, TensorEvaluator<const TensorReshapingOp<NewDimension, const TensorImagePatchOp<Rows, Cols, ArgType> >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment> SubMapper;
-  typedef SubMapper DataMapper;
-
-  static inline Index ceil_div(Index a, Index b) {
-    return (a + b - 1) / b;
-  }
-
-  EIGEN_DONT_INLINE void operator()(Scalar* block, const DataMapper& rhs, Index depth, Index cols, Index stride=0, Index offset=0) const {
-    eigen_assert(stride == 0);
-    eigen_assert(offset == 0);
-
-    EIGEN_STATIC_ASSERT((nr == 4), YOU_MADE_A_PROGRAMMING_MISTAKE);
-    typedef typename DataMapper::LinearMapper LinearMapper;
-    typedef typename packet_traits<Scalar>::type Packet;
-
-    const Index packet_cols4 = (cols/4) * 4;
-    const Index peeled_k = (depth/packet_size) * packet_size;
-    const bool non_standard_patches = rhs.nonStandardPatches();
-
-    for(Index j2=0; j2<packet_cols4; j2+=4)
-    {
-      const SubMapper dm0 = rhs.getLinearMapper(0, j2 + 0);
-      const SubMapper dm1 = rhs.getLinearMapper(0, j2 + 1);
-      const SubMapper dm2 = rhs.getLinearMapper(0, j2 + 2);
-      const SubMapper dm3 = rhs.getLinearMapper(0, j2 + 3);
-
-      Index k=0;
-      if((packet_size%4)==0 && !non_standard_patches)
-      {
-        const Index patch_depth = rhs.patchDepth();
-        if ((patch_depth % packet_size) == 0) {
-          const Index patch_cols = rhs.patchCols();
-          const Index patch_rows = rhs.patchRows();
-
-          const Index startCol = rhs.colOffset();
-          const Index max_cols = std::min<Index>(ceil_div(peeled_k, patch_rows*patch_depth)+startCol, patch_cols);
-
-          for (Index c = startCol; c < max_cols; ++c) {
-            eigen_assert(k < peeled_k);
-            const Index startRow = (c == startCol) ? rhs.rowOffset() : 0;
-            const Index max_rows = std::min<Index>(ceil_div(peeled_k-c*patch_rows*patch_depth, patch_depth)+startRow, patch_rows);
-
-            const bool pad_col0 = dm0.padCol(c);
-            const bool pad_col1 = dm1.padCol(c);
-            const bool pad_col2 = dm2.padCol(c);
-            const bool pad_col3 = dm3.padCol(c);
-            for (Index r = startRow; r < max_rows; ++r) {
-              eigen_assert(k < peeled_k);
-              const bool pad0 = pad_col0 || dm0.padRow(r);
-              const bool pad1 = pad_col1 || dm1.padRow(r);
-              const bool pad2 = pad_col2 || dm2.padRow(r);
-              const bool pad3 = pad_col3 || dm3.padRow(r);
-
-              const Index idx0 = dm0.baseIndex(r, c);
-              const Index idx1 = dm1.baseIndex(r, c);
-              const Index idx2 = dm2.baseIndex(r, c);
-              const Index idx3 = dm3.baseIndex(r, c);
-
-              const Index startDepth = ((c == startCol) && (r == startRow)) ? rhs.depthOffset() : 0;
-              const Index max_depth = std::min<Index>(peeled_k-c*patch_rows*patch_depth-r*patch_depth+startDepth, patch_depth);
-              eigen_assert(max_depth % packet_size == 0);
-              for (Index d = startDepth; d < max_depth; d += packet_size) {
-                eigen_assert(k < peeled_k);
-                PacketBlock<Packet, 4> kernel;
-                kernel.packet[0] = pad0 ? pset1<Packet>(0) : rhs.packetNoPadding(d, idx0);
-                kernel.packet[1] = pad1 ? pset1<Packet>(0) : rhs.packetNoPadding(d, idx1);
-                kernel.packet[2] = pad2 ? pset1<Packet>(0) : rhs.packetNoPadding(d, idx2);
-                kernel.packet[3] = pad3 ? pset1<Packet>(0) : rhs.packetNoPadding(d, idx3);
-                ptranspose(kernel);
-                pstoreu(block+0*packet_size, kernel.packet[0]);
-                pstoreu(block+1*packet_size, kernel.packet[1]);
-                pstoreu(block+2*packet_size, kernel.packet[2]);
-                pstoreu(block+3*packet_size, kernel.packet[3]);
-                block+=4*packet_size;
-                k += packet_size;
-              }
-            }
-          }
-
-          for(; k<peeled_k; k+=packet_size) {
-            PacketBlock<Packet, 4> kernel;
-            kernel.packet[0] = dm0.loadPacketFast(k);
-            kernel.packet[1] = dm1.loadPacketFast(k);
-            kernel.packet[2] = dm2.loadPacketFast(k);
-            kernel.packet[3] = dm3.loadPacketFast(k);
-            ptranspose(kernel);
-            pstoreu(block+0*packet_size, kernel.packet[0]);
-            pstoreu(block+1*packet_size, kernel.packet[1]);
-            pstoreu(block+2*packet_size, kernel.packet[2]);
-            pstoreu(block+3*packet_size, kernel.packet[3]);
-            block+=4*packet_size;
-          }
-        }
-        else {
-          for(; k<peeled_k; k+=packet_size) {
-            PacketBlock<Packet, 4> kernel;
-            kernel.packet[0] = dm0.loadPacketStandard(k);
-            kernel.packet[1] = dm1.loadPacketStandard(k);
-            kernel.packet[2] = dm2.loadPacketStandard(k);
-            kernel.packet[3] = dm3.loadPacketStandard(k);
-            ptranspose(kernel);
-            pstoreu(block+0*packet_size, kernel.packet[0]);
-            pstoreu(block+1*packet_size, kernel.packet[1]);
-            pstoreu(block+2*packet_size, kernel.packet[2]);
-            pstoreu(block+3*packet_size, kernel.packet[3]);
-            block+=4*packet_size;
-          }
-        }
-      }
-      if (!rhs.nonStandardPatches()) {
-        for(; k<depth; k++)
-        {
-          block[0] = dm0.loadCoeffStandard(k);
-          block[1] = dm1.loadCoeffStandard(k);
-          block[2] = dm2.loadCoeffStandard(k);
-          block[3] = dm3.loadCoeffStandard(k);
-          block += 4;
-        }
-      }
-      else {
-        for(; k<depth; k++)
-        {
-          block[0] = dm0(k);
-          block[1] = dm1(k);
-          block[2] = dm2(k);
-          block[3] = dm3(k);
-          block += 4;
-        }
-      }
-    }
-
-    // copy the remaining columns one at a time (nr==1)
-    for(Index j2=packet_cols4; j2<cols; ++j2)
-    {
-      const SubMapper dm0 = rhs.getLinearMapper(0, j2);
-      for(Index k=0; k<depth; k++)
-      {
-        *block = dm0(k);
-        block += 1;
-      }
-    }
-  }
-};
-
-#endif  // EIGEN_VECTORIZE
-}  // end namespace internal
-
-
-/** SpatialConvolution
-  * \ingroup CXX11_NeuralNetworks_Module
-  *
-  * \brief Applies a 2D convolution over a multichannel input image.
-  *
-  * The input parameter is expected to be a tensor with a rank of 3 or more (channels, height, width, and optionally others)
-  * The kernel parameter is expected to be a 4D tensor (filters, channels, kernel_height, kernel_width)
-  * The input and the kernel must both be in col-major layout. The result will also be in col-major layout.
-  *
-  * If in_stride > 1, then applies convolution with holes (aka atrous convolution), sampling every in_stride input pixels.
-  *
-  * The result can be assigned to a tensor of rank equal to the rank of the input. The dimensions of the result will be filters, height, width (and others if applicable).
-  *
-  * It is possible to swap the order of the width and height dimensions provided that the same order is used in the input, the kernel, and the output.
-  *
-  */
-template <typename Input, typename Kernel>
-EIGEN_ALWAYS_INLINE
-static const typename internal::conditional<
-  internal::traits<Input>::Layout == ColMajor,
-  TensorReshapingOp<const DSizes<typename internal::traits<Input>::Index, internal::traits<Input>::NumDimensions>, const TensorContractionOp<const array<IndexPair<typename internal::traits<Input>::Index>, 1>, const TensorReshapingOp<const DSizes<typename internal::traits<Input>::Index, 2>, const Kernel>, const TensorReshapingOp<const DSizes<typename internal::traits<Input>::Index, 2>, const TensorImagePatchOp<Dynamic, Dynamic, const Input> > > >,
-  TensorReshapingOp<const DSizes<typename internal::traits<Input>::Index, internal::traits<Input>::NumDimensions>, const TensorContractionOp<const array<IndexPair<typename internal::traits<Input>::Index>, 1>, const TensorReshapingOp<const DSizes<typename internal::traits<Input>::Index, 2>, const TensorImagePatchOp<Dynamic, Dynamic, const Input> >, const TensorReshapingOp<const DSizes<typename internal::traits<Input>::Index, 2>, const Kernel> > > >::type
-SpatialConvolution(const Input& input, const Kernel& kernel, const DenseIndex stride = 1, const PaddingType padding_type = PADDING_SAME, const DenseIndex in_stride = 1) {
-
-  typedef typename internal::traits<Input>::Index TensorIndex;
-  TensorRef<Tensor<typename internal::traits<Input>::Scalar, internal::traits<Input>::NumDimensions, internal::traits<Input>::Layout, TensorIndex> > in(input);
-  TensorRef<Tensor<typename internal::traits<Kernel>::Scalar, internal::traits<Kernel>::NumDimensions, internal::traits<Kernel>::Layout, TensorIndex> > kern(kernel);
-
-  EIGEN_STATIC_ASSERT(internal::traits<Input>::Layout == internal::traits<Kernel>::Layout, YOU_MADE_A_PROGRAMMING_MISTAKE);
-  static const bool isColMajor = (internal::traits<Input>::Layout == ColMajor);
-
-  static const int NumDims = internal::traits<Input>::NumDimensions;
-
-  // Number of filters to apply. This is the same as the output depth of the result
-  const TensorIndex kernelFilters = isColMajor ? kern.dimensions()[0] : kern.dimensions()[3];
-  // Number of channels. This is the same as the input depth.
-  const TensorIndex kernelChannels = isColMajor ? kern.dimensions()[1] : kern.dimensions()[2];
-  const TensorIndex kernelRows = isColMajor ? kern.dimensions()[2] : kern.dimensions()[1];
-  const TensorIndex kernelCols = isColMajor ? kern.dimensions()[3] : kern.dimensions()[0];
-
-  const DenseIndex kernelRowsEff = kernelRows + (kernelRows - 1) * (in_stride - 1);
-  const DenseIndex kernelColsEff = kernelCols + (kernelCols - 1) * (in_stride - 1);
-
-  array<IndexPair<TensorIndex>, 1> contract_dims;
-  contract_dims[0] = IndexPair<TensorIndex>(1, 0);
-
-  const TensorIndex InputRows = isColMajor ? in.dimension(1) : in.dimension(NumDims - 2);
-  const TensorIndex InputCols = isColMajor ? in.dimension(2) : in.dimension(NumDims - 3);
-
-  TensorIndex out_height;
-  TensorIndex out_width;
-  switch (padding_type) {
-    case PADDING_VALID:
-      out_height = numext::ceil((InputRows - kernelRowsEff + 1.f) / static_cast<float>(stride));
-      out_width = numext::ceil((InputCols - kernelColsEff + 1.f) / static_cast<float>(stride));
-      break;
-    case PADDING_SAME:
-      out_height = numext::ceil(InputRows / static_cast<float>(stride));
-      out_width = numext::ceil(InputCols / static_cast<float>(stride));
-      break;
-    default:
-      eigen_assert(false && "unexpected padding");
-  }
-
-  // Molds the output of the patch extraction code into a 2d tensor:
-  // - the first dimension (dims[0]): the patch values to be multiplied with the kernels
-  // - the second dimension (dims[1]): everything else
-  DSizes<TensorIndex, 2> pre_contract_dims;
-  if (isColMajor) {
-    pre_contract_dims[0] = kernelChannels * kernelRows * kernelCols;
-    pre_contract_dims[1] = out_height * out_width;
-    for (int i = 3; i < NumDims; ++i) {
-      pre_contract_dims[1] *= in.dimension(i);
-    }
-  } else {
-    pre_contract_dims[1] = kernelChannels * kernelRows * kernelCols;
-    pre_contract_dims[0] = out_height * out_width;
-    for (int i = 0; i < NumDims - 3; ++i) {
-      pre_contract_dims[0] *= in.dimension(i);
-    }
-  }
-
-  // Molds the output of the contraction into the shape expected by the used
-  // (assuming this is ColMajor):
-  // - 1st dim: kernel filters
-  // - 2nd dim: output height
-  // - 3rd dim: output width
-  // - 4th dim and beyond: everything else including batch size
-  DSizes<TensorIndex, NumDims> post_contract_dims;
-  if (isColMajor) {
-    post_contract_dims[0] = kernelFilters;
-    post_contract_dims[1] = out_height;
-    post_contract_dims[2] = out_width;
-    for (int i = 3; i < NumDims; ++i) {
-      post_contract_dims[i] = in.dimension(i);
-    }
-  } else {
-    post_contract_dims[NumDims - 1] = kernelFilters;
-    post_contract_dims[NumDims - 2] = out_height;
-    post_contract_dims[NumDims - 3] = out_width;
-    for (int i = 0; i < NumDims - 3; ++i) {
-      post_contract_dims[i] = in.dimension(i);
-    }
-  }
-
-  DSizes<TensorIndex, 2> kernel_dims;
-  if (isColMajor) {
-    kernel_dims[0] = kernelFilters;
-    kernel_dims[1] = kernelChannels * kernelRows * kernelCols;
-  } else {
-    kernel_dims[0] = kernelChannels * kernelRows * kernelCols;
-    kernel_dims[1] = kernelFilters;
-  }
-  // TODO(yangke): choose() is defined in TensorContraction.h -- consider
-  // moving it to somewhere more "common".
-  return choose(Cond<internal::traits<Input>::Layout == ColMajor>(),
-                kernel.reshape(kernel_dims).contract(input.extract_image_patches(kernelRows, kernelCols, stride, stride, in_stride, in_stride, padding_type).reshape(pre_contract_dims), contract_dims).reshape(post_contract_dims),
-                input.extract_image_patches(kernelRows, kernelCols, stride, stride, in_stride, in_stride, padding_type).reshape(pre_contract_dims).contract(kernel.reshape(kernel_dims), contract_dims).reshape(post_contract_dims));
-}
-
-} // end namespace Eigen
-
-#endif // EIGEN_CXX11_NEURAL_NETWORKS_SPATIAL_CONVOLUTIONS_H
diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/TensorConvolutionByFFT.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/TensorConvolutionByFFT.h
deleted file mode 100644
index 0e72173..0000000
--- a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/TensorConvolutionByFFT.h
+++ /dev/null
@@ -1,289 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>
-// Copyright (C) 2015 Jianwei Cui <thucjw@gmail.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONVOLUTIONBYFFT_H
-#define EIGEN_CXX11_TENSOR_TENSOR_CONVOLUTIONBYFFT_H
-
-namespace Eigen {
-
-/** \class TensorConvolutionByFFT
-  * \ingroup CXX11_Tensor_Module
-  *
-  * \brief Tensor convolution class.
-  *
-  *
-  */
-namespace internal {
-
-
-template<typename Dimensions, typename InputXprType, typename KernelXprType>
-struct traits<TensorConvolutionByFFTOp<Dimensions, InputXprType, KernelXprType> >
-{
-  // Type promotion to handle the case where the types of the lhs and the rhs are different.
-  typedef typename promote_storage_type<typename InputXprType::Scalar,
-                                        typename KernelXprType::Scalar>::ret Scalar;
-  typedef typename packet_traits<Scalar>::type Packet;
-  typedef typename promote_storage_type<typename traits<InputXprType>::StorageKind,
-                                        typename traits<KernelXprType>::StorageKind>::ret StorageKind;
-  typedef typename promote_index_type<typename traits<InputXprType>::Index,
-                                      typename traits<KernelXprType>::Index>::type Index;
-  typedef typename InputXprType::Nested LhsNested;
-  typedef typename KernelXprType::Nested RhsNested;
-  typedef typename remove_reference<LhsNested>::type _LhsNested;
-  typedef typename remove_reference<RhsNested>::type _RhsNested;
-  static const int NumDimensions = traits<InputXprType>::NumDimensions;
-  static const int Layout = traits<InputXprType>::Layout;
-
-  enum {
-    Flags = 0,
-  };
-};
-
-template<typename Dimensions, typename InputXprType, typename KernelXprType>
-struct eval<TensorConvolutionByFFTOp<Dimensions, InputXprType, KernelXprType>, Eigen::Dense>
-{
-  typedef const TensorConvolutionByFFTOp<Dimensions, InputXprType, KernelXprType>& type;
-};
-
-template<typename Dimensions, typename InputXprType, typename KernelXprType>
-struct nested<TensorConvolutionByFFTOp<Dimensions, InputXprType, KernelXprType>, 1, typename eval<TensorConvolutionByFFTOp<Dimensions, InputXprType, KernelXprType> >::type>
-{
-  typedef TensorConvolutionByFFTOp<Dimensions, InputXprType, KernelXprType> type;
-};
-
-}  // end namespace internal
-
-
-
-template<typename Indices, typename InputXprType, typename KernelXprType>
-class TensorConvolutionByFFTOp : public TensorBase<TensorConvolutionByFFTOp<Indices, InputXprType, KernelXprType> >
-{
-  public:
-  typedef typename Eigen::internal::traits<TensorConvolutionByFFTOp>::Scalar Scalar;
-  typedef typename Eigen::internal::traits<TensorConvolutionByFFTOp>::Packet Packet;
-  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;
-  typedef typename internal::promote_storage_type<typename InputXprType::CoeffReturnType,
-                                                  typename KernelXprType::CoeffReturnType>::ret CoeffReturnType;
-  typedef typename internal::promote_storage_type<typename InputXprType::PacketReturnType,
-                                                  typename KernelXprType::PacketReturnType>::ret PacketReturnType;
-  typedef typename Eigen::internal::nested<TensorConvolutionByFFTOp>::type Nested;
-  typedef typename Eigen::internal::traits<TensorConvolutionByFFTOp>::StorageKind StorageKind;
-  typedef typename Eigen::internal::traits<TensorConvolutionByFFTOp>::Index Index;
-
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorConvolutionByFFTOp(const InputXprType& input, const KernelXprType& kernel, const Indices& dims)
-      : m_input_xpr(input), m_kernel_xpr(kernel), m_indices(dims) {}
-
-    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
-    const Indices& indices() const { return m_indices; }
-
-    /** \returns the nested expressions */
-    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
-    const typename internal::remove_all<typename InputXprType::Nested>::type&
-    inputExpression() const { return m_input_xpr; }
-
-    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
-    const typename internal::remove_all<typename KernelXprType::Nested>::type&
-    kernelExpression() const { return m_kernel_xpr; }
-
-  protected:
-    typename InputXprType::Nested m_input_xpr;
-    typename KernelXprType::Nested m_kernel_xpr;
-    const Indices m_indices;
-};
-
-
-template<typename Indices, typename InputArgType, typename KernelArgType, typename Device>
-struct TensorEvaluator<const TensorConvolutionByFFTOp<Indices, InputArgType, KernelArgType>, Device>
-{
-  typedef TensorConvolutionByFFTOp<Indices, InputArgType, KernelArgType> XprType;
-
-  typedef typename XprType::Scalar Scalar;
-  typedef typename XprType::CoeffReturnType CoeffReturnType;
-  typedef typename XprType::PacketReturnType PacketReturnType;
-
-  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;
-
-  static const int NumDims = internal::array_size<typename TensorEvaluator<InputArgType, Device>::Dimensions>::value;
-  static const int NumKernelDims = internal::array_size<Indices>::value;
-  typedef typename XprType::Index Index;
-  typedef DSizes<Index, NumDims> Dimensions;
-
-  enum {
-    IsAligned = TensorEvaluator<InputArgType, Device>::IsAligned &
-                TensorEvaluator<KernelArgType, Device>::IsAligned,
-    PacketAccess = false,
-    BlockAccess = false,
-    Layout = TensorEvaluator<InputArgType, Device>::Layout,
-    CoordAccess = false,  // to be implemented
-  };
-
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
-      : m_inputImpl(op.inputExpression(), device), m_kernelImpl(op.kernelExpression(), device), m_kernelArg(op.kernelExpression()), m_kernel(NULL), m_local_kernel(false), m_device(device)
-  {
-    EIGEN_STATIC_ASSERT((static_cast<int>(TensorEvaluator<InputArgType, Device>::Layout) == static_cast<int>(TensorEvaluator<KernelArgType, Device>::Layout)), YOU_MADE_A_PROGRAMMING_MISTAKE);
-
-    const typename TensorEvaluator<InputArgType, Device>::Dimensions& input_dims = m_inputImpl.dimensions();
-    const typename TensorEvaluator<KernelArgType, Device>::Dimensions& kernel_dims = m_kernelImpl.dimensions();
-
-    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {
-      m_inputStride[0] = 1;
-      for (int i = 1; i < NumDims; ++i) {
-        m_inputStride[i] = m_inputStride[i - 1] * input_dims[i - 1];
-      }
-    } else {
-      m_inputStride[NumDims - 1] = 1;
-      for (int i = NumDims - 2; i >= 0; --i) {
-        m_inputStride[i] = m_inputStride[i + 1] * input_dims[i + 1];
-      }
-    }
-
-    m_dimensions = m_inputImpl.dimensions();
-    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {
-      for (int i = 0; i < NumKernelDims; ++i) {
-        const Index index = op.indices()[i];
-        const Index input_dim = input_dims[index];
-        const Index kernel_dim = kernel_dims[i];
-        const Index result_dim = input_dim - kernel_dim + 1;
-        m_dimensions[index] = result_dim;
-        if (i > 0) {
-          m_kernelStride[i] = m_kernelStride[i - 1] * kernel_dims[i - 1];
-        } else {
-          m_kernelStride[0] = 1;
-        }
-        m_indexStride[i] = m_inputStride[index];
-      }
-
-      m_outputStride[0] = 1;
-      for (int i = 1; i < NumDims; ++i) {
-        m_outputStride[i] = m_outputStride[i - 1] * m_dimensions[i - 1];
-      }
-    } else {
-      for (int i = NumKernelDims - 1; i >= 0; --i) {
-        const Index index = op.indices()[i];
-        const Index input_dim = input_dims[index];
-        const Index kernel_dim = kernel_dims[i];
-        const Index result_dim = input_dim - kernel_dim + 1;
-        m_dimensions[index] = result_dim;
-        if (i < NumKernelDims - 1) {
-          m_kernelStride[i] = m_kernelStride[i + 1] * kernel_dims[i + 1];
-        } else {
-          m_kernelStride[NumKernelDims - 1] = 1;
-        }
-        m_indexStride[i] = m_inputStride[index];
-      }
-
-      m_outputStride[NumDims - 1] = 1;
-      for (int i = NumDims - 2; i >= 0; --i) {
-        m_outputStride[i] = m_outputStride[i + 1] * m_dimensions[i + 1];
-      }
-    }
-  }
-
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }
-
-
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(Scalar* data) {
-    m_inputImpl.evalSubExprsIfNeeded(NULL);
-    m_kernelImpl.evalSubExprsIfNeeded(NULL);
-
-    typedef typename internal::traits<InputArgType>::Index TensorIndex;
-
-    Tensor<Scalar, NumDims, Layout, TensorIndex> input(m_inputImpl.dimensions());
-    for (int i = 0; i < m_inputImpl.dimensions().TotalSize(); ++i) {
-      input.data()[i] = m_inputImpl.coeff(i);
-    }
-
-    Tensor<Scalar, NumDims, Layout, TensorIndex> kernel(m_kernelImpl.dimensions());
-    for (int i = 0; i < m_kernelImpl.dimensions().TotalSize(); ++i) {
-      kernel.data()[i] = m_kernelImpl.coeff(i);
-    }
-
-    array<std::pair<ptrdiff_t, ptrdiff_t>, NumDims> paddings;
-    for (int i = 0; i < NumDims; ++i) {
-      paddings[i] = std::make_pair(0, m_inputImpl.dimensions()[i] - m_kernelImpl.dimensions()[i]);
-    }
-
-    Eigen::array<bool, NumKernelDims> reverse;
-    for (int i = 0; i < NumKernelDims; ++i) {
-      reverse[i] = true;
-    }
-
-    Eigen::array<bool, NumDims> fft;
-    for (int i = 0; i < NumDims; ++i) {
-      fft[i] = i;
-    }
-
-    Eigen::DSizes<TensorIndex, NumDims> slice_offsets;
-    for (int i = 0; i < NumDims; ++i) {
-      slice_offsets[i] = m_kernelImpl.dimensions()[i] - 1;
-    }
-
-    Eigen::DSizes<TensorIndex, NumDims> slice_extents;
-    for (int i = 0; i < NumDims; ++i) {
-      slice_extents[i] = m_inputImpl.dimensions()[i] - m_kernelImpl.dimensions()[i] + 1;
-    }
-
-    Tensor<Scalar, NumDims, Layout, TensorIndex> kernel_variant =  kernel.reverse(reverse).pad(paddings);
-    Tensor<std::complex<Scalar>, NumDims, Layout, TensorIndex> kernel_fft =  kernel_variant.template fft<Eigen::BothParts, FFT_FORWARD>(fft);
-    //Tensor<std::complex<Scalar>, NumDims, Layout|IndexType> kernel_fft =  kernel.reverse(reverse).pad(paddings).template fft<2>(fft);
-    Tensor<std::complex<Scalar>, NumDims, Layout, TensorIndex> input_fft = input.template fft<Eigen::BothParts, FFT_FORWARD>(fft);
-    Tensor<std::complex<Scalar>, NumDims, Layout, TensorIndex> prod = (input_fft * kernel_fft).template fft<Eigen::BothParts, FFT_REVERSE>(fft);
-    Tensor<std::complex<Scalar>, NumDims, Layout, TensorIndex> tensor_result = prod.slice(slice_offsets, slice_extents);
-
-    for (int i = 0; i < tensor_result.size(); ++i) {
-      data[i] = std::real(tensor_result.data()[i]);
-    }
-    return false;
-  }
-
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {
-    m_inputImpl.cleanup();
-    if (m_local_kernel) {
-      m_device.deallocate((void*)m_kernel);
-      m_local_kernel = false;
-    }
-    m_kernel = NULL;
-  }
-
-  void evalTo(typename XprType::Scalar* buffer) {
-    evalSubExprsIfNeeded(NULL);
-    for (int i = 0; i < dimensions().TotalSize(); ++i) {
-      buffer[i] += coeff(i);
-    }
-    cleanup();
-  }
-
-  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
-  {
-    CoeffReturnType result = CoeffReturnType(0);
-    return result;
-  }
-
-  EIGEN_DEVICE_FUNC Scalar* data() const { return NULL; }
-
- private:
-  array<Index, NumDims> m_inputStride;
-  array<Index, NumDims> m_outputStride;
-
-  array<Index, NumKernelDims> m_indexStride;
-  array<Index, NumKernelDims> m_kernelStride;
-  TensorEvaluator<InputArgType, Device> m_inputImpl;
-  TensorEvaluator<KernelArgType, Device> m_kernelImpl;
-  Dimensions m_dimensions;
-
-  KernelArgType m_kernelArg;
-  const Scalar* m_kernel;
-  bool m_local_kernel;
-  const Device& m_device;
-};
-
-} // end namespace Eigen
-
-#endif // EIGEN_CXX11_TENSOR_TENSOR_CONVOLUTIONBYFFT_H
diff --git a/third_party/eigen3/unsupported/Eigen/MatrixFunctions b/third_party/eigen3/unsupported/Eigen/MatrixFunctions
deleted file mode 100644
index 314b325..0000000
--- a/third_party/eigen3/unsupported/Eigen/MatrixFunctions
+++ /dev/null
@@ -1 +0,0 @@
-#include "unsupported/Eigen/MatrixFunctions"
diff --git a/third_party/eigen3/unsupported/Eigen/SpecialFunctions b/third_party/eigen3/unsupported/Eigen/SpecialFunctions
deleted file mode 100644
index ad13359..0000000
--- a/third_party/eigen3/unsupported/Eigen/SpecialFunctions
+++ /dev/null
@@ -1 +0,0 @@
-#include "unsupported/Eigen/SpecialFunctions"
diff --git a/third_party/eigen_fix_cuda_compilation.patch b/third_party/eigen_fix_cuda_compilation.patch
deleted file mode 100644
index b921a7c..0000000
--- a/third_party/eigen_fix_cuda_compilation.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/Eigen/src/Core/ProductEvaluators.h b/Eigen/src/Core/ProductEvaluators.h
---- a/Eigen/src/Core/ProductEvaluators.h
-+++ b/Eigen/src/Core/ProductEvaluators.h
-@@ -137,7 +137,7 @@ struct Assignment<DstXprType, Product<Lh
-   typename enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>
- {
-   typedef Product<Lhs,Rhs,Options> SrcXprType;
--  static EIGEN_STRONG_INLINE
-+  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
-   void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar,Scalar> &)
-   {
-     Index dstRows = src.rows();
-@@ -390,7 +390,7 @@ struct generic_product_impl<Lhs,Rhs,Dens
-   typedef typename Product<Lhs,Rhs>::Scalar Scalar;
-   
-   template<typename Dst>
--  static EIGEN_STRONG_INLINE void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
-+  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
-   {
-     // Same as: dst.noalias() = lhs.lazyProduct(rhs);
-     // but easier on the compiler side
-@@ -398,14 +398,14 @@ struct generic_product_impl<Lhs,Rhs,Dens
-   }
-   
-   template<typename Dst>
--  static EIGEN_STRONG_INLINE void addTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
-+  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
-   {
-     // dst.noalias() += lhs.lazyProduct(rhs);
-     call_assignment_no_alias(dst, lhs.lazyProduct(rhs), internal::add_assign_op<typename Dst::Scalar,Scalar>());
-   }
-   
-   template<typename Dst>
--  static EIGEN_STRONG_INLINE void subTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
-+  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
-   {
-     // dst.noalias() -= lhs.lazyProduct(rhs);
-     call_assignment_no_alias(dst, lhs.lazyProduct(rhs), internal::sub_assign_op<typename Dst::Scalar,Scalar>());
diff --git a/third_party/examples/eager/spinn/BUILD b/third_party/examples/eager/spinn/BUILD
deleted file mode 100644
index 0e39d46..0000000
--- a/third_party/examples/eager/spinn/BUILD
+++ /dev/null
@@ -1,14 +0,0 @@
-licenses(["notice"])  # 3-clause BSD.
-
-py_binary(
-    name = "spinn",
-    srcs = ["spinn.py"],
-    srcs_version = "PY2AND3",
-    visibility = ["//visibility:public"],
-    deps = [
-        "//tensorflow:tensorflow_py",
-        "//tensorflow/contrib/eager/python:tfe",
-        "//tensorflow/contrib/eager/python/examples/spinn:data",
-        "@six_archive//:six",
-    ],
-)
diff --git a/third_party/examples/eager/spinn/LICENSE b/third_party/examples/eager/spinn/LICENSE
deleted file mode 100644
index 09d493b..0000000
--- a/third_party/examples/eager/spinn/LICENSE
+++ /dev/null
@@ -1,29 +0,0 @@
-BSD 3-Clause License
-
-Copyright (c) 2017, 
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
-  list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-
-* Neither the name of the copyright holder nor the names of its
-  contributors may be used to endorse or promote products derived from
-  this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/third_party/examples/eager/spinn/README.md b/third_party/examples/eager/spinn/README.md
deleted file mode 100644
index 7f477d1..0000000
--- a/third_party/examples/eager/spinn/README.md
+++ /dev/null
@@ -1,109 +0,0 @@
-# SPINN with TensorFlow eager execution
-
-SPINN, or Stack-Augmented Parser-Interpreter Neural Network, is a recursive
-neural network that utilizes syntactic parse information for natural language
-understanding.
-
-SPINN was originally described by:
-Bowman, S.R., Gauthier, J., Rastogi A., Gupta, R., Manning, C.D., & Potts, C.
-  (2016). A Fast Unified Model for Parsing and Sentence Understanding.
-  https://arxiv.org/abs/1603.06021
-
-Our implementation is based on @jekbradbury's PyTorch implementation at:
-https://github.com/jekbradbury/examples/blob/spinn/snli/spinn.py,
-
-which was released under the BSD 3-Clause License at:
-https://github.com/jekbradbury/examples/blob/spinn/LICENSE
-
-Other eager execution examples can be found under [tensorflow/contrib/eager/python/examples](../../../../tensorflow/contrib/eager/python/examples).
-
-##  Content
-
-- [`data.py`](../../../../tensorflow/contrib/eager/python/examples/spinn/data.py): Pipeline for loading and preprocessing the
-   [SNLI](https://nlp.stanford.edu/projects/snli/) data and
-   [GloVe](https://nlp.stanford.edu/projects/glove/) word embedding, written
-   using the [`tf.data`](https://www.tensorflow.org/programmers_guide/datasets)
-   API.
-- [`spinn.py`](./spinn.py): Model definition and training routines.
-  This example illustrates how one might perform the following actions with
-  eager execution enabled:
-  * defining a model consisting of a dynamic computation graph,
-  * assigning operations to the CPU or GPU dependending on device availability,
-  * training the model using the data from the `tf.data`-based pipeline,
-  * obtaining metrics such as mean accuracy during training,
-  * saving and loading checkpoints,
-  * writing summaries for monitoring and visualization in TensorBoard.
-
-## To run
-
-- Make sure you have installed TensorFlow release 1.5 or higher. Alternatively,
-  you can use the latest `tf-nightly` or `tf-nightly-gpu` pip
-  package to access the eager execution feature.
-
-- Download and extract the raw SNLI data and GloVe embedding vectors.
-  For example:
-
-  ```bash
-  curl -fSsL https://nlp.stanford.edu/projects/snli/snli_1.0.zip --create-dirs -o /tmp/spinn-data/snli/snli_1.0.zip
-  unzip -d /tmp/spinn-data/snli /tmp/spinn-data/snli/snli_1.0.zip
-  curl -fSsL http://nlp.stanford.edu/data/glove.42B.300d.zip --create-dirs -o /tmp/spinn-data/glove/glove.42B.300d.zip
-  unzip -d /tmp/spinn-data/glove /tmp/spinn-data/glove/glove.42B.300d.zip
-  ```
-
-- Train model. E.g.,
-
-  ```bash
-  python spinn.py --data_root /tmp/spinn-data --logdir /tmp/spinn-logs
-  ```
-
-  During training, model checkpoints and TensorBoard summaries will be written
-  periodically to the directory specified with the `--logdir` flag.
-  The training script will reload a saved checkpoint from the directory if it
-  can find one there.
-
-  To view the summaries with TensorBoard:
-
-  ```bash
-  tensorboard --logdir /tmp/spinn-logs
-  ```
-
-- After training, you may use the model to perform inference on input data in
-  the SNLI data format. The premise and hypotheses sentences are specified with
-  the command-line flags `--inference_premise` and `--inference_hypothesis`,
-  respecitvely. Each sentence should include the words, as well as parentheses
-  representing a binary parsing of the sentence. The words and parentheses
-  should all be separated by spaces. For instance,
-
-  ```bash
-  python spinn.py --data_root /tmp/spinn-data --logdir /tmp/spinn-logs \
-      --inference_premise '( ( The dog ) ( ( is running ) . ) )' \
-      --inference_hypothesis '( ( The dog ) ( moves . ) )'
-  ```
-
-  which will generate an output like the following, due to the semantic
-  consistency of the two sentences.
-
-  ```none
-  Inference logits:
-    entailment:     1.101249 (winner)
-    contradiction:  -2.374171
-    neutral:        -0.296733
-  ```
-
-  By contrast, the following sentence pair:
-
-  ```bash
-  python spinn.py --data_root /tmp/spinn-data --logdir /tmp/spinn-logs \
-      --inference_premise '( ( The dog ) ( ( is running ) . ) )' \
-      --inference_hypothesis '( ( The dog ) ( rests . ) )'
-  ```
-
-  will give you an output like the following, due to the semantic
-  contradiction of the two sentences.
-
-  ```none
-  Inference logits:
-    entailment:     -1.070098
-    contradiction:  2.798695 (winner)
-    neutral:        -1.402287
-  ```
diff --git a/third_party/examples/eager/spinn/spinn.py b/third_party/examples/eager/spinn/spinn.py
deleted file mode 100644
index 8a2b24a..0000000
--- a/third_party/examples/eager/spinn/spinn.py
+++ /dev/null
@@ -1,813 +0,0 @@
-r"""Implementation of SPINN in TensorFlow eager execution.
-
-SPINN: Stack-Augmented Parser-Interpreter Neural Network.
-
-Ths file contains model definition and code for training the model.
-
-The model definition is based on PyTorch implementation at:
-  https://github.com/jekbradbury/examples/tree/spinn/snli
-
-which was released under a BSD 3-Clause License at:
-https://github.com/jekbradbury/examples/blob/spinn/LICENSE:
-
-Copyright (c) 2017,
-All rights reserved.
-
-See ./LICENSE for more details.
-
-Instructions for use:
-* See `README.md` for details on how to prepare the SNLI and GloVe data.
-* Suppose you have prepared the data at "/tmp/spinn-data", use the folloing
-  command to train the model:
-
-  ```bash
-  python spinn.py --data_root /tmp/spinn-data --logdir /tmp/spinn-logs
-  ```
-
-  Checkpoints and TensorBoard summaries will be written to "/tmp/spinn-logs".
-
-References:
-* Bowman, S.R., Gauthier, J., Rastogi A., Gupta, R., Manning, C.D., & Potts, C.
-  (2016). A Fast Unified Model for Parsing and Sentence Understanding.
-  https://arxiv.org/abs/1603.06021
-* Bradbury, J. (2017). Recursive Neural Networks with PyTorch.
-  https://devblogs.nvidia.com/parallelforall/recursive-neural-networks-pytorch/
-"""
-
-from __future__ import absolute_import
-from __future__ import division
-from __future__ import print_function
-
-import argparse
-import itertools
-import os
-import sys
-import time
-
-from six.moves import xrange  # pylint: disable=redefined-builtin
-import tensorflow as tf
-
-import tensorflow.contrib.eager as tfe
-from tensorflow.contrib.eager.python.examples.spinn import data
-
-
-layers = tf.keras.layers
-
-
-def _bundle(lstm_iter):
-  """Concatenate a list of Tensors along 1st axis and split result into two.
-
-  Args:
-    lstm_iter: A `list` of `N` dense `Tensor`s, each of which has the shape
-      (R, 2 * M).
-
-  Returns:
-    A `list` of two dense `Tensor`s, each of which has the shape (N * R, M).
-  """
-  return tf.split(tf.concat(lstm_iter, 0), 2, axis=1)
-
-
-def _unbundle(state):
-  """Concatenate a list of Tensors along 2nd axis and split result.
-
-  This is the inverse of `_bundle`.
-
-  Args:
-    state: A `list` of two dense `Tensor`s, each of which has the shape (R, M).
-
-  Returns:
-    A `list` of `R` dense `Tensors`, each of which has the shape (1, 2 * M).
-  """
-  return tf.split(tf.concat(state, 1), state[0].shape[0], axis=0)
-
-
-# pylint: disable=not-callable
-class Reducer(tf.keras.Model):
-  """A module that applies reduce operation on left and right vectors."""
-
-  def __init__(self, size, tracker_size=None):
-    super(Reducer, self).__init__()
-    self.left = layers.Dense(5 * size, activation=None)
-    self.right = layers.Dense(5 * size, activation=None, use_bias=False)
-    if tracker_size is not None:
-      self.track = layers.Dense(5 * size, activation=None, use_bias=False)
-    else:
-      self.track = None
-
-  def call(self, left_in, right_in, tracking=None):
-    """Invoke forward pass of the Reduce module.
-
-    This method feeds a linear combination of `left_in`, `right_in` and
-    `tracking` into a Tree LSTM and returns the output of the Tree LSTM.
-
-    Args:
-      left_in: A list of length L. Each item is a dense `Tensor` with
-        the shape (1, n_dims). n_dims is the size of the embedding vector.
-      right_in: A list of the same length as `left_in`. Each item should have
-        the same shape as the items of `left_in`.
-      tracking: Optional list of the same length as `left_in`. Each item is a
-        dense `Tensor` with shape (1, tracker_size * 2). tracker_size is the
-        size of the Tracker's state vector.
-
-    Returns:
-      Output: A list of length batch_size. Each item has the shape (1, n_dims).
-    """
-    left, right = _bundle(left_in), _bundle(right_in)
-    lstm_in = self.left(left[0]) + self.right(right[0])
-    if self.track and tracking:
-      lstm_in += self.track(_bundle(tracking)[0])
-    return _unbundle(self._tree_lstm(left[1], right[1], lstm_in))
-
-  def _tree_lstm(self, c1, c2, lstm_in):
-    a, i, f1, f2, o = tf.split(lstm_in, 5, axis=1)
-    c = tf.tanh(a) * tf.sigmoid(i) + tf.sigmoid(f1) * c1 + tf.sigmoid(f2) * c2
-    h = tf.sigmoid(o) * tf.tanh(c)
-    return h, c
-
-
-class Tracker(tf.keras.Model):
-  """A module that tracks the history of the sentence with an LSTM."""
-
-  def __init__(self, tracker_size, predict):
-    """Constructor of Tracker.
-
-    Args:
-      tracker_size: Number of dimensions of the underlying `LSTMCell`.
-      predict: (`bool`) Whether prediction mode is enabled.
-    """
-    super(Tracker, self).__init__()
-    self._rnn = tf.nn.rnn_cell.LSTMCell(tracker_size)
-    self._state_size = tracker_size
-    if predict:
-      self._transition = layers.Dense(4)
-    else:
-      self._transition = None
-
-  def reset_state(self):
-    self.state = None
-
-  def call(self, bufs, stacks):
-    """Invoke the forward pass of the Tracker module.
-
-    This method feeds the concatenation of the top two elements of the stacks
-    into an LSTM cell and returns the resultant state of the LSTM cell.
-
-    Args:
-      bufs: A `list` of length batch_size. Each item is a `list` of
-        max_sequence_len (maximum sequence length of the batch). Each item
-        of the nested list is a dense `Tensor` of shape (1, d_proj), where
-        d_proj is the size of the word embedding vector or the size of the
-        vector space that the word embedding vector is projected to.
-      stacks: A `list` of size batch_size. Each item is a `list` of
-        variable length corresponding to the current height of the stack.
-        Each item of the nested list is a dense `Tensor` of shape (1, d_proj).
-
-    Returns:
-      1. A list of length batch_size. Each item is a dense `Tensor` of shape
-        (1, d_tracker * 2).
-      2.  If under predict mode, result of applying a Dense layer on the
-        first state vector of the RNN. Else, `None`.
-    """
-    buf = _bundle([buf[-1] for buf in bufs])[0]
-    stack1 = _bundle([stack[-1] for stack in stacks])[0]
-    stack2 = _bundle([stack[-2] for stack in stacks])[0]
-    x = tf.concat([buf, stack1, stack2], 1)
-    if self.state is None:
-      batch_size = int(x.shape[0])
-      zeros = tf.zeros((batch_size, self._state_size), dtype=tf.float32)
-      self.state = [zeros, zeros]
-    _, self.state = self._rnn(x, self.state)
-    unbundled = _unbundle(self.state)
-    if self._transition:
-      return unbundled, self._transition(self.state[0])
-    else:
-      return unbundled, None
-
-
-class SPINN(tf.keras.Model):
-  """Stack-augmented Parser-Interpreter Neural Network.
-
-  See https://arxiv.org/abs/1603.06021 for more details.
-  """
-
-  def __init__(self, config):
-    """Constructor of SPINN.
-
-    Args:
-      config: A `namedtupled` with the following attributes.
-        d_proj - (`int`) number of dimensions of the vector space to project the
-          word embeddings to.
-        d_tracker - (`int`) number of dimensions of the Tracker's state vector.
-        d_hidden - (`int`) number of the dimensions of the hidden state, for the
-          Reducer module.
-        n_mlp_layers - (`int`) number of multi-layer perceptron layers to use to
-          convert the output of the `Feature` module to logits.
-        predict - (`bool`) Whether the Tracker will enabled predictions.
-    """
-    super(SPINN, self).__init__()
-    self.config = config
-    self.reducer = Reducer(config.d_hidden, config.d_tracker)
-    if config.d_tracker is not None:
-      self.tracker = Tracker(config.d_tracker, config.predict)
-    else:
-      self.tracker = None
-
-  def call(self, buffers, transitions, training=False):
-    """Invoke the forward pass of the SPINN model.
-
-    Args:
-      buffers: Dense `Tensor` of shape
-        (max_sequence_len, batch_size, config.d_proj).
-      transitions: Dense `Tensor` with integer values that represent the parse
-        trees of the sentences. A value of 2 indicates "reduce"; a value of 3
-        indicates "shift". Shape: (max_sequence_len * 2 - 3, batch_size).
-      training: Whether the invocation is under training mode.
-
-    Returns:
-      Output `Tensor` of shape (batch_size, config.d_embed).
-    """
-    max_sequence_len, batch_size, d_proj = (int(x) for x in buffers.shape)
-
-    # Split the buffers into left and right word items and put the initial
-    # items in a stack.
-    splitted = tf.split(
-        tf.reshape(tf.transpose(buffers, [1, 0, 2]), [-1, d_proj]),
-        max_sequence_len * batch_size, axis=0)
-    buffers = [splitted[k:k + max_sequence_len]
-               for k in xrange(0, len(splitted), max_sequence_len)]
-    stacks = [[buf[0], buf[0]] for buf in buffers]
-
-    if self.tracker:
-      # Reset tracker state for new batch.
-      self.tracker.reset_state()
-
-    num_transitions = transitions.shape[0]
-
-    # Iterate through transitions and perform the appropriate stack-pop, reduce
-    # and stack-push operations.
-    transitions = transitions.numpy()
-    for i in xrange(num_transitions):
-      trans = transitions[i]
-      if self.tracker:
-        # Invoke tracker to obtain the current tracker states for the sentences.
-        tracker_states, trans_hypothesis = self.tracker(buffers, stacks=stacks)
-        if trans_hypothesis:
-          trans = tf.argmax(trans_hypothesis, axis=-1)
-      else:
-        tracker_states = itertools.repeat(None)
-      lefts, rights, trackings = [], [], []
-      for transition, buf, stack, tracking in zip(
-          trans, buffers, stacks, tracker_states):
-        if int(transition) == 3:  # Shift.
-          stack.append(buf.pop())
-        elif int(transition) == 2:  # Reduce.
-          rights.append(stack.pop())
-          lefts.append(stack.pop())
-          trackings.append(tracking)
-
-      if rights:
-        reducer_output = self.reducer(lefts, rights, trackings)
-        reduced = iter(reducer_output)
-
-        for transition, stack in zip(trans, stacks):
-          if int(transition) == 2:  # Reduce.
-            stack.append(next(reduced))
-    return _bundle([stack.pop() for stack in stacks])[0]
-
-
-class Perceptron(tf.keras.Model):
-  """One layer of the SNLIClassifier multi-layer perceptron."""
-
-  def __init__(self, dimension, dropout_rate, previous_layer):
-    """Configure the Perceptron."""
-    super(Perceptron, self).__init__()
-    self.dense = tf.keras.layers.Dense(dimension, activation=tf.nn.elu)
-    self.batchnorm = layers.BatchNormalization()
-    self.dropout = layers.Dropout(rate=dropout_rate)
-    self.previous_layer = previous_layer
-
-  def call(self, x, training):
-    """Run previous Perceptron layers, then this one."""
-    x = self.previous_layer(x, training=training)
-    x = self.dense(x)
-    x = self.batchnorm(x, training=training)
-    x = self.dropout(x, training=training)
-    return x
-
-
-class SNLIClassifier(tf.keras.Model):
-  """SNLI Classifier Model.
-
-  A model aimed at solving the SNLI (Standford Natural Language Inference)
-  task, using the SPINN model from above. For details of the task, see:
-    https://nlp.stanford.edu/projects/snli/
-  """
-
-  def __init__(self, config, embed):
-    """Constructor of SNLICLassifier.
-
-    Args:
-      config: A namedtuple containing required configurations for the model. It
-        needs to have the following attributes.
-        projection - (`bool`) whether the word vectors are to be projected onto
-          another vector space (of `d_proj` dimensions).
-        d_proj - (`int`) number of dimensions of the vector space to project the
-          word embeddings to.
-        embed_dropout - (`float`) dropout rate for the word embedding vectors.
-        n_mlp_layers - (`int`) number of multi-layer perceptron (MLP) layers to
-          use to convert the output of the `Feature` module to logits.
-        mlp_dropout - (`float`) dropout rate of the MLP layers.
-        d_out - (`int`) number of dimensions of the final output of the MLP
-          layers.
-        lr - (`float`) learning rate.
-      embed: A embedding matrix of shape (vocab_size, d_embed).
-    """
-    super(SNLIClassifier, self).__init__()
-    self.config = config
-    self.embed = tf.constant(embed)
-
-    self.projection = layers.Dense(config.d_proj)
-    self.embed_bn = layers.BatchNormalization()
-    self.embed_dropout = layers.Dropout(rate=config.embed_dropout)
-    self.encoder = SPINN(config)
-
-    self.feature_bn = layers.BatchNormalization()
-    self.feature_dropout = layers.Dropout(rate=config.mlp_dropout)
-
-    current_mlp = lambda result, training: result
-    for _ in range(config.n_mlp_layers):
-      current_mlp = Perceptron(dimension=config.d_mlp,
-                               dropout_rate=config.mlp_dropout,
-                               previous_layer=current_mlp)
-    self.mlp = current_mlp
-    self.mlp_output = layers.Dense(
-        config.d_out,
-        kernel_initializer=tf.random_uniform_initializer(minval=-5e-3,
-                                                         maxval=5e-3))
-
-  def call(self,
-           premise,
-           premise_transition,
-           hypothesis,
-           hypothesis_transition,
-           training=False):
-    """Invoke the forward pass the SNLIClassifier model.
-
-    Args:
-      premise: The word indices of the premise sentences, with shape
-        (max_prem_seq_len, batch_size).
-      premise_transition: The transitions for the premise sentences, with shape
-        (max_prem_seq_len * 2 - 3, batch_size).
-      hypothesis: The word indices of the hypothesis sentences, with shape
-        (max_hypo_seq_len, batch_size).
-      hypothesis_transition: The transitions for the hypothesis sentences, with
-        shape (max_hypo_seq_len * 2 - 3, batch_size).
-      training: Whether the invocation is under training mode.
-
-    Returns:
-      The logits, as a dense `Tensor` of shape (batch_size, d_out), where d_out
-      is the size of the output vector.
-    """
-    # Perform embedding lookup on the premise and hypothesis inputs, which have
-    # the word-index format.
-    premise_embed = tf.nn.embedding_lookup(self.embed, premise)
-    hypothesis_embed = tf.nn.embedding_lookup(self.embed, hypothesis)
-
-    if self.config.projection:
-      # Project the embedding vectors to another vector space.
-      premise_embed = self.projection(premise_embed)
-      hypothesis_embed = self.projection(hypothesis_embed)
-
-    # Perform batch normalization and dropout on the possibly projected word
-    # vectors.
-    premise_embed = self.embed_bn(premise_embed, training=training)
-    hypothesis_embed = self.embed_bn(hypothesis_embed, training=training)
-    premise_embed = self.embed_dropout(premise_embed, training=training)
-    hypothesis_embed = self.embed_dropout(hypothesis_embed, training=training)
-
-    # Run the batch-normalized and dropout-processed word vectors through the
-    # SPINN encoder.
-    premise = self.encoder(premise_embed, premise_transition,
-                           training=training)
-    hypothesis = self.encoder(hypothesis_embed, hypothesis_transition,
-                              training=training)
-
-    # Combine encoder outputs for premises and hypotheses into logits.
-    # Then apply batch normalization and dropuout on the logits.
-    logits = tf.concat(
-        [premise, hypothesis, premise - hypothesis, premise * hypothesis], 1)
-    logits = self.feature_dropout(
-        self.feature_bn(logits, training=training), training=training)
-
-    # Apply the multi-layer perceptron on the logits.
-    logits = self.mlp(logits, training=training)
-    logits = self.mlp_output(logits)
-    return logits
-
-
-class SNLIClassifierTrainer(tfe.Checkpointable):
-  """A class that coordinates the training of an SNLIClassifier."""
-
-  def __init__(self, snli_classifier, lr):
-    """Constructor of SNLIClassifierTrainer.
-
-    Args:
-      snli_classifier: An instance of `SNLIClassifier`.
-      lr: Learning rate.
-    """
-    self._model = snli_classifier
-    # Create a custom learning rate Variable for the RMSProp optimizer, because
-    # the learning rate needs to be manually decayed later (see
-    # decay_learning_rate()).
-    self._learning_rate = tfe.Variable(lr, name="learning_rate")
-    self._optimizer = tf.train.RMSPropOptimizer(self._learning_rate,
-                                                epsilon=1e-6)
-
-  def loss(self, labels, logits):
-    """Calculate the loss given a batch of data.
-
-    Args:
-      labels: The truth labels, with shape (batch_size,).
-      logits: The logits output from the forward pass of the SNLIClassifier
-        model, with shape (batch_size, d_out), where d_out is the output
-        dimension size of the SNLIClassifier.
-
-    Returns:
-      The loss value, as a scalar `Tensor`.
-    """
-    return tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits(
-        labels=labels, logits=logits))
-
-  def train_batch(self,
-                  labels,
-                  premise,
-                  premise_transition,
-                  hypothesis,
-                  hypothesis_transition):
-    """Train model on batch of data.
-
-    Args:
-      labels: The truth labels, with shape (batch_size,).
-      premise: The word indices of the premise sentences, with shape
-        (max_prem_seq_len, batch_size).
-      premise_transition: The transitions for the premise sentences, with shape
-        (max_prem_seq_len * 2 - 3, batch_size).
-      hypothesis: The word indices of the hypothesis sentences, with shape
-        (max_hypo_seq_len, batch_size).
-      hypothesis_transition: The transitions for the hypothesis sentences, with
-        shape (max_hypo_seq_len * 2 - 3, batch_size).
-
-    Returns:
-      1. loss value as a scalar `Tensor`.
-      2. logits as a dense `Tensor` of shape (batch_size, d_out), where d_out is
-        the output dimension size of the SNLIClassifier.
-    """
-    with tfe.GradientTape() as tape:
-      tape.watch(self._model.variables)
-      logits = self._model(premise,
-                           premise_transition,
-                           hypothesis,
-                           hypothesis_transition,
-                           training=True)
-      loss = self.loss(labels, logits)
-    gradients = tape.gradient(loss, self._model.variables)
-    self._optimizer.apply_gradients(zip(gradients, self._model.variables),
-                                    global_step=tf.train.get_global_step())
-    return loss, logits
-
-  def decay_learning_rate(self, decay_by):
-    """Decay learning rate of the optimizer by factor decay_by."""
-    self._learning_rate.assign(self._learning_rate * decay_by)
-    print("Decayed learning rate of optimizer to: %s" %
-          self._learning_rate.numpy())
-
-  @property
-  def learning_rate(self):
-    return self._learning_rate
-
-  @property
-  def model(self):
-    return self._model
-
-  @property
-  def variables(self):
-    return (self._model.variables + [self.learning_rate] +
-            self._optimizer.variables())
-
-
-def _batch_n_correct(logits, label):
-  """Calculate number of correct predictions in a batch.
-
-  Args:
-    logits: A logits Tensor of shape `(batch_size, num_categories)` and dtype
-      `float32`.
-    label: A labels Tensor of shape `(batch_size,)` and dtype `int64`
-
-  Returns:
-    Number of correct predictions.
-  """
-  return tf.reduce_sum(
-      tf.cast((tf.equal(
-          tf.argmax(logits, axis=1), label)), tf.float32)).numpy()
-
-
-def _evaluate_on_dataset(snli_data, batch_size, trainer, use_gpu):
-  """Run evaluation on a dataset.
-
-  Args:
-    snli_data: The `data.SnliData` to use in this evaluation.
-    batch_size: The batch size to use during this evaluation.
-    trainer: An instance of `SNLIClassifierTrainer to use for this
-      evaluation.
-    use_gpu: Whether GPU is being used.
-
-  Returns:
-    1. Average loss across all examples of the dataset.
-    2. Average accuracy rate across all examples of the dataset.
-  """
-  mean_loss = tfe.metrics.Mean()
-  accuracy = tfe.metrics.Accuracy()
-  for label, prem, prem_trans, hypo, hypo_trans in _get_dataset_iterator(
-      snli_data, batch_size):
-    if use_gpu:
-      label, prem, hypo = label.gpu(), prem.gpu(), hypo.gpu()
-    logits = trainer.model(prem, prem_trans, hypo, hypo_trans, training=False)
-    loss_val = trainer.loss(label, logits)
-    batch_size = tf.shape(label)[0]
-    mean_loss(loss_val, weights=batch_size.gpu() if use_gpu else batch_size)
-    accuracy(tf.argmax(logits, axis=1), label)
-  return mean_loss.result().numpy(), accuracy.result().numpy()
-
-
-def _get_dataset_iterator(snli_data, batch_size):
-  """Get a data iterator for a split of SNLI data.
-
-  Args:
-    snli_data: A `data.SnliData` object.
-    batch_size: The desired batch size.
-
-  Returns:
-    A dataset iterator.
-  """
-  with tf.device("/device:CPU:0"):
-    # Some tf.data ops, such as ShuffleDataset, are available only on CPU.
-    dataset = tf.data.Dataset.from_generator(
-        snli_data.get_generator(batch_size),
-        (tf.int64, tf.int64, tf.int64, tf.int64, tf.int64))
-    dataset = dataset.shuffle(snli_data.num_batches(batch_size))
-    return tfe.Iterator(dataset)
-
-
-def train_or_infer_spinn(embed,
-                         word2index,
-                         train_data,
-                         dev_data,
-                         test_data,
-                         config):
-  """Perform Training or Inference on a SPINN model.
-
-  Args:
-    embed: The embedding matrix as a float32 numpy array with shape
-      [vocabulary_size, word_vector_len]. word_vector_len is the length of a
-      word embedding vector.
-    word2index: A `dict` mapping word to word index.
-    train_data: An instance of `data.SnliData`, for the train split.
-    dev_data: Same as above, for the dev split.
-    test_data: Same as above, for the test split.
-    config: A configuration object. See the argument to this Python binary for
-      details.
-
-  Returns:
-    If `config.inference_premise ` and `config.inference_hypothesis` are not
-      `None`, i.e., inference mode: the logits for the possible labels of the
-      SNLI data set, as a `Tensor` of three floats.
-    else:
-      The trainer object.
-  Raises:
-    ValueError: if only one of config.inference_premise and
-      config.inference_hypothesis is specified.
-  """
-  # TODO(cais): Refactor this function into separate one for training and
-  #   inference.
-  use_gpu = tfe.num_gpus() > 0 and not config.force_cpu
-  device = "gpu:0" if use_gpu else "cpu:0"
-  print("Using device: %s" % device)
-
-  if ((config.inference_premise and not config.inference_hypothesis) or
-      (not config.inference_premise and config.inference_hypothesis)):
-    raise ValueError(
-        "--inference_premise and --inference_hypothesis must be both "
-        "specified or both unspecified, but only one is specified.")
-
-  if config.inference_premise:
-    # Inference mode.
-    inference_sentence_pair = [
-        data.encode_sentence(config.inference_premise, word2index),
-        data.encode_sentence(config.inference_hypothesis, word2index)]
-  else:
-    inference_sentence_pair = None
-
-  log_header = (
-      "  Time Epoch Iteration Progress    (%Epoch)   Loss   Dev/Loss"
-      "     Accuracy  Dev/Accuracy")
-  log_template = (
-      "{:>6.0f} {:>5.0f} {:>9.0f} {:>5.0f}/{:<5.0f} {:>7.0f}% {:>8.6f} {} "
-      "{:12.4f} {}")
-  dev_log_template = (
-      "{:>6.0f} {:>5.0f} {:>9.0f} {:>5.0f}/{:<5.0f} {:>7.0f}% {:>8.6f} "
-      "{:8.6f} {:12.4f} {:12.4f}")
-
-  summary_writer = tf.contrib.summary.create_file_writer(
-      config.logdir, flush_millis=10000)
-
-  with tf.device(device), \
-       summary_writer.as_default(), \
-       tf.contrib.summary.always_record_summaries():
-    model = SNLIClassifier(config, embed)
-    global_step = tf.train.get_or_create_global_step()
-    trainer = SNLIClassifierTrainer(model, config.lr)
-    checkpoint = tfe.Checkpoint(trainer=trainer, global_step=global_step)
-    checkpoint.restore(tf.train.latest_checkpoint(config.logdir))
-
-    if inference_sentence_pair:
-      # Inference mode.
-      prem, prem_trans = inference_sentence_pair[0]
-      hypo, hypo_trans = inference_sentence_pair[1]
-      hypo_trans = inference_sentence_pair[1][1]
-      inference_logits = model(
-          tf.constant(prem), tf.constant(prem_trans),
-          tf.constant(hypo), tf.constant(hypo_trans), training=False)
-      inference_logits = inference_logits[0][1:]
-      max_index = tf.argmax(inference_logits)
-      print("\nInference logits:")
-      for i, (label, logit) in enumerate(
-          zip(data.POSSIBLE_LABELS, inference_logits)):
-        winner_tag = " (winner)" if max_index == i else ""
-        print("  {0:<16}{1:.6f}{2}".format(label + ":", logit, winner_tag))
-      return inference_logits
-
-    train_len = train_data.num_batches(config.batch_size)
-    start = time.time()
-    iterations = 0
-    mean_loss = tfe.metrics.Mean()
-    accuracy = tfe.metrics.Accuracy()
-    print(log_header)
-    for epoch in xrange(config.epochs):
-      batch_idx = 0
-      for label, prem, prem_trans, hypo, hypo_trans in _get_dataset_iterator(
-          train_data, config.batch_size):
-        if use_gpu:
-          label, prem, hypo = label.gpu(), prem.gpu(), hypo.gpu()
-          # prem_trans and hypo_trans are used for dynamic control flow and can
-          # remain on CPU. Same in _evaluate_on_dataset().
-
-        iterations += 1
-        batch_train_loss, batch_train_logits = trainer.train_batch(
-            label, prem, prem_trans, hypo, hypo_trans)
-        batch_size = tf.shape(label)[0]
-        mean_loss(batch_train_loss.numpy(),
-                  weights=batch_size.gpu() if use_gpu else batch_size)
-        accuracy(tf.argmax(batch_train_logits, axis=1), label)
-
-        if iterations % config.save_every == 0:
-          checkpoint.save(os.path.join(config.logdir, "ckpt"))
-
-        if iterations % config.dev_every == 0:
-          dev_loss, dev_frac_correct = _evaluate_on_dataset(
-              dev_data, config.batch_size, trainer, use_gpu)
-          print(dev_log_template.format(
-              time.time() - start,
-              epoch, iterations, 1 + batch_idx, train_len,
-              100.0 * (1 + batch_idx) / train_len,
-              mean_loss.result(), dev_loss,
-              accuracy.result() * 100.0, dev_frac_correct * 100.0))
-          tf.contrib.summary.scalar("dev/loss", dev_loss)
-          tf.contrib.summary.scalar("dev/accuracy", dev_frac_correct)
-        elif iterations % config.log_every == 0:
-          mean_loss_val = mean_loss.result()
-          accuracy_val = accuracy.result()
-          print(log_template.format(
-              time.time() - start,
-              epoch, iterations, 1 + batch_idx, train_len,
-              100.0 * (1 + batch_idx) / train_len,
-              mean_loss_val, " " * 8, accuracy_val * 100.0, " " * 12))
-          tf.contrib.summary.scalar("train/loss", mean_loss_val)
-          tf.contrib.summary.scalar("train/accuracy", accuracy_val)
-          # Reset metrics.
-          mean_loss = tfe.metrics.Mean()
-          accuracy = tfe.metrics.Accuracy()
-
-        batch_idx += 1
-      if (epoch + 1) % config.lr_decay_every == 0:
-        trainer.decay_learning_rate(config.lr_decay_by)
-
-    test_loss, test_frac_correct = _evaluate_on_dataset(
-        test_data, config.batch_size, trainer, use_gpu)
-    print("Final test loss: %g; accuracy: %g%%" %
-          (test_loss, test_frac_correct * 100.0))
-
-  return trainer
-
-
-def main(_):
-  config = FLAGS
-
-  # Load embedding vectors.
-  vocab = data.load_vocabulary(FLAGS.data_root)
-  word2index, embed = data.load_word_vectors(FLAGS.data_root, vocab)
-
-  if not (config.inference_premise or config.inference_hypothesis):
-    print("Loading train, dev and test data...")
-    train_data = data.SnliData(
-        os.path.join(FLAGS.data_root, "snli/snli_1.0/snli_1.0_train.txt"),
-        word2index, sentence_len_limit=FLAGS.sentence_len_limit)
-    dev_data = data.SnliData(
-        os.path.join(FLAGS.data_root, "snli/snli_1.0/snli_1.0_dev.txt"),
-        word2index, sentence_len_limit=FLAGS.sentence_len_limit)
-    test_data = data.SnliData(
-        os.path.join(FLAGS.data_root, "snli/snli_1.0/snli_1.0_test.txt"),
-        word2index, sentence_len_limit=FLAGS.sentence_len_limit)
-  else:
-    train_data = None
-    dev_data = None
-    test_data = None
-
-  train_or_infer_spinn(
-      embed, word2index, train_data, dev_data, test_data, config)
-
-
-if __name__ == "__main__":
-  parser = argparse.ArgumentParser(
-      description=
-      "TensorFlow eager implementation of the SPINN SNLI classifier.")
-  parser.add_argument("--data_root", type=str, default="/tmp/spinn-data",
-                      help="Root directory in which the training data and "
-                      "embedding matrix are found. See README.md for how to "
-                      "generate such a directory.")
-  parser.add_argument("--sentence_len_limit", type=int, default=-1,
-                      help="Maximum allowed sentence length (# of words). "
-                      "The default of -1 means unlimited.")
-  parser.add_argument("--logdir", type=str, default="/tmp/spinn-logs",
-                      help="Directory in which summaries will be written for "
-                      "TensorBoard.")
-  parser.add_argument("--inference_premise", type=str, default=None,
-                      help="Premise sentence for inference. Must be "
-                      "accompanied by --inference_hypothesis. If specified, "
-                      "will override all training parameters and perform "
-                      "inference.")
-  parser.add_argument("--inference_hypothesis", type=str, default=None,
-                      help="Hypothesis sentence for inference. Must be "
-                      "accompanied by --inference_premise. If specified, will "
-                      "override all training parameters and perform inference.")
-  parser.add_argument("--epochs", type=int, default=50,
-                      help="Number of epochs to train.")
-  parser.add_argument("--batch_size", type=int, default=128,
-                      help="Batch size to use during training.")
-  parser.add_argument("--d_proj", type=int, default=600,
-                      help="Dimensions to project the word embedding vectors "
-                      "to.")
-  parser.add_argument("--d_hidden", type=int, default=300,
-                      help="Size of the hidden layer of the Tracker.")
-  parser.add_argument("--d_out", type=int, default=4,
-                      help="Output dimensions of the SNLIClassifier.")
-  parser.add_argument("--d_mlp", type=int, default=1024,
-                      help="Size of each layer of the multi-layer perceptron "
-                      "of the SNLICLassifier.")
-  parser.add_argument("--n_mlp_layers", type=int, default=2,
-                      help="Number of layers in the multi-layer perceptron "
-                      "of the SNLICLassifier.")
-  parser.add_argument("--d_tracker", type=int, default=64,
-                      help="Size of the tracker LSTM.")
-  parser.add_argument("--log_every", type=int, default=50,
-                      help="Print log and write TensorBoard summary every _ "
-                      "training batches.")
-  parser.add_argument("--lr", type=float, default=2e-3,
-                      help="Initial learning rate.")
-  parser.add_argument("--lr_decay_by", type=float, default=0.75,
-                      help="The ratio to multiply the learning rate by every "
-                      "time the learning rate is decayed.")
-  parser.add_argument("--lr_decay_every", type=float, default=1,
-                      help="Decay the learning rate every _ epoch(s).")
-  parser.add_argument("--dev_every", type=int, default=1000,
-                      help="Run evaluation on the dev split every _ training "
-                      "batches.")
-  parser.add_argument("--save_every", type=int, default=1000,
-                      help="Save checkpoint every _ training batches.")
-  parser.add_argument("--embed_dropout", type=float, default=0.08,
-                      help="Word embedding dropout rate.")
-  parser.add_argument("--mlp_dropout", type=float, default=0.07,
-                      help="SNLIClassifier multi-layer perceptron dropout "
-                      "rate.")
-  parser.add_argument("--no-projection", action="store_false",
-                      dest="projection",
-                      help="Whether word embedding vectors are projected to "
-                      "another set of vectors (see d_proj).")
-  parser.add_argument("--predict_transitions", action="store_true",
-                      dest="predict",
-                      help="Whether the Tracker will perform prediction.")
-  parser.add_argument("--force_cpu", action="store_true", dest="force_cpu",
-                      help="Force use CPU-only regardless of whether a GPU is "
-                      "available.")
-  FLAGS, unparsed = parser.parse_known_args()
-
-  tfe.run(main=main, argv=[sys.argv[0]] + unparsed)
diff --git a/third_party/farmhash.BUILD b/third_party/farmhash.BUILD
deleted file mode 100644
index a51e151..0000000
--- a/third_party/farmhash.BUILD
+++ /dev/null
@@ -1,31 +0,0 @@
-licenses(["notice"])  # MIT
-
-exports_files(["COPYING"])
-
-config_setting(
-    name = "windows_msvc",
-    values = {
-        "cpu": "x64_windows_msvc",
-    },
-)
-
-config_setting(
-    name = "windows",
-    values = {
-        "cpu": "x64_windows",
-    },
-)
-
-cc_library(
-    name = "farmhash",
-    srcs = ["src/farmhash.cc"],
-    hdrs = ["src/farmhash.h"],
-    # Disable __builtin_expect support on Windows
-    copts = select({
-        ":windows": ["/DFARMHASH_OPTIONAL_BUILTIN_EXPECT"],
-        ":windows_msvc": ["/DFARMHASH_OPTIONAL_BUILTIN_EXPECT"],
-        "//conditions:default": [],
-    }),
-    includes = ["src/."],
-    visibility = ["//visibility:public"],
-)
diff --git a/third_party/fft2d/BUILD b/third_party/fft2d/BUILD
deleted file mode 100644
index 8135442..0000000
--- a/third_party/fft2d/BUILD
+++ /dev/null
@@ -1,39 +0,0 @@
-# Headers for 2D Fast Fourier Transform package
-# from http://momonga.t.u-tokyo.ac.jp/~ooura/fft.html
-# This is a separate package because the original downloaded archive doesn't
-# contain any header files.
-
-package(
-    default_visibility = ["//visibility:public"],
-)
-
-# Unrestricted use; can only distribute original package.
-# See fft/readme.txt
-licenses(["notice"])
-
-exports_files(["LICENSE"])
-
-cc_library(
-    name = "fft2d_headers",
-    srcs = ["fft.h"],
-)
-
-objc_library(
-    name = "fft2d_headersd_ios",
-    srcs = ["fft.h"],
-)
-
-# Export the source code so that it could be compiled for Andoid native apps.
-filegroup(
-    name = "fft2d_headers_srcs",
-    srcs = ["fft.h"],
-)
-
-filegroup(
-    name = "all_files",
-    srcs = glob(
-        ["**/*"],
-        exclude = ["**/OWNERS"],
-    ),
-    visibility = ["//tensorflow:__subpackages__"],
-)
diff --git a/third_party/fft2d/LICENSE b/third_party/fft2d/LICENSE
deleted file mode 100644
index 2bd8550..0000000
--- a/third_party/fft2d/LICENSE
+++ /dev/null
@@ -1,3 +0,0 @@
-Copyright(C) 1997,2001 Takuya OOURA (email: ooura@kurims.kyoto-u.ac.jp).
-You may use, copy, modify this code for any purpose and 
-without fee. You may distribute this ORIGINAL package.
diff --git a/third_party/fft2d/fft.h b/third_party/fft2d/fft.h
deleted file mode 100644
index 31b4935..0000000
--- a/third_party/fft2d/fft.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-==============================================================================*/
-
-// Declarations for 1D FFT routines in third_party/fft2d/fft.
-
-#ifndef FFT2D_FFT_H__
-#define FFT2D_FFT_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern void cdft(int, int, double *, int *, double *);
-extern void rdft(int, int, double *, int *, double *);
-extern void ddct(int, int, double *, int *, double *);
-extern void ddst(int, int, double *, int *, double *);
-extern void dfct(int, double *, double *, int *, double *);
-extern void dfst(int, double *, double *, int *, double *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  // FFT2D_FFT_H__
diff --git a/third_party/fft2d/fft2d.BUILD b/third_party/fft2d/fft2d.BUILD
deleted file mode 100644
index 3dbd36a..0000000
--- a/third_party/fft2d/fft2d.BUILD
+++ /dev/null
@@ -1,36 +0,0 @@
-# 2D Fast Fourier Transform package
-# from http://momonga.t.u-tokyo.ac.jp/~ooura/fft.html
-
-package(
-    default_visibility = ["//visibility:public"],
-)
-
-# Unrestricted use; can only distribute original package.
-licenses(["notice"])
-
-exports_files(["fft/readme.txt"])
-
-FFT2D_SRCS = [
-    "fft/fftsg.c",
-]
-
-# This is the main 2D FFT library.  The 2D FFTs in this library call
-# 1D FFTs.  In addition, fast DCTs are provided for the special case
-# of 8x8 and 16x16.  This code in this library is referred to as
-# "Version II" on http://momonga.t.u-tokyo.ac.jp/~ooura/fft.html.
-cc_library(
-    name = "fft2d",
-    srcs = FFT2D_SRCS,
-    linkopts = ["-lm"],
-)
-
-objc_library(
-    name = "fft2d_ios",
-    srcs = FFT2D_SRCS,
-)
-
-# Export the source code so that it could be compiled for Andoid native apps.
-filegroup(
-    name = "fft2d_srcs",
-    srcs = FFT2D_SRCS,
-)
diff --git a/third_party/flatbuffers/BUILD b/third_party/flatbuffers/BUILD
deleted file mode 100644
index fbdf19f..0000000
--- a/third_party/flatbuffers/BUILD
+++ /dev/null
@@ -1,15 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"])  # Apache 2.0
-
-filegroup(
-    name = "all_files",
-    srcs = glob(
-        ["**/*"],
-        exclude = [
-            "**/METADATA",
-            "**/OWNERS",
-        ],
-    ),
-    visibility = ["//tensorflow:__subpackages__"],
-)
diff --git a/third_party/flatbuffers/build_defs.bzl b/third_party/flatbuffers/build_defs.bzl
deleted file mode 100644
index ae8d7fe..0000000
--- a/third_party/flatbuffers/build_defs.bzl
+++ /dev/null
@@ -1,196 +0,0 @@
-# Description:
-#   BUILD rules for generating flatbuffer files.
-
-flatc_path = "@flatbuffers//:flatc"
-
-DEFAULT_FLATC_ARGS = [
-    "--no-union-value-namespacing",
-    "--gen-object-api",
-]
-
-def flatbuffer_library_public(name,
-                              srcs,
-                              outs,
-                              language_flag,
-                              out_prefix="",
-                              includes=[],
-                              include_paths=[],
-                              flatc_args=DEFAULT_FLATC_ARGS,
-                              reflection_name="",
-                              reflection_visiblity=None,
-                              output_to_bindir=False):
-  '''Generates code files for reading/writing the given flatbuffers in the requested language using the public compiler.
-
-  Args:
-    name: Rule name.
-    srcs: Source .fbs files. Sent in order to the compiler.
-    outs: Output files from flatc.
-    language_flag: Target language flag. One of [-c, -j, -js].
-    out_prefix: Prepend this path to the front of all generated files except on
-        single source targets. Usually is a directory name.
-    includes: Optional, list of filegroups of schemas that the srcs depend on.
-    include_paths: Optional, list of paths the includes files can be found in.
-    flatc_args: Optional, list of additional arguments to pass to flatc.
-    reflection_name: Optional, if set this will generate the flatbuffer
-      reflection binaries for the schemas.
-    reflection_visiblity: The visibility of the generated reflection Fileset.
-    output_to_bindir: Passed to genrule for output to bin directory.
-  Outs:
-    filegroup(name): all generated source files.
-    Fileset([reflection_name]): (Optional) all generated reflection binaries.
-  '''
-  include_paths_cmd = ["-I %s" % (s) for s in include_paths]
-  # '$(@D)' when given a single source target will give the appropriate
-  # directory. Appending 'out_prefix' is only necessary when given a build
-  # target with multiple sources.
-  output_directory = (
-      ("-o $(@D)/%s" % (out_prefix)) if len(srcs) > 1 else ("-o $(@D)"))
-  genrule_cmd = " ".join([
-      "for f in $(SRCS); do",
-      "$(location %s)" % (flatc_path),
-      " ".join(flatc_args),
-      " ".join(include_paths_cmd),
-      language_flag,
-      output_directory,
-      "$$f;",
-      "done",
-  ])
-  native.genrule(
-      name=name,
-      srcs=srcs,
-      outs=outs,
-      output_to_bindir=output_to_bindir,
-      tools=includes + [flatc_path,],
-      cmd=genrule_cmd,
-      message="Generating flatbuffer files for %s:" % (name),)
-  if reflection_name:
-    reflection_genrule_cmd = " ".join([
-        "for f in $(SRCS); do",
-        "$(location %s)" % (flatc_path),
-        "-b --schema",
-        " ".join(flatc_args),
-        " ".join(include_paths_cmd),
-        language_flag,
-        output_directory,
-        "$$f;",
-        "done",
-    ])
-    reflection_outs = [
-        (out_prefix + "%s.bfbs") % (s.replace(".fbs", "").split("/")[-1]) for s in srcs
-    ]
-    native.genrule(
-        name= "%s_srcs" % reflection_name,
-        srcs=srcs,
-        outs=reflection_outs,
-        output_to_bindir=output_to_bindir,
-        tools=includes + [flatc_path,],
-        cmd=reflection_genrule_cmd,
-        message="Generating flatbuffer reflection binary for %s:" % (name),)
-    native.Fileset(
-        name=reflection_name,
-        out="%s_out" % reflection_name,
-        entries=[
-            native.FilesetEntry(files=reflection_outs),
-        ],
-        visibility=reflection_visiblity
-    )
-
-
-def flatbuffer_cc_library(name, srcs, srcs_filegroup_name="",
-                          out_prefix="", includes=[], include_paths=[],
-                          flatc_args=DEFAULT_FLATC_ARGS,
-                          visibility=None, srcs_filegroup_visibility=None,
-                          gen_reflections=False):
-  '''A cc_library with the generated reader/writers for the given flatbuffer definitions.
-
-  Args:
-    name: Rule name.
-    srcs: Source .fbs files. Sent in order to the compiler.
-    srcs_filegroup_name: Name of the output filegroup that holds srcs. Pass this
-        filegroup into the `includes` parameter of any other
-        flatbuffer_cc_library that depends on this one's schemas.
-    out_prefix: Prepend this path to the front of all generated files. Usually
-        is a directory name.
-    includes: Optional, list of filegroups of schemas that the srcs depend on.
-        ** SEE REMARKS BELOW **
-    include_paths: Optional, list of paths the includes files can be found in.
-    flatc_args: Optional list of additional arguments to pass to flatc
-        (e.g. --gen-mutable).
-    visibility: The visibility of the generated cc_library. By default, use the
-        default visibility of the project.
-    srcs_filegroup_visibility: The visibility of the generated srcs filegroup.
-        By default, use the value of the visibility parameter above.
-    gen_reflections: Optional, if true this will generate the flatbuffer
-      reflection binaries for the schemas.
-  Outs:
-    filegroup([name]_srcs): all generated .h files.
-    filegroup(srcs_filegroup_name if specified, or [name]_includes if not):
-        Other flatbuffer_cc_library's can pass this in for their `includes`
-        parameter, if they depend on the schemas in this library.
-    Fileset([name]_reflection): (Optional) all generated reflection binaries.
-    cc_library([name]): library with sources and flatbuffers deps.
-
-  Remarks:
-    ** Because the genrule used to call flatc does not have any trivial way of
-      computing the output list of files transitively generated by includes and
-      --gen-includes (the default) being defined for flatc, the --gen-includes
-      flag will not work as expected. The way around this is to add a dependency
-      to the flatbuffer_cc_library defined alongside the flatc included Fileset.
-      For example you might define:
-
-      flatbuffer_cc_library(
-          name = "my_fbs",
-          srcs = [ "schemas/foo.fbs" ],
-          includes = [ "//third_party/bazz:bazz_fbs_includes" ],
-      )
-
-      In which foo.fbs includes a few files from the Fileset defined at
-      //third_party/bazz:bazz_fbs_includes. When compiling the library that
-      includes foo_generated.h, and therefore has my_fbs as a dependency, it
-      will fail to find any of the bazz *_generated.h files unless you also
-      add bazz's flatbuffer_cc_library to your own dependency list, e.g.:
-
-      cc_library(
-          name = "my_lib",
-          deps = [
-              ":my_fbs",
-              "//third_party/bazz:bazz_fbs"
-          ],
-      )
-
-      Happy dependent Flatbuffering!
-  '''
-  output_headers = [
-      (out_prefix + "%s_generated.h") % (s.replace(".fbs", "").split("/")[-1]) for s in srcs
-  ]
-  reflection_name = "%s_reflection" % name if gen_reflections else ""
-
-  flatbuffer_library_public(name="%s_srcs" % (name),
-                            srcs=srcs,
-                            outs=output_headers,
-                            language_flag="-c",
-                            out_prefix=out_prefix,
-                            includes=includes,
-                            include_paths=include_paths,
-                            flatc_args=flatc_args,
-                            reflection_name=reflection_name,
-                            reflection_visiblity=visibility,)
-  native.cc_library(name=name,
-                    hdrs=output_headers,
-                    srcs=output_headers,
-                    features=[
-                        "-parse_headers",
-                    ],
-                    deps=[
-                        "@flatbuffers//:runtime_cc",
-                    ],
-                    includes=["."],
-                    linkstatic=1,
-                    visibility=visibility)
-
-  # A filegroup for the `srcs`. That is, all the schema files for this
-  # Flatbuffer set.
-  native.filegroup(
-      name = srcs_filegroup_name if srcs_filegroup_name else "%s_includes" % (name),
-      srcs = srcs,
-      visibility=srcs_filegroup_visibility if srcs_filegroup_visibility != None else visibility)
diff --git a/third_party/flatbuffers/flatbuffers.BUILD b/third_party/flatbuffers/flatbuffers.BUILD
deleted file mode 100644
index 824c97b..0000000
--- a/third_party/flatbuffers/flatbuffers.BUILD
+++ /dev/null
@@ -1,147 +0,0 @@
-package(
-    default_visibility = ["//visibility:public"],
-)
-
-licenses(["notice"])  # Apache 2.0
-
-exports_files(["LICENSE.txt"])
-
-config_setting(
-    name = "freebsd",
-    values = {"cpu": "freebsd"},
-    visibility = ["//visibility:public"],
-)
-
-FLATBUFFERS_COPTS = [
-    "-fexceptions",
-] + select({
-    "@bazel_tools//src:windows": [],
-    "@bazel_tools//src:windows_msvc": [],
-    "//conditions:default": ["-Wno-implicit-fallthrough"],
-})
-
-# Public flatc library to compile flatbuffer files at runtime.
-cc_library(
-    name = "flatbuffers",
-    srcs = [
-        "include/flatbuffers/code_generators.h",
-        "include/flatbuffers/reflection_generated.h",
-        "src/code_generators.cpp",
-        "src/idl_gen_fbs.cpp",
-        "src/idl_gen_general.cpp",
-        "src/idl_gen_text.cpp",
-        "src/idl_parser.cpp",
-        "src/reflection.cpp",
-        "src/util.cpp",
-    ],
-    hdrs = [
-        "include/flatbuffers/base.h",
-        "include/flatbuffers/flatbuffers.h",
-        "include/flatbuffers/flexbuffers.h",
-        "include/flatbuffers/hash.h",
-        "include/flatbuffers/idl.h",
-        "include/flatbuffers/reflection.h",
-        "include/flatbuffers/stl_emulation.h",
-        "include/flatbuffers/util.h",
-    ],
-    copts = FLATBUFFERS_COPTS,
-    includes = ["include/"],
-)
-
-# Public flatc compiler library.
-cc_library(
-    name = "flatc_library",
-    srcs = [
-        "grpc/src/compiler/config.h",
-        "grpc/src/compiler/go_generator.h",
-        "grpc/src/compiler/schema_interface.h",
-        "include/flatbuffers/base.h",
-        "include/flatbuffers/code_generators.h",
-        "include/flatbuffers/flatbuffers.h",
-        "include/flatbuffers/flatc.h",
-        "include/flatbuffers/flexbuffers.h",
-        "include/flatbuffers/hash.h",
-        "include/flatbuffers/idl.h",
-        "include/flatbuffers/reflection.h",
-        "include/flatbuffers/reflection_generated.h",
-        "include/flatbuffers/stl_emulation.h",
-        "include/flatbuffers/util.h",
-        "src/code_generators.cpp",
-        "src/flatc.cpp",
-        "src/idl_gen_fbs.cpp",
-        "src/idl_parser.cpp",
-        "src/reflection.cpp",
-        "src/util.cpp",
-    ],
-    hdrs = [
-        "include/flatbuffers/base.h",
-        "include/flatbuffers/code_generators.h",
-        "include/flatbuffers/flatbuffers.h",
-        "include/flatbuffers/flatc.h",
-        "include/flatbuffers/idl.h",
-        "include/flatbuffers/reflection.h",
-        "include/flatbuffers/stl_emulation.h",
-        "include/flatbuffers/util.h",
-    ],
-    copts = FLATBUFFERS_COPTS,
-    includes = [
-        "grpc/",
-        "include/",
-    ],
-)
-
-# Public flatc compiler.
-cc_binary(
-    name = "flatc",
-    srcs = [
-        "grpc/src/compiler/cpp_generator.cc",
-        "grpc/src/compiler/cpp_generator.h",
-        "grpc/src/compiler/go_generator.cc",
-        "grpc/src/compiler/go_generator.h",
-        "grpc/src/compiler/schema_interface.h",
-        "src/flatc_main.cpp",
-        "src/idl_gen_cpp.cpp",
-        "src/idl_gen_general.cpp",
-        "src/idl_gen_go.cpp",
-        "src/idl_gen_grpc.cpp",
-        "src/idl_gen_js.cpp",
-        "src/idl_gen_json_schema.cpp",
-        "src/idl_gen_php.cpp",
-        "src/idl_gen_python.cpp",
-        "src/idl_gen_text.cpp",
-    ],
-    copts = FLATBUFFERS_COPTS,
-    includes = [
-        "grpc/",
-        "include/",
-    ],
-    linkopts = select({
-        ":freebsd": [
-            "-lm",
-        ],
-        "//conditions:default": [
-            "-lm",
-            "-ldl",
-        ],
-    }),
-    deps = [
-        ":flatc_library",
-    ],
-)
-
-filegroup(
-    name = "runtime_cc_srcs",
-    srcs = [
-        "include/flatbuffers/base.h",
-        "include/flatbuffers/flatbuffers.h",
-        "include/flatbuffers/stl_emulation.h",
-        "include/flatbuffers/util.h",
-    ],
-)
-
-cc_library(
-    name = "runtime_cc",
-    hdrs = ["runtime_cc_srcs"],
-    includes = ["include"],
-    linkstatic = 1,
-)
diff --git a/third_party/gast.BUILD b/third_party/gast.BUILD
deleted file mode 100644
index 4866982..0000000
--- a/third_party/gast.BUILD
+++ /dev/null
@@ -1,19 +0,0 @@
-# Description:
-#   Python AST that abstracts the underlying Python version.
-
-licenses(["notice"])  # BSD 3-clause
-
-exports_files(["PKG-INFO"])
-
-py_library(
-    name = "gast",
-    srcs = [
-        "gast/__init__.py",
-        "gast/ast2.py",
-        "gast/ast3.py",
-        "gast/astn.py",
-        "gast/gast.py",
-    ],
-    srcs_version = "PY2AND3",
-    visibility = ["//visibility:public"],
-)
diff --git a/third_party/gif.BUILD b/third_party/gif.BUILD
deleted file mode 100644
index 78fbd6c..0000000
--- a/third_party/gif.BUILD
+++ /dev/null
@@ -1,70 +0,0 @@
-# Description:
-#   A library for decoding and encoding GIF images
-
-licenses(["notice"])  # MIT
-
-exports_files(["COPYING"])
-
-cc_library(
-    name = "gif",
-    srcs = [
-        "lib/dgif_lib.c",
-        "lib/egif_lib.c",
-        "lib/gif_err.c",
-        "lib/gif_font.c",
-        "lib/gif_hash.c",
-        "lib/gif_hash.h",
-        "lib/gif_lib_private.h",
-        "lib/gifalloc.c",
-        "lib/openbsd-reallocarray.c",
-        "lib/quantize.c",
-    ],
-    hdrs = ["lib/gif_lib.h"],
-    defines = select({
-        #"@org_tensorflow//tensorflow:android": [
-        ":android": [
-            "S_IREAD=S_IRUSR",
-            "S_IWRITE=S_IWUSR",
-            "S_IEXEC=S_IXUSR",
-        ],
-        "//conditions:default": [],
-    }),
-    includes = ["lib/."],
-    visibility = ["//visibility:public"],
-    deps = select({
-        ":windows": [":windows_polyfill"],
-        ":windows_msvc": [":windows_polyfill"],
-        "//conditions:default": [],
-    }),
-)
-
-cc_library(
-    name = "windows_polyfill",
-    hdrs = ["windows/unistd.h"],
-    includes = ["windows"],
-)
-
-genrule(
-    name = "windows_unistd_h",
-    outs = ["windows/unistd.h"],
-    cmd = "touch $@",
-)
-
-config_setting(
-    name = "windows_msvc",
-    values = {
-        "cpu": "x64_windows_msvc",
-    },
-)
-
-config_setting(
-    name = "windows",
-    values = {
-        "cpu": "x64_windows",
-    },
-)
-
-config_setting(
-    name = "android",
-    values = {"crosstool_top": "//external:android/crosstool"},
-)
diff --git a/third_party/git/BUILD b/third_party/git/BUILD
deleted file mode 100644
index e69de29..0000000
--- a/third_party/git/BUILD
+++ /dev/null
diff --git a/third_party/git/BUILD.tpl b/third_party/git/BUILD.tpl
deleted file mode 100644
index 7b031e7..0000000
--- a/third_party/git/BUILD.tpl
+++ /dev/null
@@ -1,10 +0,0 @@
-# Description:
-# Exports generated files used to generate tensorflow/core/util/version_info.cc
-
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"])
-
-exports_files(
-    glob(["gen/*"]),
-)
diff --git a/third_party/git/git_configure.bzl b/third_party/git/git_configure.bzl
deleted file mode 100644
index 8e2839b..0000000
--- a/third_party/git/git_configure.bzl
+++ /dev/null
@@ -1,60 +0,0 @@
-"""Repository rule for Git autoconfiguration.
-
-`git_configure` depends on the following environment variables:
-
-  * `PYTHON_BIN_PATH`: location of python binary.
-"""
-
-_PYTHON_BIN_PATH = "PYTHON_BIN_PATH"
-
-def _fail(msg):
-  """Output failure message when auto configuration fails."""
-  red = "\033[0;31m"
-  no_color = "\033[0m"
-  fail("%sGit Configuration Error:%s %s\n" % (red, no_color, msg))
-
-def _get_python_bin(repository_ctx):
-  """Gets the python bin path."""
-  python_bin = repository_ctx.os.environ.get(_PYTHON_BIN_PATH)
-  if python_bin != None:
-    return python_bin
-  python_bin_path = repository_ctx.which("python")
-  if python_bin_path != None:
-    return str(python_bin_path)
-  _fail("Cannot find python in PATH, please make sure " +
-        "python is installed and add its directory in PATH, or --define " +
-        "%s='/something/else'.\nPATH=%s" % (
-            _PYTHON_BIN_PATH, repository_ctx.os.environ.get("PATH", "")))
-
-
-def _git_conf_impl(repository_ctx):
-  repository_ctx.template(
-      "BUILD",
-      Label("//third_party/git:BUILD.tpl"))
-
-  tensorflow_root_path = str(repository_ctx.path(
-      Label("@org_tensorflow//:BUILD")))[:-len("BUILD")]
-  python_script_path = repository_ctx.path(
-      Label("@org_tensorflow//tensorflow/tools/git:gen_git_source.py"))
-  generated_files_path = repository_ctx.path("gen")
-
-  r = repository_ctx.execute(
-      ["test", "-f", "%s/.git/logs/HEAD" % tensorflow_root_path])
-  if r.return_code == 0:
-    unused_var = repository_ctx.path(Label("//:.git/HEAD")) # pylint: disable=unused-variable
-
-  result = repository_ctx.execute([
-      _get_python_bin(repository_ctx),
-      python_script_path, "--configure", tensorflow_root_path,
-      "--gen_root_path", generated_files_path], quiet=False)
-
-  if not result.return_code == 0:
-    _fail(result.stderr)
-
-
-git_configure = repository_rule(
-    implementation = _git_conf_impl,
-    environ = [
-        _PYTHON_BIN_PATH,
-    ],
-)
diff --git a/third_party/gpus/BUILD b/third_party/gpus/BUILD
deleted file mode 100644
index e69de29..0000000
--- a/third_party/gpus/BUILD
+++ /dev/null
diff --git a/third_party/gpus/crosstool/BUILD b/third_party/gpus/crosstool/BUILD
deleted file mode 100644
index e69de29..0000000
--- a/third_party/gpus/crosstool/BUILD
+++ /dev/null
diff --git a/third_party/gpus/crosstool/BUILD.tpl b/third_party/gpus/crosstool/BUILD.tpl
deleted file mode 100644
index 98cb326..0000000
--- a/third_party/gpus/crosstool/BUILD.tpl
+++ /dev/null
@@ -1,53 +0,0 @@
-licenses(["restricted"])
-
-package(default_visibility = ["//visibility:public"])
-
-cc_toolchain_suite(
-    name = "toolchain",
-    toolchains = {
-        "local|compiler": ":cc-compiler-local",
-        "darwin|compiler": ":cc-compiler-darwin",
-    },
-)
-
-cc_toolchain(
-    name = "cc-compiler-local",
-    all_files = "%{linker_files}",
-    compiler_files = ":empty",
-    cpu = "local",
-    dwp_files = ":empty",
-    dynamic_runtime_libs = [":empty"],
-    linker_files = "%{linker_files}",
-    objcopy_files = ":empty",
-    static_runtime_libs = [":empty"],
-    strip_files = ":empty",
-    # To support linker flags that need to go to the start of command line
-    # we need the toolchain to support parameter files. Parameter files are
-    # last on the command line and contain all shared libraries to link, so all
-    # regular options will be left of them.
-    supports_param_files = 1,
-)
-
-cc_toolchain(
-    name = "cc-compiler-darwin",
-    all_files = "%{linker_files}",
-    compiler_files = ":empty",
-    cpu = "darwin",
-    dwp_files = ":empty",
-    dynamic_runtime_libs = [":empty"],
-    linker_files = "%{linker_files}",
-    objcopy_files = ":empty",
-    static_runtime_libs = [":empty"],
-    strip_files = ":empty",
-    supports_param_files = 0,
-)
-
-filegroup(
-    name = "empty",
-    srcs = [],
-)
-
-filegroup(
-    name = "crosstool_wrapper_driver_is_not_gcc",
-    srcs = ["clang/bin/crosstool_wrapper_driver_is_not_gcc"],
-)
diff --git a/third_party/gpus/crosstool/CROSSTOOL_clang.tpl b/third_party/gpus/crosstool/CROSSTOOL_clang.tpl
deleted file mode 100644
index 2f09473..0000000
--- a/third_party/gpus/crosstool/CROSSTOOL_clang.tpl
+++ /dev/null
@@ -1,299 +0,0 @@
-major_version: "local"
-minor_version: ""
-default_target_cpu: "same_as_host"
-
-default_toolchain {
-  cpu: "k8"
-  toolchain_identifier: "local_linux"
-}
-default_toolchain {
-  cpu: "piii"
-  toolchain_identifier: "local_linux"
-}
-default_toolchain {
-  cpu: "arm"
-  toolchain_identifier: "local_linux"
-}
-default_toolchain {
-  cpu: "darwin"
-  toolchain_identifier: "local_darwin"
-}
-default_toolchain {
-  cpu: "ppc"
-  toolchain_identifier: "local_linux"
-}
-
-toolchain {
-  abi_version: "local"
-  abi_libc_version: "local"
-  compiler: "compiler"
-  host_system_name: "local"
-  needsPic: true
-  target_libc: "local"
-  target_cpu: "local"
-  target_system_name: "local"
-  toolchain_identifier: "local_linux"
-
-  feature {
-    name: "c++11"
-    flag_set {
-      action: "c++-compile"
-      flag_group {
-        flag: "-std=c++11"
-      }
-    }
-  }
-
-  feature {
-    name: "stdlib"
-    flag_set {
-      action: "c++-link-executable"
-      action: "c++-link-dynamic-library"
-      action: "c++-link-nodeps-dynamic-library"
-      flag_group {
-        flag: "-lstdc++"
-      }
-    }
-  }
-
-  feature {
-    name: "determinism"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        # Make C++ compilation deterministic. Use linkstamping instead of these
-        # compiler symbols.
-        flag: "-Wno-builtin-macro-redefined"
-        flag: "-D__DATE__=\"redacted\""
-        flag: "-D__TIMESTAMP__=\"redacted\""
-        flag: "-D__TIME__=\"redacted\""
-      }
-    }
-  }
-
-  feature {
-    name: "alwayslink"
-    flag_set {
-      action: "c++-link-dynamic-library"
-      action: "c++-link-nodeps-dynamic-library"
-      action: "c++-link-executable"
-      flag_group {
-        flag: "-Wl,-no-as-needed"
-      }
-    }
-  }
-
-  # This feature will be enabled for builds that support pic by bazel.
-  feature {
-    name: "pic"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        expand_if_all_available: "pic"
-        flag: "-fPIC"
-      }
-      flag_group {
-        expand_if_none_available: "pic"
-        flag: "-fPIE"
-      }
-    }
-  }
-
-  # Security hardening on by default.
-  feature {
-    name: "hardening"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
-        # We need to undef it before redefining it as some distributions now
-        # have it enabled by default.
-        flag: "-U_FORTIFY_SOURCE"
-        flag: "-D_FORTIFY_SOURCE=1"
-        flag: "-fstack-protector"
-      }
-    }
-    flag_set {
-      action: "c++-link-dynamic-library"
-      action: "c++-link-nodeps-dynamic-library"
-      flag_group {
-        flag: "-Wl,-z,relro,-z,now"
-      }
-    }
-    flag_set {
-      action: "c++-link-executable"
-      flag_group {
-        flag: "-pie"
-        flag: "-Wl,-z,relro,-z,now"
-      }
-    }
-  }
-
-  feature {
-    name: "warnings"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        # All warnings are enabled. Maybe enable -Werror as well?
-        flag: "-Wall"
-        # Some parts of the codebase set -Werror and hit this warning, so
-        # switch it off for now.
-        flag: "-Wno-invalid-partial-specialization"
-      }
-    }
-  }
-
-  # Keep stack frames for debugging, even in opt mode.
-  feature {
-    name: "frame-pointer"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        flag: "-fno-omit-frame-pointer"
-      }
-    }
-  }
-
-  feature {
-    name: "build-id"
-    flag_set {
-      action: "c++-link-executable"
-      action: "c++-link-dynamic-library"
-      action: "c++-link-nodeps-dynamic-library"
-      flag_group {
-        # Stamp the binary with a unique identifier.
-        flag: "-Wl,--build-id=md5"
-        flag: "-Wl,--hash-style=gnu"
-      }
-    }
-  }
-
-  feature {
-    name: "no-canonical-prefixes"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      action: "c++-link-executable"
-      action: "c++-link-dynamic-library"
-      action: "c++-link-nodeps-dynamic-library"
-      flag_group {
-        flag:"-no-canonical-prefixes"
-      }
-    }
-  }
-
-  feature {
-    name: "disable-assertions"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        flag: "-DNDEBUG"
-      }
-    }
-  }
-
-  feature {
-    name: "linker-bin-path"
-
-    flag_set {
-      action: "c++-link-executable"
-      action: "c++-link-dynamic-library"
-      action: "c++-link-nodeps-dynamic-library"
-      flag_group {
-        flag: "-B/usr/bin/"
-      }
-    }
-  }
-
-  feature {
-    name: "common"
-    implies: "stdlib"
-    implies: "c++11"
-    implies: "determinism"
-    implies: "alwayslink"
-    implies: "hardening"
-    implies: "warnings"
-    implies: "frame-pointer"
-    implies: "build-id"
-    implies: "no-canonical-prefixes"
-    implies: "linker-bin-path"
-  }
-
-  feature {
-    name: "opt"
-    implies: "common"
-    implies: "disable-assertions"
-
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        # No debug symbols.
-        # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt
-        # or even generally? However, that can't happen here, as it requires
-        # special handling in Bazel.
-        flag: "-g0"
-
-        # Conservative choice for -O
-        # -O3 can increase binary size and even slow down the resulting binaries.
-        # Profile first and / or use FDO if you need better performance than this.
-        flag: "-O2"
-
-        # Removal of unused code and data at link time (can this increase binary size in some cases?).
-        flag: "-ffunction-sections"
-        flag: "-fdata-sections"
-      }
-    }
-    flag_set {
-      action: "c++-link-dynamic-library"
-      action: "c++-link-nodeps-dynamic-library"
-      action: "c++-link-executable"
-      flag_group {
-        flag: "-Wl,--gc-sections"
-      }
-    }
-  }
-
-  feature {
-    name: "fastbuild"
-    implies: "common"
-  }
-
-  feature {
-    name: "dbg"
-    implies: "common"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        flag: "-g"
-      }
-    }
-  }
-
-  # Set clang as a C/C++ compiler.
-  tool_path { name: "gcc" path: "%{clang_path}" }
-
-  # Use the default system toolchain for everything else.
-  tool_path { name: "ar" path: "/usr/bin/ar" }
-  tool_path { name: "compat-ld" path: "/usr/bin/ld" }
-  tool_path { name: "cpp" path: "/usr/bin/cpp" }
-  tool_path { name: "dwp" path: "/usr/bin/dwp" }
-  tool_path { name: "gcov" path: "/usr/bin/gcov" }
-  tool_path { name: "ld" path: "/usr/bin/ld" }
-  tool_path { name: "nm" path: "/usr/bin/nm" }
-  tool_path { name: "objcopy" path: "/usr/bin/objcopy" }
-  tool_path { name: "objdump" path: "/usr/bin/objdump" }
-  tool_path { name: "strip" path: "/usr/bin/strip" }
-
-  # Enabled dynamic linking.
-  linking_mode_flags { mode: DYNAMIC }
-
-%{host_compiler_includes}
-}
diff --git a/third_party/gpus/crosstool/CROSSTOOL_nvcc.tpl b/third_party/gpus/crosstool/CROSSTOOL_nvcc.tpl
deleted file mode 100644
index 05290d6..0000000
--- a/third_party/gpus/crosstool/CROSSTOOL_nvcc.tpl
+++ /dev/null
@@ -1,249 +0,0 @@
-major_version: "local"
-minor_version: ""
-default_target_cpu: "same_as_host"
-
-default_toolchain {
-  cpu: "k8"
-  toolchain_identifier: "local_linux"
-}
-default_toolchain {
-  cpu: "piii"
-  toolchain_identifier: "local_linux"
-}
-default_toolchain {
-  cpu: "arm"
-  toolchain_identifier: "local_linux"
-}
-default_toolchain {
-  cpu: "darwin"
-  toolchain_identifier: "local_darwin"
-}
-default_toolchain {
-  cpu: "ppc"
-  toolchain_identifier: "local_linux"
-}
-
-toolchain {
-  abi_version: "local"
-  abi_libc_version: "local"
-  builtin_sysroot: ""
-  compiler: "compiler"
-  host_system_name: "local"
-  needsPic: true
-  supports_gold_linker: false
-  supports_incremental_linker: false
-  supports_fission: false
-  supports_interface_shared_objects: false
-  supports_normalizing_ar: false
-  supports_start_end_lib: false
-  supports_thin_archives: false
-  target_libc: "local"
-  target_cpu: "local"
-  target_system_name: "local"
-  toolchain_identifier: "local_linux"
-
-  tool_path { name: "ar" path: "/usr/bin/ar" }
-  tool_path { name: "compat-ld" path: "/usr/bin/ld" }
-  tool_path { name: "cpp" path: "/usr/bin/cpp" }
-  tool_path { name: "dwp" path: "/usr/bin/dwp" }
-  # As part of the TensorFlow release, we place some cuda-related compilation
-  # files in @local_config_cuda//crosstool/clang/bin, and this relative
-  # path, combined with the rest of our Bazel configuration causes our
-  # compilation to use those files.
-  tool_path { name: "gcc" path: "clang/bin/crosstool_wrapper_driver_is_not_gcc" }
-  # Use "-std=c++11" for nvcc. For consistency, force both the host compiler
-  # and the device compiler to use "-std=c++11".
-  cxx_flag: "-std=c++11"
-  linker_flag: "-Wl,-no-as-needed"
-  linker_flag: "-lstdc++"
-  linker_flag: "-B/usr/bin/"
-
-%{host_compiler_includes}
-  tool_path { name: "gcov" path: "/usr/bin/gcov" }
-
-  # C(++) compiles invoke the compiler (as that is the one knowing where
-  # to find libraries), but we provide LD so other rules can invoke the linker.
-  tool_path { name: "ld" path: "/usr/bin/ld" }
-
-  tool_path { name: "nm" path: "/usr/bin/nm" }
-  tool_path { name: "objcopy" path: "/usr/bin/objcopy" }
-  objcopy_embed_flag: "-I"
-  objcopy_embed_flag: "binary"
-  tool_path { name: "objdump" path: "/usr/bin/objdump" }
-  tool_path { name: "strip" path: "/usr/bin/strip" }
-
-  # Anticipated future default.
-  unfiltered_cxx_flag: "-no-canonical-prefixes"
-
-  # Make C++ compilation deterministic. Use linkstamping instead of these
-  # compiler symbols.
-  unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
-  unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
-
-  # Security hardening on by default.
-  # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
-  # We need to undef it before redefining it as some distributions now have
-  # it enabled by default.
-  compiler_flag: "-U_FORTIFY_SOURCE"
-  compiler_flag: "-D_FORTIFY_SOURCE=1"
-  compiler_flag: "-fstack-protector"
-  compiler_flag: "-fPIE"
-  linker_flag: "-pie"
-  linker_flag: "-Wl,-z,relro,-z,now"
-
-  # Enable coloring even if there's no attached terminal. Bazel removes the
-  # escape sequences if --nocolor is specified. This isn't supported by gcc
-  # on Ubuntu 14.04.
-  # compiler_flag: "-fcolor-diagnostics"
-
-  # All warnings are enabled. Maybe enable -Werror as well?
-  compiler_flag: "-Wall"
-  # Enable a few more warnings that aren't part of -Wall.
-  compiler_flag: "-Wunused-but-set-parameter"
-  # But disable some that are problematic.
-  compiler_flag: "-Wno-free-nonheap-object" # has false positives
-
-  # Keep stack frames for debugging, even in opt mode.
-  compiler_flag: "-fno-omit-frame-pointer"
-
-  # Anticipated future default.
-  linker_flag: "-no-canonical-prefixes"
-  unfiltered_cxx_flag: "-fno-canonical-system-headers"
-  # Have gcc return the exit code from ld.
-  linker_flag: "-pass-exit-codes"
-  # Stamp the binary with a unique identifier.
-  linker_flag: "-Wl,--build-id=md5"
-  linker_flag: "-Wl,--hash-style=gnu"
-  # Gold linker only? Can we enable this by default?
-  # linker_flag: "-Wl,--warn-execstack"
-  # linker_flag: "-Wl,--detect-odr-violations"
-
-  # Include directory for cuda headers.
-%{cuda_include_path}
-
-  compilation_mode_flags {
-    mode: DBG
-    # Enable debug symbols.
-    compiler_flag: "-g"
-  }
-  compilation_mode_flags {
-    mode: OPT
-
-    # No debug symbols.
-    # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or
-    # even generally? However, that can't happen here, as it requires special
-    # handling in Bazel.
-    compiler_flag: "-g0"
-
-    # Conservative choice for -O
-    # -O3 can increase binary size and even slow down the resulting binaries.
-    # Profile first and / or use FDO if you need better performance than this.
-    compiler_flag: "-O2"
-
-    # Disable assertions
-    compiler_flag: "-DNDEBUG"
-
-    # Removal of unused code and data at link time (can this increase binary size in some cases?).
-    compiler_flag: "-ffunction-sections"
-    compiler_flag: "-fdata-sections"
-    linker_flag: "-Wl,--gc-sections"
-  }
-  linking_mode_flags { mode: DYNAMIC }
-}
-
-toolchain {
-  abi_version: "local"
-  abi_libc_version: "local"
-  builtin_sysroot: ""
-  compiler: "compiler"
-  host_system_name: "local"
-  needsPic: true
-  target_libc: "macosx"
-  target_cpu: "darwin"
-  target_system_name: "local"
-  toolchain_identifier: "local_darwin"
-
-  tool_path { name: "ar" path: "/usr/bin/libtool" }
-  tool_path { name: "compat-ld" path: "/usr/bin/ld" }
-  tool_path { name: "cpp" path: "/usr/bin/cpp" }
-  tool_path { name: "dwp" path: "/usr/bin/dwp" }
-  tool_path { name: "gcc" path: "clang/bin/crosstool_wrapper_driver_is_not_gcc" }
-  cxx_flag: "-std=c++11"
-  ar_flag: "-static"
-  ar_flag: "-s"
-  ar_flag: "-o"
-  linker_flag: "-lc++"
-  linker_flag: "-undefined"
-  linker_flag: "dynamic_lookup"
-  # TODO(ulfjack): This is wrong on so many levels. Figure out a way to auto-detect the proper
-  # setting from the local compiler, and also how to make incremental builds correct.
-  cxx_builtin_include_directory: "/"
-  tool_path { name: "gcov" path: "/usr/bin/gcov" }
-  tool_path { name: "ld" path: "/usr/bin/ld" }
-  tool_path { name: "nm" path: "/usr/bin/nm" }
-  tool_path { name: "objcopy" path: "/usr/bin/objcopy" }
-  objcopy_embed_flag: "-I"
-  objcopy_embed_flag: "binary"
-  tool_path { name: "objdump" path: "/usr/bin/objdump" }
-  tool_path { name: "strip" path: "/usr/bin/strip" }
-
-  # Anticipated future default.
-  unfiltered_cxx_flag: "-no-canonical-prefixes"
-  # Make C++ compilation deterministic. Use linkstamping instead of these
-  # compiler symbols.
-  unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
-  unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
-
-  # Security hardening on by default.
-  # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
-  compiler_flag: "-D_FORTIFY_SOURCE=1"
-  compiler_flag: "-fstack-protector"
-
-  # Enable coloring even if there's no attached terminal. Bazel removes the
-  # escape sequences if --nocolor is specified.
-  compiler_flag: "-fcolor-diagnostics"
-
-  # All warnings are enabled. Maybe enable -Werror as well?
-  compiler_flag: "-Wall"
-  # Enable a few more warnings that aren't part of -Wall.
-  compiler_flag: "-Wthread-safety"
-  compiler_flag: "-Wself-assign"
-
-  # Keep stack frames for debugging, even in opt mode.
-  compiler_flag: "-fno-omit-frame-pointer"
-
-  # Anticipated future default.
-  linker_flag: "-no-canonical-prefixes"
-
-  # Include directory for cuda headers.
-%{cuda_include_path}
-
-  compilation_mode_flags {
-    mode: DBG
-    # Enable debug symbols.
-    compiler_flag: "-g"
-  }
-  compilation_mode_flags {
-    mode: OPT
-    # No debug symbols.
-    # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or even generally?
-    # However, that can't happen here, as it requires special handling in Bazel.
-    compiler_flag: "-g0"
-
-    # Conservative choice for -O
-    # -O3 can increase binary size and even slow down the resulting binaries.
-    # Profile first and / or use FDO if you need better performance than this.
-    compiler_flag: "-O2"
-
-    # Disable assertions
-    compiler_flag: "-DNDEBUG"
-
-    # Removal of unused code and data at link time (can this increase binary size in some cases?).
-    compiler_flag: "-ffunction-sections"
-    compiler_flag: "-fdata-sections"
-  }
-}
diff --git a/third_party/gpus/crosstool/LICENSE b/third_party/gpus/crosstool/LICENSE
deleted file mode 100644
index d3da228..0000000
--- a/third_party/gpus/crosstool/LICENSE
+++ /dev/null
@@ -1,203 +0,0 @@
-Copyright 2015 The TensorFlow Authors.  All rights reserved.
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright 2015, The TensorFlow Authors.
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
diff --git a/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl b/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl
deleted file mode 100755
index 2558f46..0000000
--- a/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl
+++ /dev/null
@@ -1,258 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ==============================================================================
-
-"""Crosstool wrapper for compiling CUDA programs.
-
-SYNOPSIS:
-  crosstool_wrapper_is_not_gcc [options passed in by cc_library()
-                                or cc_binary() rule]
-
-DESCRIPTION:
-  This script is expected to be called by the cc_library() or cc_binary() bazel
-  rules. When the option "-x cuda" is present in the list of arguments passed
-  to this script, it invokes the nvcc CUDA compiler. Most arguments are passed
-  as is as a string to --compiler-options of nvcc. When "-x cuda" is not
-  present, this wrapper invokes hybrid_driver_is_not_gcc with the input
-  arguments as is.
-
-NOTES:
-  Changes to the contents of this file must be propagated from
-  //third_party/gpus/crosstool/crosstool_wrapper_is_not_gcc to
-  //third_party/gpus/crosstool/v*/*/clang/bin/crosstool_wrapper_is_not_gcc
-"""
-
-from __future__ import print_function
-
-__author__ = 'keveman@google.com (Manjunath Kudlur)'
-
-from argparse import ArgumentParser
-import os
-import subprocess
-import re
-import sys
-import pipes
-
-# Template values set by cuda_autoconf.
-CPU_COMPILER = ('%{cpu_compiler}')
-GCC_HOST_COMPILER_PATH = ('%{gcc_host_compiler_path}')
-
-NVCC_PATH = '%{nvcc_path}'
-PREFIX_DIR = os.path.dirname(GCC_HOST_COMPILER_PATH)
-NVCC_VERSION = '%{cuda_version}'
-
-def Log(s):
-  print('gpus/crosstool: {0}'.format(s))
-
-
-def GetOptionValue(argv, option):
-  """Extract the list of values for option from the argv list.
-
-  Args:
-    argv: A list of strings, possibly the argv passed to main().
-    option: The option whose value to extract, without the leading '-'.
-
-  Returns:
-    A list of values, either directly following the option,
-    (eg., -opt val1 val2) or values collected from multiple occurrences of
-    the option (eg., -opt val1 -opt val2).
-  """
-
-  parser = ArgumentParser()
-  parser.add_argument('-' + option, nargs='*', action='append')
-  args, _ = parser.parse_known_args(argv)
-  if not args or not vars(args)[option]:
-    return []
-  else:
-    return sum(vars(args)[option], [])
-
-
-def GetHostCompilerOptions(argv):
-  """Collect the -isystem, -iquote, and --sysroot option values from argv.
-
-  Args:
-    argv: A list of strings, possibly the argv passed to main().
-
-  Returns:
-    The string that can be used as the --compiler-options to nvcc.
-  """
-
-  parser = ArgumentParser()
-  parser.add_argument('-isystem', nargs='*', action='append')
-  parser.add_argument('-iquote', nargs='*', action='append')
-  parser.add_argument('--sysroot', nargs=1)
-  parser.add_argument('-g', nargs='*', action='append')
-  parser.add_argument('-fno-canonical-system-headers', action='store_true')
-
-  args, _ = parser.parse_known_args(argv)
-
-  opts = ''
-
-  if args.isystem:
-    opts += ' -isystem ' + ' -isystem '.join(sum(args.isystem, []))
-  if args.iquote:
-    opts += ' -iquote ' + ' -iquote '.join(sum(args.iquote, []))
-  if args.g:
-    opts += ' -g' + ' -g'.join(sum(args.g, []))
-  if args.fno_canonical_system_headers:
-    opts += ' -fno-canonical-system-headers'
-  if args.sysroot:
-    opts += ' --sysroot ' + args.sysroot[0]
-
-  return opts
-
-def _update_options(nvcc_options):
-  if NVCC_VERSION in ("7.0",):
-    return nvcc_options
-
-  update_options = { "relaxed-constexpr" : "expt-relaxed-constexpr" }
-  return [ update_options[opt] if opt in update_options else opt
-                    for opt in nvcc_options ]
-
-def GetNvccOptions(argv):
-  """Collect the -nvcc_options values from argv.
-
-  Args:
-    argv: A list of strings, possibly the argv passed to main().
-
-  Returns:
-    The string that can be passed directly to nvcc.
-  """
-
-  parser = ArgumentParser()
-  parser.add_argument('-nvcc_options', nargs='*', action='append')
-
-  args, _ = parser.parse_known_args(argv)
-
-  if args.nvcc_options:
-    options = _update_options(sum(args.nvcc_options, []))
-    return ' '.join(['--'+a for a in options])
-  return ''
-
-
-def InvokeNvcc(argv, log=False):
-  """Call nvcc with arguments assembled from argv.
-
-  Args:
-    argv: A list of strings, possibly the argv passed to main().
-    log: True if logging is requested.
-
-  Returns:
-    The return value of calling os.system('nvcc ' + args)
-  """
-
-  host_compiler_options = GetHostCompilerOptions(argv)
-  nvcc_compiler_options = GetNvccOptions(argv)
-  opt_option = GetOptionValue(argv, 'O')
-  m_options = GetOptionValue(argv, 'm')
-  m_options = ''.join([' -m' + m for m in m_options if m in ['32', '64']])
-  include_options = GetOptionValue(argv, 'I')
-  out_file = GetOptionValue(argv, 'o')
-  depfiles = GetOptionValue(argv, 'MF')
-  defines = GetOptionValue(argv, 'D')
-  defines = ''.join([' -D' + define for define in defines])
-  undefines = GetOptionValue(argv, 'U')
-  undefines = ''.join([' -U' + define for define in undefines])
-  std_options = GetOptionValue(argv, 'std')
-  # currently only c++11 is supported by Cuda 7.0 std argument
-  nvcc_allowed_std_options = ["c++11"]
-  std_options = ''.join([' -std=' + define
-      for define in std_options if define in nvcc_allowed_std_options])
-
-  # The list of source files get passed after the -c option. I don't know of
-  # any other reliable way to just get the list of source files to be compiled.
-  src_files = GetOptionValue(argv, 'c')
-
-  if len(src_files) == 0:
-    return 1
-  if len(out_file) != 1:
-    return 1
-
-  opt = (' -O2' if (len(opt_option) > 0 and int(opt_option[0]) > 0)
-         else ' -g -G')
-
-  includes = (' -I ' + ' -I '.join(include_options)
-              if len(include_options) > 0
-              else '')
-
-  # Unfortunately, there are other options that have -c prefix too.
-  # So allowing only those look like C/C++ files.
-  src_files = [f for f in src_files if
-               re.search('\.cpp$|\.cc$|\.c$|\.cxx$|\.C$', f)]
-  srcs = ' '.join(src_files)
-  out = ' -o ' + out_file[0]
-
-  supported_cuda_compute_capabilities = [ %{cuda_compute_capabilities} ]
-  nvccopts = '-D_FORCE_INLINES '
-  for capability in supported_cuda_compute_capabilities:
-    capability = capability.replace('.', '')
-    nvccopts += r'-gencode=arch=compute_%s,\"code=sm_%s,compute_%s\" ' % (
-        capability, capability, capability)
-  nvccopts += ' ' + nvcc_compiler_options
-  nvccopts += undefines
-  nvccopts += defines
-  nvccopts += std_options
-  nvccopts += m_options
-
-  if depfiles:
-    # Generate the dependency file
-    depfile = depfiles[0]
-    cmd = (NVCC_PATH + ' ' + nvccopts +
-           ' --compiler-options "' + host_compiler_options + '"' +
-           ' --compiler-bindir=' + GCC_HOST_COMPILER_PATH +
-           ' -I .' +
-           ' -x cu ' + opt + includes + ' ' + srcs + ' -M -o ' + depfile)
-    if log: Log(cmd)
-    exit_status = os.system(cmd)
-    if exit_status != 0:
-      return exit_status
-
-  cmd = (NVCC_PATH + ' ' + nvccopts +
-         ' --compiler-options "' + host_compiler_options + ' -fPIC"' +
-         ' --compiler-bindir=' + GCC_HOST_COMPILER_PATH +
-         ' -I .' +
-         ' -x cu ' + opt + includes + ' -c ' + srcs + out)
-
-  # TODO(zhengxq): for some reason, 'gcc' needs this help to find 'as'.
-  # Need to investigate and fix.
-  cmd = 'PATH=' + PREFIX_DIR + ':$PATH ' + cmd
-  if log: Log(cmd)
-  return os.system(cmd)
-
-
-def main():
-  parser = ArgumentParser()
-  parser.add_argument('-x', nargs=1)
-  parser.add_argument('--cuda_log', action='store_true')
-  args, leftover = parser.parse_known_args(sys.argv[1:])
-
-  if args.x and args.x[0] == 'cuda':
-    if args.cuda_log: Log('-x cuda')
-    leftover = [pipes.quote(s) for s in leftover]
-    if args.cuda_log: Log('using nvcc')
-    return InvokeNvcc(leftover, log=args.cuda_log)
-
-  # Strip our flags before passing through to the CPU compiler for files which
-  # are not -x cuda. We can't just pass 'leftover' because it also strips -x.
-  # We not only want to pass -x to the CPU compiler, but also keep it in its
-  # relative location in the argv list (the compiler is actually sensitive to
-  # this).
-  cpu_compiler_flags = [flag for flag in sys.argv[1:]
-                             if not flag.startswith(('--cuda_log'))]
-
-  return subprocess.call([CPU_COMPILER] + cpu_compiler_flags)
-
-if __name__ == '__main__':
-  sys.exit(main())
diff --git a/third_party/gpus/crosstool/remote.BUILD.tpl b/third_party/gpus/crosstool/remote.BUILD.tpl
deleted file mode 100644
index b231633..0000000
--- a/third_party/gpus/crosstool/remote.BUILD.tpl
+++ /dev/null
@@ -1,10 +0,0 @@
-# Description:
-#   Template for crosstool Build file to use a pre-generated config.
-licenses(["restricted"])
-
-package(default_visibility = ["//visibility:public"])
-
-alias(
-    name = "toolchain",
-    actual = "%{remote_cuda_repo}:toolchain",
-)
diff --git a/third_party/gpus/cuda/BUILD b/third_party/gpus/cuda/BUILD
deleted file mode 100644
index e69de29..0000000
--- a/third_party/gpus/cuda/BUILD
+++ /dev/null
diff --git a/third_party/gpus/cuda/BUILD.tpl b/third_party/gpus/cuda/BUILD.tpl
deleted file mode 100644
index 2a37c65..0000000
--- a/third_party/gpus/cuda/BUILD.tpl
+++ /dev/null
@@ -1,196 +0,0 @@
-licenses(["restricted"])  # MPL2, portions GPL v3, LGPL v3, BSD-like
-
-package(default_visibility = ["//visibility:public"])
-
-config_setting(
-    name = "using_nvcc",
-    values = {
-        "define": "using_cuda_nvcc=true",
-    },
-)
-
-config_setting(
-    name = "using_clang",
-    values = {
-        "define": "using_cuda_clang=true",
-    },
-)
-
-# Equivalent to using_clang && -c opt.
-config_setting(
-    name = "using_clang_opt",
-    values = {
-        "define": "using_cuda_clang=true",
-        "compilation_mode": "opt",
-    },
-)
-
-config_setting(
-    name = "darwin",
-    values = {"cpu": "darwin"},
-    visibility = ["//visibility:public"],
-)
-
-config_setting(
-    name = "freebsd",
-    values = {"cpu": "freebsd"},
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cuda_headers",
-    hdrs = [
-        "cuda/cuda_config.h",
-        %{cuda_headers}
-    ],
-    includes = [
-        ".",
-        "cuda/include",
-        "cuda/include/crt",
-    ],
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cudart_static",
-    srcs = ["cuda/lib/%{cudart_static_lib}"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    linkopts = select({
-        ":freebsd": [],
-        "//conditions:default": ["-ldl"],
-    }) + [
-        "-lpthread",
-        %{cudart_static_linkopt}
-    ],
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cuda_driver",
-    srcs = ["cuda/lib/%{cuda_driver_lib}"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cudart",
-    srcs = ["cuda/lib/%{cudart_lib}"],
-    data = ["cuda/lib/%{cudart_lib}"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    linkstatic = 1,
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cublas",
-    srcs = ["cuda/lib/%{cublas_lib}"],
-    data = ["cuda/lib/%{cublas_lib}"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    linkstatic = 1,
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cusolver",
-    srcs = ["cuda/lib/%{cusolver_lib}"],
-    data = ["cuda/lib/%{cusolver_lib}"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    linkopts = ["-lgomp"],
-    linkstatic = 1,
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cudnn",
-    srcs = ["cuda/lib/%{cudnn_lib}"],
-    data = ["cuda/lib/%{cudnn_lib}"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    linkstatic = 1,
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cufft",
-    srcs = ["cuda/lib/%{cufft_lib}"],
-    data = ["cuda/lib/%{cufft_lib}"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    linkstatic = 1,
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "curand",
-    srcs = ["cuda/lib/%{curand_lib}"],
-    data = ["cuda/lib/%{curand_lib}"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    linkstatic = 1,
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cuda",
-    visibility = ["//visibility:public"],
-    deps = [
-        ":cublas",
-        ":cuda_headers",
-        ":cudart",
-        ":cudnn",
-        ":cufft",
-        ":curand",
-    ],
-)
-
-cc_library(
-    name = "cupti_headers",
-    hdrs = [
-        "cuda/cuda_config.h",
-        ":cuda-extras",
-    ],
-    includes = [
-        ".",
-        "cuda/extras/CUPTI/include/",
-    ],
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cupti_dsos",
-    data = ["cuda/lib/%{cupti_lib}"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "libdevice_root",
-    data = [":cuda-nvvm"],
-    visibility = ["//visibility:public"],
-)
-
-%{cuda_include_genrules}
diff --git a/third_party/gpus/cuda/LICENSE b/third_party/gpus/cuda/LICENSE
deleted file mode 100644
index d3da228..0000000
--- a/third_party/gpus/cuda/LICENSE
+++ /dev/null
@@ -1,203 +0,0 @@
-Copyright 2015 The TensorFlow Authors.  All rights reserved.
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright 2015, The TensorFlow Authors.
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
diff --git a/third_party/gpus/cuda/build_defs.bzl.tpl b/third_party/gpus/cuda/build_defs.bzl.tpl
deleted file mode 100644
index ca8bbc1..0000000
--- a/third_party/gpus/cuda/build_defs.bzl.tpl
+++ /dev/null
@@ -1,33 +0,0 @@
-# Macros for building CUDA code.
-def if_cuda(if_true, if_false = []):
-    """Shorthand for select()'ing on whether we're building with CUDA.
-
-    Returns a select statement which evaluates to if_true if we're building
-    with CUDA enabled.  Otherwise, the select statement evaluates to if_false.
-
-    """
-    return select({
-        "@local_config_cuda//cuda:using_nvcc": if_true,
-        "@local_config_cuda//cuda:using_clang": if_true,
-        "//conditions:default": if_false
-    })
-
-
-def cuda_default_copts():
-    """Default options for all CUDA compilations."""
-    return if_cuda(["-x", "cuda", "-DGOOGLE_CUDA=1"] + %{cuda_extra_copts})
-
-
-def cuda_is_configured():
-    """Returns true if CUDA was enabled during the configure process."""
-    return %{cuda_is_configured}
-
-def if_cuda_is_configured(x):
-    """Tests if the CUDA was enabled during the configure process.
-
-    Unlike if_cuda(), this does not require that we are building with
-    --config=cuda. Used to allow non-CUDA code to depend on CUDA libraries.
-    """
-    if cuda_is_configured():
-      return x
-    return []
diff --git a/third_party/gpus/cuda/cuda_config.h.tpl b/third_party/gpus/cuda/cuda_config.h.tpl
deleted file mode 100644
index 811b040..0000000
--- a/third_party/gpus/cuda/cuda_config.h.tpl
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-==============================================================================*/
-
-#ifndef CUDA_CUDA_CONFIG_H_
-#define CUDA_CUDA_CONFIG_H_
-
-#define TF_CUDA_CAPABILITIES %{cuda_compute_capabilities}
-
-#define TF_CUDA_VERSION "%{cuda_version}"
-#define TF_CUDNN_VERSION "%{cudnn_version}"
-
-#define TF_CUDA_TOOLKIT_PATH "%{cuda_toolkit_path}"
-
-#endif  // CUDA_CUDA_CONFIG_H_
diff --git a/third_party/gpus/cuda/remote.BUILD.tpl b/third_party/gpus/cuda/remote.BUILD.tpl
deleted file mode 100644
index f774def..0000000
--- a/third_party/gpus/cuda/remote.BUILD.tpl
+++ /dev/null
@@ -1,105 +0,0 @@
-# Description:
-#   Template for cuda Build file to use a pre-generated config.
-licenses(["restricted"])  # MPL2, portions GPL v3, LGPL v3, BSD-like
-
-package(default_visibility = ["//visibility:public"])
-
-config_setting(
-    name = "using_nvcc",
-    values = {
-        "define": "using_cuda_nvcc=true",
-    },
-)
-
-config_setting(
-    name = "using_clang",
-    values = {
-        "define": "using_cuda_clang=true",
-    },
-)
-
-# Equivalent to using_clang && -c opt.
-config_setting(
-    name = "using_clang_opt",
-    values = {
-        "define": "using_cuda_clang=true",
-        "compilation_mode": "opt",
-    },
-)
-
-config_setting(
-    name = "darwin",
-    values = {"cpu": "darwin"},
-    visibility = ["//visibility:public"],
-)
-
-config_setting(
-    name = "freebsd",
-    values = {"cpu": "freebsd"},
-    visibility = ["//visibility:public"],
-)
-
-alias(
-    name = "cuda_headers",
-    actual = "%{remote_cuda_repo}/cuda:cuda_headers",
-)
-
-alias(
-    name = "cudart_static",
-    actual = "%{remote_cuda_repo}/cuda:cudart_static",
-)
-
-alias(
-    name = "cuda_driver",
-    actual = "%{remote_cuda_repo}/cuda:cuda_driver",
-)
-
-alias(
-    name = "cudart",
-    actual = "%{remote_cuda_repo}/cuda:cudart",
-)
-
-alias(
-    name = "cublas",
-    actual = "%{remote_cuda_repo}/cuda:cublas",
-)
-
-alias(
-    name = "cusolver",
-    actual = "%{remote_cuda_repo}/cuda:cusolver",
-)
-
-alias(
-    name = "cudnn",
-    actual = "%{remote_cuda_repo}/cuda:cudnn",
-)
-
-alias(
-    name = "cufft",
-    actual = "%{remote_cuda_repo}/cuda:cufft",
-)
-
-alias(
-    name = "curand",
-    actual = "%{remote_cuda_repo}/cuda:curand",
-)
-
-alias(
-    name = "cuda",
-    actual = "%{remote_cuda_repo}/cuda:cuda",
-)
-
-alias(
-    name = "cupti_headers",
-    actual = "%{remote_cuda_repo}/cuda:cupti_headers",
-)
-
-alias(
-    name = "cupti_dsos",
-    actual = "%{remote_cuda_repo}/cuda:cupti_dsos",
-)
-
-alias(
-    name = "libdevice_root",
-    actual = "%{remote_cuda_repo}/cuda:libdevice_root",
-)
diff --git a/third_party/gpus/cuda_configure.bzl b/third_party/gpus/cuda_configure.bzl
deleted file mode 100644
index ede7e31..0000000
--- a/third_party/gpus/cuda_configure.bzl
+++ /dev/null
@@ -1,1173 +0,0 @@
-# -*- Python -*-
-"""Repository rule for CUDA autoconfiguration.
-
-`cuda_configure` depends on the following environment variables:
-
-  * `TF_NEED_CUDA`: Whether to enable building with CUDA.
-  * `GCC_HOST_COMPILER_PATH`: The GCC host compiler path
-  * `TF_CUDA_CLANG`: Whether to use clang as a cuda compiler.
-  * `CLANG_CUDA_COMPILER_PATH`: The clang compiler path that will be used for
-    both host and device code compilation if TF_CUDA_CLANG is 1.
-  * `TF_DOWNLOAD_CLANG`: Whether to download a recent release of clang
-    compiler and use it to build tensorflow. When this option is set
-    CLANG_CUDA_COMPILER_PATH is ignored.
-  * `CUDA_TOOLKIT_PATH`: The path to the CUDA toolkit. Default is
-    `/usr/local/cuda`.
-  * `TF_CUDA_VERSION`: The version of the CUDA toolkit. If this is blank, then
-    use the system default.
-  * `TF_CUDNN_VERSION`: The version of the cuDNN library.
-  * `CUDNN_INSTALL_PATH`: The path to the cuDNN library. Default is
-    `/usr/local/cuda`.
-  * `TF_CUDA_COMPUTE_CAPABILITIES`: The CUDA compute capabilities. Default is
-    `3.5,5.2`.
-"""
-
-_GCC_HOST_COMPILER_PATH = "GCC_HOST_COMPILER_PATH"
-_CLANG_CUDA_COMPILER_PATH = "CLANG_CUDA_COMPILER_PATH"
-_CUDA_TOOLKIT_PATH = "CUDA_TOOLKIT_PATH"
-_TF_CUDA_VERSION = "TF_CUDA_VERSION"
-_TF_CUDNN_VERSION = "TF_CUDNN_VERSION"
-_CUDNN_INSTALL_PATH = "CUDNN_INSTALL_PATH"
-_TF_CUDA_COMPUTE_CAPABILITIES = "TF_CUDA_COMPUTE_CAPABILITIES"
-_TF_CUDA_CONFIG_REPO = "TF_CUDA_CONFIG_REPO"
-_TF_DOWNLOAD_CLANG = "TF_DOWNLOAD_CLANG"
-
-_DEFAULT_CUDA_VERSION = ""
-_DEFAULT_CUDNN_VERSION = ""
-_DEFAULT_CUDA_TOOLKIT_PATH = "/usr/local/cuda"
-_DEFAULT_CUDNN_INSTALL_PATH = "/usr/local/cuda"
-_DEFAULT_CUDA_COMPUTE_CAPABILITIES = ["3.5", "5.2"]
-
-# Lookup paths for CUDA / cuDNN libraries, relative to the install directories.
-#
-# Paths will be tried out in the order listed below. The first successful path
-# will be used. For example, when looking for the cudart libraries, the first
-# attempt will be lib64/cudart inside the CUDA toolkit.
-CUDA_LIB_PATHS = [
-  "lib64/",
-  "lib64/stubs/",
-  "lib/x86_64-linux-gnu/",
-  "lib/x64/",
-  "lib/",
-  "",
-]
-
-# Lookup paths for cupti.h, relative to the CUDA toolkit directory.
-#
-# On most systems, the cupti library is not installed in the same directory as
-# the other CUDA libraries but rather in a special extras/CUPTI directory.
-CUPTI_HEADER_PATHS = [
-  "extras/CUPTI/include/",
-  "include/cuda/CUPTI/",
-]
-
-# Lookup paths for the cupti library, relative to the
-#
-# On most systems, the cupti library is not installed in the same directory as
-# the other CUDA libraries but rather in a special extras/CUPTI directory.
-CUPTI_LIB_PATHS = [
-  "extras/CUPTI/lib64/",
-  "lib/x86_64-linux-gnu",
-  "lib64/",
-  "extras/CUPTI/libx64/",
-  "extras/CUPTI/lib/",
-  "lib/",
-]
-
-# Lookup paths for CUDA headers (cuda.h) relative to the CUDA toolkit directory.
-CUDA_INCLUDE_PATHS = [
-  "include/",
-  "include/cuda/"
-]
-
-# Lookup paths for cudnn.h relative to the CUDNN install directory.
-CUDNN_INCLUDE_PATHS = [
-  "",
-  "include/",
-  "include/cuda/",
-]
-
-# Lookup paths for NVVM libdevice relative to the CUDA directory toolkit.
-#
-# libdevice implements mathematical functions for GPU kernels, and is provided
-# in NVVM bitcode (a subset of LLVM bitcode).
-NVVM_LIBDEVICE_PATHS = [
-  "nvvm/libdevice/",
-  "share/cuda/",
-]
-
-load("//third_party/clang_toolchain:download_clang.bzl", "download_clang")
-
-# TODO(dzc): Once these functions have been factored out of Bazel's
-# cc_configure.bzl, load them from @bazel_tools instead.
-# BEGIN cc_configure common functions.
-def find_cc(repository_ctx):
-  """Find the C++ compiler."""
-  # On Windows, we use Bazel's MSVC CROSSTOOL for GPU build
-  # Return a dummy value for GCC detection here to avoid error
-  if _is_windows(repository_ctx):
-    return "/use/--config=win-cuda --cpu=x64_windows_msvc/instead"
-
-  if _use_cuda_clang(repository_ctx):
-    target_cc_name = "clang"
-    cc_path_envvar = _CLANG_CUDA_COMPILER_PATH
-    if _flag_enabled(repository_ctx, _TF_DOWNLOAD_CLANG):
-      return "extra_tools/bin/clang"
-  else:
-    target_cc_name = "gcc"
-    cc_path_envvar = _GCC_HOST_COMPILER_PATH
-  cc_name = target_cc_name
-
-  if cc_path_envvar in repository_ctx.os.environ:
-    cc_name_from_env = repository_ctx.os.environ[cc_path_envvar].strip()
-    if cc_name_from_env:
-      cc_name = cc_name_from_env
-  if cc_name.startswith("/"):
-    # Absolute path, maybe we should make this supported by our which function.
-    return cc_name
-  cc = repository_ctx.which(cc_name)
-  if cc == None:
-    fail(("Cannot find {}, either correct your path or set the {}" +
-          " environment variable").format(target_cc_name, cc_path_envvar))
-  return cc
-
-
-_INC_DIR_MARKER_BEGIN = "#include <...>"
-
-
-# OSX add " (framework directory)" at the end of line, strip it.
-_OSX_FRAMEWORK_SUFFIX = " (framework directory)"
-_OSX_FRAMEWORK_SUFFIX_LEN =  len(_OSX_FRAMEWORK_SUFFIX)
-def _cxx_inc_convert(path):
-  """Convert path returned by cc -E xc++ in a complete path."""
-  path = path.strip()
-  if path.endswith(_OSX_FRAMEWORK_SUFFIX):
-    path = path[:-_OSX_FRAMEWORK_SUFFIX_LEN].strip()
-  return path
-
-
-def _normalize_include_path(repository_ctx, path):
-  """Normalizes include paths before writing them to the crosstool.
-
-  If path points inside the 'crosstool' folder of the repository, a relative
-  path is returned.
-  If path points outside the 'crosstool' folder, an absolute path is returned.
-  """
-  path = str(repository_ctx.path(path))
-  crosstool_folder = str(repository_ctx.path(".").get_child('crosstool'))
-
-  if path.startswith(crosstool_folder):
-    # We drop the path to "$REPO/crosstool" and a trailing path separator.
-    return path[len(crosstool_folder)+1:]
-  return path
-
-
-def _get_cxx_inc_directories_impl(repository_ctx, cc, lang_is_cpp):
-  """Compute the list of default C or C++ include directories."""
-  if lang_is_cpp:
-    lang = "c++"
-  else:
-    lang = "c"
-  result = repository_ctx.execute([cc, "-E", "-x" + lang, "-", "-v"])
-  index1 = result.stderr.find(_INC_DIR_MARKER_BEGIN)
-  if index1 == -1:
-    return []
-  index1 = result.stderr.find("\n", index1)
-  if index1 == -1:
-    return []
-  index2 = result.stderr.rfind("\n ")
-  if index2 == -1 or index2 < index1:
-    return []
-  index2 = result.stderr.find("\n", index2 + 1)
-  if index2 == -1:
-    inc_dirs = result.stderr[index1 + 1:]
-  else:
-    inc_dirs = result.stderr[index1 + 1:index2].strip()
-
-  return [
-      _normalize_include_path(repository_ctx, _cxx_inc_convert(p))
-      for p in inc_dirs.split("\n")
-  ]
-
-
-def get_cxx_inc_directories(repository_ctx, cc):
-  """Compute the list of default C and C++ include directories."""
-  # For some reason `clang -xc` sometimes returns include paths that are
-  # different from the ones from `clang -xc++`. (Symlink and a dir)
-  # So we run the compiler with both `-xc` and `-xc++` and merge resulting lists
-  includes_cpp = _get_cxx_inc_directories_impl(repository_ctx, cc, True)
-  includes_c = _get_cxx_inc_directories_impl(repository_ctx, cc, False)
-
-  includes_cpp_set = depset(includes_cpp)
-  return includes_cpp + [inc for inc in includes_c
-                         if inc not in includes_cpp_set]
-
-
-def auto_configure_fail(msg):
-  """Output failure message when cuda configuration fails."""
-  red = "\033[0;31m"
-  no_color = "\033[0m"
-  fail("\n%sCuda Configuration Error:%s %s\n" % (red, no_color, msg))
-# END cc_configure common functions (see TODO above).
-
-
-def _host_compiler_includes(repository_ctx, cc):
-  """Generates the cxx_builtin_include_directory entries for gcc inc dirs.
-
-  Args:
-    repository_ctx: The repository context.
-    cc: The path to the gcc host compiler.
-
-  Returns:
-    A string containing the cxx_builtin_include_directory for each of the gcc
-    host compiler include directories, which can be added to the CROSSTOOL
-    file.
-  """
-  inc_dirs = get_cxx_inc_directories(repository_ctx, cc)
-  inc_entries = []
-  for inc_dir in inc_dirs:
-    inc_entries.append("  cxx_builtin_include_directory: \"%s\"" % inc_dir)
-  return "\n".join(inc_entries)
-
-def _cuda_include_path(repository_ctx, cuda_config):
-  """Generates the cxx_builtin_include_directory entries for cuda inc dirs.
-
-  Args:
-    repository_ctx: The repository context.
-    cc: The path to the gcc host compiler.
-
-  Returns:
-    A string containing the cxx_builtin_include_directory for each of the gcc
-    host compiler include directories, which can be added to the CROSSTOOL
-    file.
-  """
-  nvcc_path = repository_ctx.path("%s/bin/nvcc%s" %
-                                  (cuda_config.cuda_toolkit_path,
-                                   ".exe" if cuda_config.cpu_value == "Windows" else ""))
-  result = repository_ctx.execute([nvcc_path, '-v',
-                                  '/dev/null', '-o', '/dev/null'])
-  target_dir = ""
-  for one_line in result.stderr.splitlines():
-    if one_line.startswith('#$ _TARGET_DIR_='):
-      target_dir = (cuda_config.cuda_toolkit_path + '/' +
-                    one_line.replace('#$ _TARGET_DIR_=', '') + "/include")
-  inc_entries = []
-  if target_dir != "":
-    inc_entries.append("  cxx_builtin_include_directory: \"%s\"" % target_dir)
-  default_include = cuda_config.cuda_toolkit_path + '/include'
-  inc_entries.append("  cxx_builtin_include_directory: \"%s\"" %
-                     default_include)
-  return "\n".join(inc_entries)
-
-
-def _enable_cuda(repository_ctx):
-  if "TF_NEED_CUDA" in repository_ctx.os.environ:
-    enable_cuda = repository_ctx.os.environ["TF_NEED_CUDA"].strip()
-    return enable_cuda == "1"
-  return False
-
-
-def _cuda_toolkit_path(repository_ctx):
-  """Finds the cuda toolkit directory.
-
-  Args:
-    repository_ctx: The repository context.
-
-  Returns:
-    A speculative real path of the cuda toolkit install directory.
-  """
-  cuda_toolkit_path = _DEFAULT_CUDA_TOOLKIT_PATH
-  if _CUDA_TOOLKIT_PATH in repository_ctx.os.environ:
-    cuda_toolkit_path = repository_ctx.os.environ[_CUDA_TOOLKIT_PATH].strip()
-  if not repository_ctx.path(cuda_toolkit_path).exists:
-    auto_configure_fail("Cannot find cuda toolkit path.")
-  return str(repository_ctx.path(cuda_toolkit_path).realpath)
-
-
-def _cudnn_install_basedir(repository_ctx):
-  """Finds the cudnn install directory."""
-  cudnn_install_path = _DEFAULT_CUDNN_INSTALL_PATH
-  if _CUDNN_INSTALL_PATH in repository_ctx.os.environ:
-    cudnn_install_path = repository_ctx.os.environ[_CUDNN_INSTALL_PATH].strip()
-  if not repository_ctx.path(cudnn_install_path).exists:
-    auto_configure_fail("Cannot find cudnn install path.")
-  return cudnn_install_path
-
-
-def matches_version(environ_version, detected_version):
-  """Checks whether the user-specified version matches the detected version.
-
-  This function performs a weak matching so that if the user specifies only the
-  major or major and minor versions, the versions are still considered matching
-  if the version parts match. To illustrate:
-
-      environ_version  detected_version  result
-      -----------------------------------------
-      5.1.3            5.1.3             True
-      5.1              5.1.3             True
-      5                5.1               True
-      5.1.3            5.1               False
-      5.2.3            5.1.3             False
-
-  Args:
-    environ_version: The version specified by the user via environment
-      variables.
-    detected_version: The version autodetected from the CUDA installation on
-      the system.
-
-  Returns: True if user-specified version matches detected version and False
-    otherwise.
-  """
-  environ_version_parts = environ_version.split(".")
-  detected_version_parts = detected_version.split(".")
-  if len(detected_version_parts) < len(environ_version_parts):
-    return False
-  for i, part in enumerate(detected_version_parts):
-    if i >= len(environ_version_parts):
-      break
-    if part != environ_version_parts[i]:
-      return False
-  return True
-
-
-_NVCC_VERSION_PREFIX = "Cuda compilation tools, release "
-
-
-def _cuda_version(repository_ctx, cuda_toolkit_path, cpu_value):
-  """Detects the version of CUDA installed on the system.
-
-  Args:
-    repository_ctx: The repository context.
-    cuda_toolkit_path: The CUDA install directory.
-
-  Returns:
-    String containing the version of CUDA.
-  """
-  # Run nvcc --version and find the line containing the CUDA version.
-  nvcc_path = repository_ctx.path("%s/bin/nvcc%s" %
-                                  (cuda_toolkit_path,
-                                   ".exe" if cpu_value == "Windows" else ""))
-  if not nvcc_path.exists:
-    auto_configure_fail("Cannot find nvcc at %s" % str(nvcc_path))
-  result = repository_ctx.execute([str(nvcc_path), '--version'])
-  if result.stderr:
-    auto_configure_fail("Error running nvcc --version: %s" % result.stderr)
-  lines = result.stdout.splitlines()
-  version_line = lines[len(lines) - 1]
-  if version_line.find(_NVCC_VERSION_PREFIX) == -1:
-    auto_configure_fail(
-        "Could not parse CUDA version from nvcc --version. Got: %s" %
-        result.stdout)
-
-  # Parse the CUDA version from the line containing the CUDA version.
-  prefix_removed = version_line.replace(_NVCC_VERSION_PREFIX, '')
-  parts = prefix_removed.split(",")
-  if len(parts) != 2 or len(parts[0]) < 2:
-    auto_configure_fail(
-        "Could not parse CUDA version from nvcc --version. Got: %s" %
-        result.stdout)
-  full_version = parts[1].strip()
-  if full_version.startswith('V'):
-    full_version = full_version[1:]
-
-  # Check whether TF_CUDA_VERSION was set by the user and fail if it does not
-  # match the detected version.
-  environ_version = ""
-  if _TF_CUDA_VERSION in repository_ctx.os.environ:
-    environ_version = repository_ctx.os.environ[_TF_CUDA_VERSION].strip()
-  if environ_version and not matches_version(environ_version, full_version):
-    auto_configure_fail(
-        ("CUDA version detected from nvcc (%s) does not match " +
-         "TF_CUDA_VERSION (%s)") % (full_version, environ_version))
-
-  # We only use the version consisting of the major and minor version numbers.
-  version_parts = full_version.split('.')
-  if len(version_parts) < 2:
-    auto_configure_fail("CUDA version detected from nvcc (%s) is incomplete.")
-  if cpu_value == "Windows":
-    version = "64_%s%s" % (version_parts[0], version_parts[1])
-  else:
-    version = "%s.%s" % (version_parts[0], version_parts[1])
-  return version
-
-
-_DEFINE_CUDNN_MAJOR = "#define CUDNN_MAJOR"
-_DEFINE_CUDNN_MINOR = "#define CUDNN_MINOR"
-_DEFINE_CUDNN_PATCHLEVEL = "#define CUDNN_PATCHLEVEL"
-
-
-def find_cuda_define(repository_ctx, header_dir, header_file, define):
-  """Returns the value of a #define in a header file.
-
-  Greps through a header file and returns the value of the specified #define.
-  If the #define is not found, then raise an error.
-
-  Args:
-    repository_ctx: The repository context.
-    header_dir: The directory containing the header file.
-    header_file: The header file name.
-    define: The #define to search for.
-
-  Returns:
-    The value of the #define found in the header.
-  """
-  # Confirm location of the header and grep for the line defining the macro.
-  h_path = repository_ctx.path("%s/%s" % (header_dir, header_file))
-  if not h_path.exists:
-    auto_configure_fail("Cannot find %s at %s" % (header_file, str(h_path)))
-  result = repository_ctx.execute(
-      # Grep one more lines as some #defines are splitted into two lines.
-      ["grep", "--color=never", "-A1", "-E", define, str(h_path)])
-  if result.stderr:
-    auto_configure_fail("Error reading %s: %s" % (str(h_path), result.stderr))
-
-  # Parse the version from the line defining the macro.
-  if result.stdout.find(define) == -1:
-    auto_configure_fail("Cannot find line containing '%s' in %s" %
-                        (define, h_path))
-  # Split results to lines
-  lines = result.stdout.split('\n')
-  num_lines = len(lines)
-  for l in range(num_lines):
-    line = lines[l]
-    if define in line:  # Find the line with define
-      version = line
-      if l != num_lines-1 and line[-1] == '\\':  # Add next line, if multiline
-        version = version[:-1] + lines[l+1]
-      break
-  # Remove any comments
-  version = version.split("//")[0]
-  # Remove define name
-  version = version.replace(define, "").strip()
-  # Remove the code after the version number.
-  version_end = version.find(" ")
-  if version_end != -1:
-    if version_end == 0:
-      auto_configure_fail(
-          "Cannot extract the version from line containing '%s' in %s" %
-          (define, str(h_path)))
-    version = version[:version_end].strip()
-  return version
-
-
-def _cudnn_version(repository_ctx, cudnn_install_basedir, cpu_value):
-  """Detects the version of cuDNN installed on the system.
-
-  Args:
-    repository_ctx: The repository context.
-    cpu_value: The name of the host operating system.
-    cudnn_install_basedir: The cuDNN install directory.
-
-  Returns:
-    A string containing the version of cuDNN.
-  """
-  cudnn_header_dir = _find_cudnn_header_dir(repository_ctx,
-                                            cudnn_install_basedir)
-  major_version = find_cuda_define(
-      repository_ctx, cudnn_header_dir, "cudnn.h", _DEFINE_CUDNN_MAJOR)
-  minor_version = find_cuda_define(
-      repository_ctx, cudnn_header_dir, "cudnn.h", _DEFINE_CUDNN_MINOR)
-  patch_version = find_cuda_define(
-      repository_ctx, cudnn_header_dir, "cudnn.h", _DEFINE_CUDNN_PATCHLEVEL)
-  full_version = "%s.%s.%s" % (major_version, minor_version, patch_version)
-
-  # Check whether TF_CUDNN_VERSION was set by the user and fail if it does not
-  # match the detected version.
-  environ_version = ""
-  if _TF_CUDNN_VERSION in repository_ctx.os.environ:
-    environ_version = repository_ctx.os.environ[_TF_CUDNN_VERSION].strip()
-  if environ_version and not matches_version(environ_version, full_version):
-    cudnn_h_path = repository_ctx.path("%s/include/cudnn.h" %
-                                       cudnn_install_basedir)
-    auto_configure_fail(
-        ("cuDNN version detected from %s (%s) does not match " +
-        "TF_CUDNN_VERSION (%s)") %
-        (str(cudnn_h_path), full_version, environ_version))
-
-  # We only use the major version since we use the libcudnn libraries that are
-  # only versioned with the major version (e.g. libcudnn.so.5).
-  version = major_version
-  if cpu_value == "Windows":
-    version = "64_" + version
-  return version
-
-
-def _compute_capabilities(repository_ctx):
-  """Returns a list of strings representing cuda compute capabilities."""
-  if _TF_CUDA_COMPUTE_CAPABILITIES not in repository_ctx.os.environ:
-    return _DEFAULT_CUDA_COMPUTE_CAPABILITIES
-  capabilities_str = repository_ctx.os.environ[_TF_CUDA_COMPUTE_CAPABILITIES]
-  capabilities = capabilities_str.split(",")
-  for capability in capabilities:
-    # Workaround for Skylark's lack of support for regex. This check should
-    # be equivalent to checking:
-    #     if re.match("[0-9]+.[0-9]+", capability) == None:
-    parts = capability.split(".")
-    if len(parts) != 2 or not parts[0].isdigit() or not parts[1].isdigit():
-      auto_configure_fail("Invalid compute capability: %s" % capability)
-  return capabilities
-
-
-def get_cpu_value(repository_ctx):
-  """Returns the name of the host operating system.
-
-  Args:
-    repository_ctx: The repository context.
-
-  Returns:
-    A string containing the name of the host operating system.
-  """
-  os_name = repository_ctx.os.name.lower()
-  if os_name.startswith("mac os"):
-    return "Darwin"
-  if os_name.find("windows") != -1:
-    return "Windows"
-  result = repository_ctx.execute(["uname", "-s"])
-  return result.stdout.strip()
-
-
-def _is_windows(repository_ctx):
-  """Returns true if the host operating system is windows."""
-  return get_cpu_value(repository_ctx) == "Windows"
-
-def _lib_name(lib, cpu_value, version="", static=False):
-  """Constructs the platform-specific name of a library.
-
-  Args:
-    lib: The name of the library, such as "cudart"
-    cpu_value: The name of the host operating system.
-    version: The version of the library.
-    static: True the library is static or False if it is a shared object.
-
-  Returns:
-    The platform-specific name of the library.
-  """
-  if cpu_value in ("Linux", "FreeBSD"):
-    if static:
-      return "lib%s.a" % lib
-    else:
-      if version:
-        version = ".%s" % version
-      return "lib%s.so%s" % (lib, version)
-  elif cpu_value == "Windows":
-    return "%s.lib" % lib
-  elif cpu_value == "Darwin":
-    if static:
-      return "lib%s.a" % lib
-    else:
-      if version:
-        version = ".%s" % version
-    return "lib%s%s.dylib" % (lib, version)
-  else:
-    auto_configure_fail("Invalid cpu_value: %s" % cpu_value)
-
-
-def _find_cuda_lib(lib, repository_ctx, cpu_value, basedir, version="",
-                   static=False):
-  """Finds the given CUDA or cuDNN library on the system.
-
-  Args:
-    lib: The name of the library, such as "cudart"
-    repository_ctx: The repository context.
-    cpu_value: The name of the host operating system.
-    basedir: The install directory of CUDA or cuDNN.
-    version: The version of the library.
-    static: True if static library, False if shared object.
-
-  Returns:
-    Returns a struct with the following fields:
-      file_name: The basename of the library found on the system.
-      path: The full path to the library.
-  """
-  file_name = _lib_name(lib, cpu_value, version, static)
-  for relative_path in CUDA_LIB_PATHS:
-    path = repository_ctx.path("%s/%s%s" % (basedir, relative_path, file_name))
-    if path.exists:
-      return struct(file_name=file_name, path=str(path.realpath))
-  auto_configure_fail("Cannot find cuda library %s" % file_name)
-
-
-def _find_cupti_header_dir(repository_ctx, cuda_config):
-  """Returns the path to the directory containing cupti.h
-
-  On most systems, the cupti library is not installed in the same directory as
-  the other CUDA libraries but rather in a special extras/CUPTI directory.
-
-  Args:
-    repository_ctx: The repository context.
-    cuda_config: The CUDA config as returned by _get_cuda_config
-
-  Returns:
-    The path of the directory containing the cupti header.
-  """
-  cuda_toolkit_path = cuda_config.cuda_toolkit_path
-  for relative_path in CUPTI_HEADER_PATHS:
-    if repository_ctx.path("%s/%scupti.h" % (cuda_toolkit_path, relative_path)).exists:
-        return ("%s/%s" % (cuda_toolkit_path, relative_path))[:-1]
-  auto_configure_fail("Cannot find cupti.h under %s" % cuda_toolkit_path)
-
-
-def _find_cupti_lib(repository_ctx, cuda_config):
-  """Finds the cupti library on the system.
-
-  On most systems, the cupti library is not installed in the same directory as
-  the other CUDA libraries but rather in a special extras/CUPTI directory.
-
-  Args:
-    repository_ctx: The repository context.
-    cuda_config: The cuda configuration as returned by _get_cuda_config.
-
-  Returns:
-    Returns a struct with the following fields:
-      file_name: The basename of the library found on the system.
-      path: The full path to the library.
-  """
-  file_name = _lib_name("cupti", cuda_config.cpu_value,
-                        cuda_config.cuda_version)
-  cuda_toolkit_path = cuda_config.cuda_toolkit_path
-  for relative_path in CUPTI_LIB_PATHS:
-    path = repository_ctx.path(
-        "%s/%s%s" % (cuda_toolkit_path, relative_path, file_name))
-    if path.exists:
-      return struct(file_name=file_name, path=str(path.realpath))
-
-  auto_configure_fail("Cannot find cupti library %s" % file_name)
-
-def _find_libs(repository_ctx, cuda_config):
-  """Returns the CUDA and cuDNN libraries on the system.
-
-  Args:
-    repository_ctx: The repository context.
-    cuda_config: The CUDA config as returned by _get_cuda_config
-
-  Returns:
-    Map of library names to structs of filename and path.
-  """
-  cpu_value = cuda_config.cpu_value
-  return {
-      "cuda": _find_cuda_lib("cuda", repository_ctx, cpu_value, cuda_config.cuda_toolkit_path),
-      "cudart": _find_cuda_lib(
-          "cudart", repository_ctx, cpu_value, cuda_config.cuda_toolkit_path,
-          cuda_config.cuda_version),
-      "cudart_static": _find_cuda_lib(
-          "cudart_static", repository_ctx, cpu_value,
-          cuda_config.cuda_toolkit_path, cuda_config.cuda_version, static=True),
-      "cublas": _find_cuda_lib(
-          "cublas", repository_ctx, cpu_value, cuda_config.cuda_toolkit_path,
-          cuda_config.cuda_version),
-      "cusolver": _find_cuda_lib(
-          "cusolver", repository_ctx, cpu_value, cuda_config.cuda_toolkit_path,
-          cuda_config.cuda_version),
-      "curand": _find_cuda_lib(
-          "curand", repository_ctx, cpu_value, cuda_config.cuda_toolkit_path,
-          cuda_config.cuda_version),
-      "cufft": _find_cuda_lib(
-          "cufft", repository_ctx, cpu_value, cuda_config.cuda_toolkit_path,
-          cuda_config.cuda_version),
-      "cudnn": _find_cuda_lib(
-          "cudnn", repository_ctx, cpu_value, cuda_config.cudnn_install_basedir,
-          cuda_config.cudnn_version),
-      "cupti": _find_cupti_lib(repository_ctx, cuda_config)
-  }
-
-
-def _find_cuda_include_path(repository_ctx, cuda_config):
-  """Returns the path to the directory containing cuda.h
-
-  Args:
-    repository_ctx: The repository context.
-    cuda_config: The CUDA config as returned by _get_cuda_config
-
-  Returns:
-    The path of the directory containing the CUDA headers.
-  """
-  cuda_toolkit_path = cuda_config.cuda_toolkit_path
-  for relative_path in CUDA_INCLUDE_PATHS:
-    if repository_ctx.path("%s/%scuda.h" % (cuda_toolkit_path, relative_path)).exists:
-        return ("%s/%s" % (cuda_toolkit_path, relative_path))[:-1]
-  auto_configure_fail("Cannot find cuda.h under %s" % cuda_toolkit_path)
-
-
-def _find_cudnn_header_dir(repository_ctx, cudnn_install_basedir):
-  """Returns the path to the directory containing cudnn.h
-
-  Args:
-    repository_ctx: The repository context.
-    cudnn_install_basedir: The cudnn install directory as returned by
-      _cudnn_install_basedir.
-
-  Returns:
-    The path of the directory containing the cudnn header.
-  """
-  for relative_path in CUDA_INCLUDE_PATHS:
-    if repository_ctx.path("%s/%scudnn.h" % (cudnn_install_basedir, relative_path)).exists:
-        return ("%s/%s" % (cudnn_install_basedir, relative_path))[:-1]
-  if repository_ctx.path("/usr/include/cudnn.h").exists:
-    return "/usr/include"
-  auto_configure_fail("Cannot find cudnn.h under %s" % cudnn_install_basedir)
-
-
-def _find_nvvm_libdevice_dir(repository_ctx, cuda_config):
-  """Returns the path to the directory containing libdevice in bitcode format.
-
-  Args:
-    repository_ctx: The repository context.
-    cuda_config: The CUDA config as returned by _get_cuda_config
-
-  Returns:
-    The path of the directory containing the CUDA headers.
-  """
-  cuda_toolkit_path = cuda_config.cuda_toolkit_path
-  for relative_path in NVVM_LIBDEVICE_PATHS:
-    if repository_ctx.path("%s/%slibdevice.10.bc" % (cuda_toolkit_path, relative_path)).exists:
-      return ("%s/%s" % (cuda_toolkit_path, relative_path))[:-1]
-  auto_configure_fail("Cannot find libdevice.10.bc under %s" % cuda_toolkit_path)
-
-
-def _cudart_static_linkopt(cpu_value):
-  """Returns additional platform-specific linkopts for cudart."""
-  return "" if cpu_value == "Darwin" else "\"-lrt\","
-
-def _get_cuda_config(repository_ctx):
-  """Detects and returns information about the CUDA installation on the system.
-
-  Args:
-    repository_ctx: The repository context.
-
-  Returns:
-    A struct containing the following fields:
-      cuda_toolkit_path: The CUDA toolkit installation directory.
-      cudnn_install_basedir: The cuDNN installation directory.
-      cuda_version: The version of CUDA on the system.
-      cudnn_version: The version of cuDNN on the system.
-      compute_capabilities: A list of the system's CUDA compute capabilities.
-      cpu_value: The name of the host operating system.
-  """
-  cpu_value = get_cpu_value(repository_ctx)
-  cuda_toolkit_path = _cuda_toolkit_path(repository_ctx)
-  cuda_version = _cuda_version(repository_ctx, cuda_toolkit_path, cpu_value)
-  cudnn_install_basedir = _cudnn_install_basedir(repository_ctx)
-  cudnn_version = _cudnn_version(repository_ctx, cudnn_install_basedir, cpu_value)
-  return struct(
-      cuda_toolkit_path = cuda_toolkit_path,
-      cudnn_install_basedir = cudnn_install_basedir,
-      cuda_version = cuda_version,
-      cudnn_version = cudnn_version,
-      compute_capabilities = _compute_capabilities(repository_ctx),
-      cpu_value = cpu_value)
-
-
-def _tpl(repository_ctx, tpl, substitutions={}, out=None):
-  if not out:
-    out = tpl.replace(":", "/")
-  repository_ctx.template(
-      out,
-      Label("//third_party/gpus/%s.tpl" % tpl),
-      substitutions)
-
-
-def _file(repository_ctx, label):
-  repository_ctx.template(
-      label.replace(":", "/"),
-      Label("//third_party/gpus/%s.tpl" % label),
-      {})
-
-
-_DUMMY_CROSSTOOL_BZL_FILE = """
-def error_gpu_disabled():
-  fail("ERROR: Building with --config=cuda but TensorFlow is not configured " +
-       "to build with GPU support. Please re-run ./configure and enter 'Y' " +
-       "at the prompt to build with GPU support.")
-
-  native.genrule(
-      name = "error_gen_crosstool",
-      outs = ["CROSSTOOL"],
-      cmd = "echo 'Should not be run.' && exit 1",
-  )
-
-  native.filegroup(
-      name = "crosstool",
-      srcs = [":CROSSTOOL"],
-      output_licenses = ["unencumbered"],
-  )
-"""
-
-
-_DUMMY_CROSSTOOL_BUILD_FILE = """
-load("//crosstool:error_gpu_disabled.bzl", "error_gpu_disabled")
-
-error_gpu_disabled()
-"""
-
-
-def _create_dummy_repository(repository_ctx):
-  cpu_value = get_cpu_value(repository_ctx)
-
-  # Set up BUILD file for cuda/.
-  _tpl(repository_ctx, "cuda:build_defs.bzl",
-       {
-           "%{cuda_is_configured}": "False",
-           "%{cuda_extra_copts}": "[]",
-       })
-  _tpl(repository_ctx, "cuda:BUILD",
-       {
-           "%{cuda_driver_lib}": _lib_name("cuda", cpu_value),
-           "%{cudart_static_lib}": _lib_name("cudart_static", cpu_value,
-                                             static=True),
-           "%{cudart_static_linkopt}": _cudart_static_linkopt(cpu_value),
-           "%{cudart_lib}": _lib_name("cudart", cpu_value),
-           "%{cublas_lib}": _lib_name("cublas", cpu_value),
-           "%{cusolver_lib}": _lib_name("cusolver", cpu_value),
-           "%{cudnn_lib}": _lib_name("cudnn", cpu_value),
-           "%{cufft_lib}": _lib_name("cufft", cpu_value),
-           "%{curand_lib}": _lib_name("curand", cpu_value),
-           "%{cupti_lib}": _lib_name("cupti", cpu_value),
-           "%{cuda_include_genrules}": '',
-           "%{cuda_headers}": '',
-       })
-
-  # Create dummy files for the CUDA toolkit since they are still required by
-  # tensorflow/core/platform/default/build_config:cuda.
-  repository_ctx.file("cuda/cuda/include/cuda.h", "")
-  repository_ctx.file("cuda/cuda/include/cublas.h", "")
-  repository_ctx.file("cuda/cuda/include/cudnn.h", "")
-  repository_ctx.file("cuda/cuda/extras/CUPTI/include/cupti.h", "")
-  repository_ctx.file("cuda/cuda/lib/%s" % _lib_name("cuda", cpu_value))
-  repository_ctx.file("cuda/cuda/lib/%s" % _lib_name("cudart", cpu_value))
-  repository_ctx.file("cuda/cuda/lib/%s" % _lib_name("cudart_static", cpu_value))
-  repository_ctx.file("cuda/cuda/lib/%s" % _lib_name("cublas", cpu_value))
-  repository_ctx.file("cuda/cuda/lib/%s" % _lib_name("cusolver", cpu_value))
-  repository_ctx.file("cuda/cuda/lib/%s" % _lib_name("cudnn", cpu_value))
-  repository_ctx.file("cuda/cuda/lib/%s" % _lib_name("curand", cpu_value))
-  repository_ctx.file("cuda/cuda/lib/%s" % _lib_name("cufft", cpu_value))
-  repository_ctx.file("cuda/cuda/lib/%s" % _lib_name("cupti", cpu_value))
-
-  # Set up cuda_config.h, which is used by
-  # tensorflow/stream_executor/dso_loader.cc.
-  _tpl(repository_ctx, "cuda:cuda_config.h",
-       {
-           "%{cuda_version}": _DEFAULT_CUDA_VERSION,
-           "%{cudnn_version}": _DEFAULT_CUDNN_VERSION,
-           "%{cuda_compute_capabilities}": ",".join([
-               "CudaVersion(\"%s\")" % c
-               for c in _DEFAULT_CUDA_COMPUTE_CAPABILITIES]),
-           "%{cuda_toolkit_path}": _DEFAULT_CUDA_TOOLKIT_PATH,
-       }, "cuda/cuda/cuda_config.h")
-
-  # If cuda_configure is not configured to build with GPU support, and the user
-  # attempts to build with --config=cuda, add a dummy build rule to intercept
-  # this and fail with an actionable error message.
-  repository_ctx.file("crosstool/error_gpu_disabled.bzl",
-                      _DUMMY_CROSSTOOL_BZL_FILE)
-  repository_ctx.file("crosstool/BUILD", _DUMMY_CROSSTOOL_BUILD_FILE)
-
-
-def _execute(repository_ctx, cmdline, error_msg=None, error_details=None,
-             empty_stdout_fine=False):
-  """Executes an arbitrary shell command.
-
-  Args:
-    repository_ctx: the repository_ctx object
-    cmdline: list of strings, the command to execute
-    error_msg: string, a summary of the error if the command fails
-    error_details: string, details about the error or steps to fix it
-    empty_stdout_fine: bool, if True, an empty stdout result is fine, otherwise
-      it's an error
-  Return:
-    the result of repository_ctx.execute(cmdline)
-  """
-  result = repository_ctx.execute(cmdline)
-  if result.stderr or not (empty_stdout_fine or result.stdout):
-    auto_configure_fail(
-        "\n".join([
-            error_msg.strip() if error_msg else "Repository command failed",
-            result.stderr.strip(),
-            error_details if error_details else ""]))
-  return result
-
-
-def _norm_path(path):
-  """Returns a path with '/' and remove the trailing slash."""
-  path = path.replace("\\", "/")
-  if path[-1] == "/":
-    path = path[:-1]
-  return path
-
-
-def symlink_genrule_for_dir(repository_ctx, src_dir, dest_dir, genrule_name,
-                            src_files = [], dest_files = []):
-  """Returns a genrule to symlink(or copy if on Windows) a set of files.
-
-  If src_dir is passed, files will be read from the given directory; otherwise
-  we assume files are in src_files and dest_files
-  """
-  if src_dir != None:
-    src_dir = _norm_path(src_dir)
-    dest_dir = _norm_path(dest_dir)
-    files = '\n'.join(sorted(_read_dir(repository_ctx, src_dir).splitlines()))
-    # Create a list with the src_dir stripped to use for outputs.
-    dest_files = files.replace(src_dir, '').splitlines()
-    src_files = files.splitlines()
-  command = []
-  if not _is_windows(repository_ctx):
-    # We clear folders that might have been generated previously to avoid
-    # undesired inclusions
-    command.append('if [ -d "$(@D)/extras" ]; then rm $(@D)/extras -drf; fi')
-    command.append('if [ -d "$(@D)/include" ]; then rm $(@D)/include -drf; fi')
-    command.append('if [ -d "$(@D)/lib" ]; then rm $(@D)/lib -drf; fi')
-    command.append('if [ -d "$(@D)/nvvm" ]; then rm $(@D)/nvvm -drf; fi')
-  outs = []
-  for i in range(len(dest_files)):
-    if dest_files[i] != "":
-      # If we have only one file to link we do not want to use the dest_dir, as
-      # $(@D) will include the full path to the file.
-      dest = '$(@D)/' + dest_dir + dest_files[i] if len(dest_files) != 1 else '$(@D)/' + dest_files[i]
-      # On Windows, symlink is not supported, so we just copy all the files.
-      cmd = 'cp -f' if _is_windows(repository_ctx) else 'ln -s'
-      command.append(cmd + ' "%s" "%s"' % (src_files[i] , dest))
-      outs.append('        "' + dest_dir + dest_files[i] + '",')
-  genrule = _genrule(src_dir, genrule_name, " && ".join(command),
-                     "\n".join(outs))
-  return genrule
-
-
-def _genrule(src_dir, genrule_name, command, outs):
-  """Returns a string with a genrule.
-
-  Genrule executes the given command and produces the given outputs.
-  """
-  return (
-      'genrule(\n' +
-      '    name = "' +
-      genrule_name + '",\n' +
-      '    outs = [\n' +
-      outs +
-      '\n    ],\n' +
-      '    cmd = """\n' +
-      command +
-      '\n   """,\n' +
-      ')\n'
-  )
-
-
-def _read_dir(repository_ctx, src_dir):
-  """Returns a string with all files in a directory.
-
-  Finds all files inside a directory, traversing subfolders and following
-  symlinks. The returned string contains the full path of all files
-  separated by line breaks.
-  """
-  if _is_windows(repository_ctx):
-    src_dir = src_dir.replace("/", "\\")
-    find_result = _execute(
-        repository_ctx, ["cmd.exe", "/c", "dir", src_dir, "/b", "/s", "/a-d"],
-        empty_stdout_fine=True)
-    # src_files will be used in genrule.outs where the paths must
-    # use forward slashes.
-    result = find_result.stdout.replace("\\", "/")
-  else:
-    find_result = _execute(
-        repository_ctx, ["find", src_dir, "-follow", "-type", "f"],
-        empty_stdout_fine=True)
-    result = find_result.stdout
-  return result
-
-def _flag_enabled(repository_ctx, flag_name):
-  if flag_name in repository_ctx.os.environ:
-    value = repository_ctx.os.environ[flag_name].strip()
-    return value == "1"
-  return False
-
-def _use_cuda_clang(repository_ctx):
-  return _flag_enabled(repository_ctx, "TF_CUDA_CLANG")
-
-def _compute_cuda_extra_copts(repository_ctx, compute_capabilities):
-  if _use_cuda_clang(repository_ctx):
-    capability_flags = ["--cuda-gpu-arch=sm_" +
-        cap.replace(".", "") for cap in compute_capabilities]
-  else:
-    # Capabilities are handled in the "crosstool_wrapper_driver_is_not_gcc" for nvcc
-    capability_flags = []
-  return str(capability_flags)
-
-def _create_local_cuda_repository(repository_ctx):
-  """Creates the repository containing files set up to build with CUDA."""
-  cuda_config = _get_cuda_config(repository_ctx)
-
-  cuda_include_path = _find_cuda_include_path(repository_ctx, cuda_config)
-  cudnn_header_dir = _find_cudnn_header_dir(repository_ctx,
-                                            cuda_config.cudnn_install_basedir)
-  cupti_header_dir = _find_cupti_header_dir(repository_ctx, cuda_config)
-  nvvm_libdevice_dir = _find_nvvm_libdevice_dir(repository_ctx, cuda_config)
-
-  # Set up symbolic links for the cuda toolkit by creating genrules to do
-  # symlinking. We create one genrule for each directory we want to track under
-  # cuda_toolkit_path
-  cuda_toolkit_path = cuda_config.cuda_toolkit_path
-  genrules = [symlink_genrule_for_dir(repository_ctx,
-      cuda_include_path, "cuda/include", "cuda-include")]
-  genrules.append(symlink_genrule_for_dir(repository_ctx,
-      nvvm_libdevice_dir, "cuda/nvvm/libdevice", "cuda-nvvm"))
-  genrules.append(symlink_genrule_for_dir(repository_ctx,
-      cupti_header_dir, "cuda/extras/CUPTI/include", "cuda-extras"))
-
-  cuda_libs = _find_libs(repository_ctx, cuda_config)
-  cuda_lib_src = []
-  cuda_lib_dest = []
-  for lib in cuda_libs.values():
-    cuda_lib_src.append(lib.path)
-    cuda_lib_dest.append("cuda/lib/" + lib.file_name)
-  genrules.append(symlink_genrule_for_dir(repository_ctx, None, "", "cuda-lib",
-                                          cuda_lib_src, cuda_lib_dest))
-
-  # Set up the symbolic links for cudnn if cndnn was not installed to
-  # CUDA_TOOLKIT_PATH.
-  included_files = _read_dir(repository_ctx, cuda_include_path).replace(
-      cuda_include_path, '').splitlines()
-  if '/cudnn.h' not in included_files:
-    genrules.append(symlink_genrule_for_dir(repository_ctx, None,
-        "cuda/include/", "cudnn-include", [cudnn_header_dir + "/cudnn.h"],
-        ["cudnn.h"]))
-  else:
-    genrules.append(
-            'filegroup(\n' +
-            '    name = "cudnn-include",\n' +
-            '    srcs = [],\n' +
-            ')\n'
-        )
-
-  # Set up BUILD file for cuda/
-  _tpl(repository_ctx, "cuda:build_defs.bzl",
-       {
-           "%{cuda_is_configured}": "True",
-           "%{cuda_extra_copts}": _compute_cuda_extra_copts(
-               repository_ctx, cuda_config.compute_capabilities),
-       })
-  _tpl(repository_ctx, "cuda:BUILD",
-       {
-           "%{cuda_driver_lib}": cuda_libs["cuda"].file_name,
-           "%{cudart_static_lib}": cuda_libs["cudart_static"].file_name,
-           "%{cudart_static_linkopt}": _cudart_static_linkopt(
-               cuda_config.cpu_value),
-           "%{cudart_lib}": cuda_libs["cudart"].file_name,
-           "%{cublas_lib}": cuda_libs["cublas"].file_name,
-           "%{cusolver_lib}": cuda_libs["cusolver"].file_name,
-           "%{cudnn_lib}": cuda_libs["cudnn"].file_name,
-           "%{cufft_lib}": cuda_libs["cufft"].file_name,
-           "%{curand_lib}": cuda_libs["curand"].file_name,
-           "%{cupti_lib}": cuda_libs["cupti"].file_name,
-           "%{cuda_include_genrules}": "\n".join(genrules),
-           "%{cuda_headers}": ('":cuda-include",\n' +
-                               '        ":cudnn-include",')
-       })
-
-  is_cuda_clang = _use_cuda_clang(repository_ctx)
-
-  should_download_clang = is_cuda_clang and _flag_enabled(
-      repository_ctx, _TF_DOWNLOAD_CLANG)
-  if should_download_clang:
-    download_clang(repository_ctx, "crosstool/extra_tools")
-
-  # Set up crosstool/
-  cc = find_cc(repository_ctx)
-  cc_fullpath = cc if not should_download_clang else "crosstool/" + cc
-
-  host_compiler_includes = _host_compiler_includes(repository_ctx, cc_fullpath)
-  cuda_defines = {
-           "%{cuda_include_path}": _cuda_include_path(repository_ctx,
-                                                      cuda_config),
-           "%{host_compiler_includes}": host_compiler_includes,
-       }
-  if is_cuda_clang:
-    cuda_defines["%{clang_path}"] = cc
-    _tpl(repository_ctx, "crosstool:BUILD", {"%{linker_files}": ":empty"})
-    _tpl(repository_ctx, "crosstool:CROSSTOOL_clang", cuda_defines, out="crosstool/CROSSTOOL")
-    repository_ctx.file("crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc", "")
-  else:
-    nvcc_path = str(repository_ctx.path("%s/bin/nvcc%s" %
-        (cuda_config.cuda_toolkit_path,
-        ".exe" if cuda_config.cpu_value == "Windows" else "")))
-    _tpl(repository_ctx, "crosstool:BUILD",
-         {"%{linker_files}": ":crosstool_wrapper_driver_is_not_gcc"})
-    _tpl(repository_ctx, "crosstool:CROSSTOOL_nvcc", cuda_defines, out="crosstool/CROSSTOOL")
-    _tpl(repository_ctx,
-         "crosstool:clang/bin/crosstool_wrapper_driver_is_not_gcc",
-         {
-             "%{cpu_compiler}": str(cc),
-             "%{cuda_version}": cuda_config.cuda_version,
-             "%{nvcc_path}": nvcc_path,
-             "%{gcc_host_compiler_path}": str(cc),
-             "%{cuda_compute_capabilities}": ", ".join(
-                 ["\"%s\"" % c for c in cuda_config.compute_capabilities]),
-         })
-
-  # Set up cuda_config.h, which is used by
-  # tensorflow/stream_executor/dso_loader.cc.
-  _tpl(repository_ctx, "cuda:cuda_config.h",
-       {
-           "%{cuda_version}": cuda_config.cuda_version,
-           "%{cudnn_version}": cuda_config.cudnn_version,
-           "%{cuda_compute_capabilities}": ",".join(
-               ["CudaVersion(\"%s\")" % c
-                for c in cuda_config.compute_capabilities]),
-               "%{cuda_toolkit_path}": cuda_config.cuda_toolkit_path,
-       }, "cuda/cuda/cuda_config.h")
-
-def _create_remote_cuda_repository(repository_ctx, remote_config_repo):
-  """Creates pointers to a remotely configured repo set up to build with CUDA."""
-  _tpl(repository_ctx, "cuda:build_defs.bzl",
-       {
-           "%{cuda_is_configured}": "True",
-           "%{cuda_extra_copts}": _compute_cuda_extra_copts(
-               repository_ctx, _compute_capabilities(repository_ctx)),
-
-       })
-  _tpl(repository_ctx, "cuda:remote.BUILD",
-       {
-           "%{remote_cuda_repo}": remote_config_repo,
-       }, "cuda/BUILD")
-  _tpl(repository_ctx, "crosstool:remote.BUILD", {
-           "%{remote_cuda_repo}": remote_config_repo,
-       }, "crosstool/BUILD")
-
-def _cuda_autoconf_impl(repository_ctx):
-  """Implementation of the cuda_autoconf repository rule."""
-  if not _enable_cuda(repository_ctx):
-    _create_dummy_repository(repository_ctx)
-  else:
-    if _TF_CUDA_CONFIG_REPO in repository_ctx.os.environ:
-      _create_remote_cuda_repository(repository_ctx,
-          repository_ctx.os.environ[_TF_CUDA_CONFIG_REPO])
-    else:
-      _create_local_cuda_repository(repository_ctx)
-
-
-cuda_configure = repository_rule(
-    implementation = _cuda_autoconf_impl,
-    environ = [
-        _GCC_HOST_COMPILER_PATH,
-        _CLANG_CUDA_COMPILER_PATH,
-        "TF_NEED_CUDA",
-        "TF_CUDA_CLANG",
-        _TF_DOWNLOAD_CLANG,
-        _CUDA_TOOLKIT_PATH,
-        _CUDNN_INSTALL_PATH,
-        _TF_CUDA_VERSION,
-        _TF_CUDNN_VERSION,
-        _TF_CUDA_COMPUTE_CAPABILITIES,
-        _TF_CUDA_CONFIG_REPO,
-        "NVVMIR_LIBRARY_DIR",
-    ],
-)
-
-"""Detects and configures the local CUDA toolchain.
-
-Add the following to your WORKSPACE FILE:
-
-```python
-cuda_configure(name = "local_config_cuda")
-```
-
-Args:
-  name: A unique name for this workspace rule.
-"""
diff --git a/third_party/grpc/BUILD b/third_party/grpc/BUILD
deleted file mode 100644
index e69de29..0000000
--- a/third_party/grpc/BUILD
+++ /dev/null
diff --git a/third_party/hadoop/BUILD b/third_party/hadoop/BUILD
deleted file mode 100644
index c3c5e42..0000000
--- a/third_party/hadoop/BUILD
+++ /dev/null
@@ -1,10 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"])  # Apache 2.0
-
-exports_files(["LICENSE.txt"])
-
-cc_library(
-    name = "hdfs",
-    hdrs = ["hdfs.h"],
-)
diff --git a/third_party/hadoop/LICENSE.txt b/third_party/hadoop/LICENSE.txt
deleted file mode 100644
index 6ccfd09..0000000
--- a/third_party/hadoop/LICENSE.txt
+++ /dev/null
@@ -1,284 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-APACHE HADOOP SUBCOMPONENTS:
-
-The Apache Hadoop project contains subcomponents with separate copyright
-notices and license terms. Your use of the source code for the these
-subcomponents is subject to the terms and conditions of the following
-licenses. 
-
-For the org.apache.hadoop.util.bloom.* classes:
-
-/**
- *
- * Copyright (c) 2005, European Commission project OneLab under contract
- * 034819 (http://www.one-lab.org)
- * All rights reserved.
- * Redistribution and use in source and binary forms, with or 
- * without modification, are permitted provided that the following 
- * conditions are met:
- *  - Redistributions of source code must retain the above copyright 
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright 
- *    notice, this list of conditions and the following disclaimer in 
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of the University Catholique de Louvain - UCL
- *    nor the names of its contributors may be used to endorse or 
- *    promote products derived from this software without specific prior 
- *    written permission.
- *    
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-For portions of the native implementation of slicing-by-8 CRC calculation
-in src/main/native/src/org/apache/hadoop/util:
-
-/**
- *   Copyright 2008,2009,2010 Massachusetts Institute of Technology.
- *   All rights reserved. Use of this source code is governed by a
- *   BSD-style license that can be found in the LICENSE file.
- */
-
- For src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.c:
-
-/*
-   LZ4 - Fast LZ compression algorithm
-   Copyright (C) 2011, Yann Collet.
-   BSD License
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are
-   met:
-  
-       * Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-       * Redistributions in binary form must reproduce the above
-   copyright notice, this list of conditions and the following disclaimer
-   in the documentation and/or other materials provided with the
-   distribution.
-  
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
diff --git a/third_party/hadoop/hdfs.h b/third_party/hadoop/hdfs.h
deleted file mode 100644
index a664f3b..0000000
--- a/third_party/hadoop/hdfs.h
+++ /dev/null
@@ -1,911 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef LIBHDFS_HDFS_H
-#define LIBHDFS_HDFS_H
-
-#include <errno.h>  /* for EINTERNAL, etc. */
-#include <fcntl.h>  /* for O_RDONLY, O_WRONLY */
-#include <stdint.h> /* for uint64_t, etc. */
-#include <time.h>   /* for time_t */
-
-/*
- * Support export of DLL symbols during libhdfs build, and import of DLL symbols
- * during client application build.  A client application may optionally define
- * symbol LIBHDFS_DLL_IMPORT in its build.  This is not strictly required, but
- * the compiler can produce more efficient code with it.
- */
-#ifdef WIN32
-#ifdef LIBHDFS_DLL_EXPORT
-#define LIBHDFS_EXTERNAL __declspec(dllexport)
-#elif LIBHDFS_DLL_IMPORT
-#define LIBHDFS_EXTERNAL __declspec(dllimport)
-#else
-#define LIBHDFS_EXTERNAL
-#endif
-#else
-#ifdef LIBHDFS_DLL_EXPORT
-#define LIBHDFS_EXTERNAL __attribute__((visibility("default")))
-#elif LIBHDFS_DLL_IMPORT
-#define LIBHDFS_EXTERNAL __attribute__((visibility("default")))
-#else
-#define LIBHDFS_EXTERNAL
-#endif
-#endif
-
-#ifndef O_RDONLY
-#define O_RDONLY 1
-#endif
-
-#ifndef O_WRONLY
-#define O_WRONLY 2
-#endif
-
-#ifndef EINTERNAL
-#define EINTERNAL 255
-#endif
-
-#define ELASTIC_BYTE_BUFFER_POOL_CLASS \
-  "org/apache/hadoop/io/ElasticByteBufferPool"
-
-/** All APIs set errno to meaningful values */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-/**
- * Some utility decls used in libhdfs.
- */
-struct hdfsBuilder;
-typedef int32_t tSize;    /// size of data for read/write io ops
-typedef time_t tTime;     /// time type in seconds
-typedef int64_t tOffset;  /// offset within the file
-typedef uint16_t tPort;   /// port
-typedef enum tObjectKind {
-  kObjectKindFile = 'F',
-  kObjectKindDirectory = 'D',
-} tObjectKind;
-
-/**
- * The C reflection of org.apache.org.hadoop.FileSystem .
- */
-struct hdfs_internal;
-typedef struct hdfs_internal *hdfsFS;
-
-struct hdfsFile_internal;
-typedef struct hdfsFile_internal *hdfsFile;
-
-struct hadoopRzOptions;
-
-struct hadoopRzBuffer;
-
-/**
- * Determine if a file is open for read.
- *
- * @param file     The HDFS file
- * @return         1 if the file is open for read; 0 otherwise
- */
-LIBHDFS_EXTERNAL
-int hdfsFileIsOpenForRead(hdfsFile file);
-
-/**
- * Determine if a file is open for write.
- *
- * @param file     The HDFS file
- * @return         1 if the file is open for write; 0 otherwise
- */
-LIBHDFS_EXTERNAL
-int hdfsFileIsOpenForWrite(hdfsFile file);
-
-struct hdfsReadStatistics {
-  uint64_t totalBytesRead;
-  uint64_t totalLocalBytesRead;
-  uint64_t totalShortCircuitBytesRead;
-  uint64_t totalZeroCopyBytesRead;
-};
-
-/**
- * Get read statistics about a file.  This is only applicable to files
- * opened for reading.
- *
- * @param file     The HDFS file
- * @param stats    (out parameter) on a successful return, the read
- *                 statistics.  Unchanged otherwise.  You must free the
- *                 returned statistics with hdfsFileFreeReadStatistics.
- * @return         0 if the statistics were successfully returned,
- *                 -1 otherwise.  On a failure, please check errno against
- *                 ENOTSUP.  webhdfs, LocalFilesystem, and so forth may
- *                 not support read statistics.
- */
-LIBHDFS_EXTERNAL
-int hdfsFileGetReadStatistics(hdfsFile file, struct hdfsReadStatistics **stats);
-
-/**
- * @param stats    HDFS read statistics for a file.
- *
- * @return the number of remote bytes read.
- */
-LIBHDFS_EXTERNAL
-int64_t hdfsReadStatisticsGetRemoteBytesRead(
-    const struct hdfsReadStatistics *stats);
-
-/**
- * Clear the read statistics for a file.
- *
- * @param file      The file to clear the read statistics of.
- *
- * @return          0 on success; the error code otherwise.
- *                  EINVAL: the file is not open for reading.
- *                  ENOTSUP: the file does not support clearing the read
- *                  statistics.
- *                  Errno will also be set to this code on failure.
- */
-LIBHDFS_EXTERNAL
-int hdfsFileClearReadStatistics(hdfsFile file);
-
-/**
- * Free some HDFS read statistics.
- *
- * @param stats    The HDFS read statistics to free.
- */
-LIBHDFS_EXTERNAL
-void hdfsFileFreeReadStatistics(struct hdfsReadStatistics *stats);
-
-/**
- * hdfsConnectAsUser - Connect to a hdfs file system as a specific user
- * Connect to the hdfs.
- * @param nn   The NameNode.  See hdfsBuilderSetNameNode for details.
- * @param port The port on which the server is listening.
- * @param user the user name (this is hadoop domain user). Or NULL is equivalent
- * to hhdfsConnect(host, port)
- * @return Returns a handle to the filesystem or NULL on error.
- * @deprecated Use hdfsBuilderConnect instead.
- */
-LIBHDFS_EXTERNAL
-hdfsFS hdfsConnectAsUser(const char *nn, tPort port, const char *user);
-
-/**
- * hdfsConnect - Connect to a hdfs file system.
- * Connect to the hdfs.
- * @param nn   The NameNode.  See hdfsBuilderSetNameNode for details.
- * @param port The port on which the server is listening.
- * @return Returns a handle to the filesystem or NULL on error.
- * @deprecated Use hdfsBuilderConnect instead.
- */
-LIBHDFS_EXTERNAL
-hdfsFS hdfsConnect(const char *nn, tPort port);
-
-/**
- * hdfsConnect - Connect to an hdfs file system.
- *
- * Forces a new instance to be created
- *
- * @param nn     The NameNode.  See hdfsBuilderSetNameNode for details.
- * @param port   The port on which the server is listening.
- * @param user   The user name to use when connecting
- * @return       Returns a handle to the filesystem or NULL on error.
- * @deprecated   Use hdfsBuilderConnect instead.
- */
-LIBHDFS_EXTERNAL
-hdfsFS hdfsConnectAsUserNewInstance(const char *nn, tPort port,
-                                    const char *user);
-
-/**
- * hdfsConnect - Connect to an hdfs file system.
- *
- * Forces a new instance to be created
- *
- * @param nn     The NameNode.  See hdfsBuilderSetNameNode for details.
- * @param port   The port on which the server is listening.
- * @return       Returns a handle to the filesystem or NULL on error.
- * @deprecated   Use hdfsBuilderConnect instead.
- */
-LIBHDFS_EXTERNAL
-hdfsFS hdfsConnectNewInstance(const char *nn, tPort port);
-
-/**
- * Connect to HDFS using the parameters defined by the builder.
- *
- * The HDFS builder will be freed, whether or not the connection was
- * successful.
- *
- * Every successful call to hdfsBuilderConnect should be matched with a call
- * to hdfsDisconnect, when the hdfsFS is no longer needed.
- *
- * @param bld    The HDFS builder
- * @return       Returns a handle to the filesystem, or NULL on error.
- */
-LIBHDFS_EXTERNAL
-hdfsFS hdfsBuilderConnect(struct hdfsBuilder *bld);
-
-/**
- * Create an HDFS builder.
- *
- * @return The HDFS builder, or NULL on error.
- */
-LIBHDFS_EXTERNAL
-struct hdfsBuilder *hdfsNewBuilder(void);
-
-/**
- * Force the builder to always create a new instance of the FileSystem,
- * rather than possibly finding one in the cache.
- *
- * @param bld The HDFS builder
- */
-LIBHDFS_EXTERNAL
-void hdfsBuilderSetForceNewInstance(struct hdfsBuilder *bld);
-
-/**
- * Set the HDFS NameNode to connect to.
- *
- * @param bld  The HDFS builder
- * @param nn   The NameNode to use.
- *
- *             If the string given is 'default', the default NameNode
- *             configuration will be used (from the XML configuration files)
- *
- *             If NULL is given, a LocalFileSystem will be created.
- *
- *             If the string starts with a protocol type such as file:// or
- *             hdfs://, this protocol type will be used.  If not, the
- *             hdfs:// protocol type will be used.
- *
- *             You may specify a NameNode port in the usual way by
- *             passing a string of the format hdfs://<hostname>:<port>.
- *             Alternately, you may set the port with
- *             hdfsBuilderSetNameNodePort.  However, you must not pass the
- *             port in two different ways.
- */
-LIBHDFS_EXTERNAL
-void hdfsBuilderSetNameNode(struct hdfsBuilder *bld, const char *nn);
-
-/**
- * Set the port of the HDFS NameNode to connect to.
- *
- * @param bld The HDFS builder
- * @param port The port.
- */
-LIBHDFS_EXTERNAL
-void hdfsBuilderSetNameNodePort(struct hdfsBuilder *bld, tPort port);
-
-/**
- * Set the username to use when connecting to the HDFS cluster.
- *
- * @param bld The HDFS builder
- * @param userName The user name.  The string will be shallow-copied.
- */
-LIBHDFS_EXTERNAL
-void hdfsBuilderSetUserName(struct hdfsBuilder *bld, const char *userName);
-
-/**
- * Set the path to the Kerberos ticket cache to use when connecting to
- * the HDFS cluster.
- *
- * @param bld The HDFS builder
- * @param kerbTicketCachePath The Kerberos ticket cache path.  The string
- *                            will be shallow-copied.
- */
-LIBHDFS_EXTERNAL
-void hdfsBuilderSetKerbTicketCachePath(struct hdfsBuilder *bld,
-                                       const char *kerbTicketCachePath);
-
-/**
- * Free an HDFS builder.
- *
- * It is normally not necessary to call this function since
- * hdfsBuilderConnect frees the builder.
- *
- * @param bld The HDFS builder
- */
-LIBHDFS_EXTERNAL
-void hdfsFreeBuilder(struct hdfsBuilder *bld);
-
-/**
- * Set a configuration string for an HdfsBuilder.
- *
- * @param key      The key to set.
- * @param val      The value, or NULL to set no value.
- *                 This will be shallow-copied.  You are responsible for
- *                 ensuring that it remains valid until the builder is
- *                 freed.
- *
- * @return         0 on success; nonzero error code otherwise.
- */
-LIBHDFS_EXTERNAL
-int hdfsBuilderConfSetStr(struct hdfsBuilder *bld, const char *key,
-                          const char *val);
-
-/**
- * Get a configuration string.
- *
- * @param key      The key to find
- * @param val      (out param) The value.  This will be set to NULL if the
- *                 key isn't found.  You must free this string with
- *                 hdfsConfStrFree.
- *
- * @return         0 on success; nonzero error code otherwise.
- *                 Failure to find the key is not an error.
- */
-LIBHDFS_EXTERNAL
-int hdfsConfGetStr(const char *key, char **val);
-
-/**
- * Get a configuration integer.
- *
- * @param key      The key to find
- * @param val      (out param) The value.  This will NOT be changed if the
- *                 key isn't found.
- *
- * @return         0 on success; nonzero error code otherwise.
- *                 Failure to find the key is not an error.
- */
-LIBHDFS_EXTERNAL
-int hdfsConfGetInt(const char *key, int32_t *val);
-
-/**
- * Free a configuration string found with hdfsConfGetStr.
- *
- * @param val      A configuration string obtained from hdfsConfGetStr
- */
-LIBHDFS_EXTERNAL
-void hdfsConfStrFree(char *val);
-
-/**
- * hdfsDisconnect - Disconnect from the hdfs file system.
- * Disconnect from hdfs.
- * @param fs The configured filesystem handle.
- * @return Returns 0 on success, -1 on error.
- *         Even if there is an error, the resources associated with the
- *         hdfsFS will be freed.
- */
-LIBHDFS_EXTERNAL
-int hdfsDisconnect(hdfsFS fs);
-
-/**
- * hdfsOpenFile - Open a hdfs file in given mode.
- * @param fs The configured filesystem handle.
- * @param path The full path to the file.
- * @param flags - an | of bits/fcntl.h file flags - supported flags are
- * O_RDONLY, O_WRONLY (meaning create or overwrite i.e., implies O_TRUNCAT),
- * O_WRONLY|O_APPEND. Other flags are generally ignored other than (O_RDWR ||
- * (O_EXCL & O_CREAT)) which return NULL and set errno equal ENOTSUP.
- * @param bufferSize Size of buffer for read/write - pass 0 if you want
- * to use the default configured values.
- * @param replication Block replication - pass 0 if you want to use
- * the default configured values.
- * @param blocksize Size of block - pass 0 if you want to use the
- * default configured values.
- * @return Returns the handle to the open file or NULL on error.
- */
-LIBHDFS_EXTERNAL
-hdfsFile hdfsOpenFile(hdfsFS fs, const char *path, int flags, int bufferSize,
-                      short replication, tSize blocksize);
-
-/**
- * hdfsTruncateFile - Truncate a hdfs file to given length.
- * @param fs The configured filesystem handle.
- * @param path The full path to the file.
- * @param newlength The size the file is to be truncated to
- * @return 1 if the file has been truncated to the desired newlength
- *         and is immediately available to be reused for write operations
- *         such as append.
- *         0 if a background process of adjusting the length of the last
- *         block has been started, and clients should wait for it to
- *         complete before proceeding with further file updates.
- *         -1 on error.
- */
-int hdfsTruncateFile(hdfsFS fs, const char *path, tOffset newlength);
-
-/**
- * hdfsUnbufferFile - Reduce the buffering done on a file.
- *
- * @param file  The file to unbuffer.
- * @return      0 on success
- *              ENOTSUP if the file does not support unbuffering
- *              Errno will also be set to this value.
- */
-LIBHDFS_EXTERNAL
-int hdfsUnbufferFile(hdfsFile file);
-
-/**
- * hdfsCloseFile - Close an open file.
- * @param fs The configured filesystem handle.
- * @param file The file handle.
- * @return Returns 0 on success, -1 on error.
- *         On error, errno will be set appropriately.
- *         If the hdfs file was valid, the memory associated with it will
- *         be freed at the end of this call, even if there was an I/O
- *         error.
- */
-LIBHDFS_EXTERNAL
-int hdfsCloseFile(hdfsFS fs, hdfsFile file);
-
-/**
- * hdfsExists - Checks if a given path exsits on the filesystem
- * @param fs The configured filesystem handle.
- * @param path The path to look for
- * @return Returns 0 on success, -1 on error.
- */
-LIBHDFS_EXTERNAL
-int hdfsExists(hdfsFS fs, const char *path);
-
-/**
- * hdfsSeek - Seek to given offset in file.
- * This works only for files opened in read-only mode.
- * @param fs The configured filesystem handle.
- * @param file The file handle.
- * @param desiredPos Offset into the file to seek into.
- * @return Returns 0 on success, -1 on error.
- */
-LIBHDFS_EXTERNAL
-int hdfsSeek(hdfsFS fs, hdfsFile file, tOffset desiredPos);
-
-/**
- * hdfsTell - Get the current offset in the file, in bytes.
- * @param fs The configured filesystem handle.
- * @param file The file handle.
- * @return Current offset, -1 on error.
- */
-LIBHDFS_EXTERNAL
-tOffset hdfsTell(hdfsFS fs, hdfsFile file);
-
-/**
- * hdfsRead - Read data from an open file.
- * @param fs The configured filesystem handle.
- * @param file The file handle.
- * @param buffer The buffer to copy read bytes into.
- * @param length The length of the buffer.
- * @return      On success, a positive number indicating how many bytes
- *              were read.
- *              On end-of-file, 0.
- *              On error, -1.  Errno will be set to the error code.
- *              Just like the POSIX read function, hdfsRead will return -1
- *              and set errno to EINTR if data is temporarily unavailable,
- *              but we are not yet at the end of the file.
- */
-LIBHDFS_EXTERNAL
-tSize hdfsRead(hdfsFS fs, hdfsFile file, void *buffer, tSize length);
-
-/**
- * hdfsPread - Positional read of data from an open file.
- * @param fs The configured filesystem handle.
- * @param file The file handle.
- * @param position Position from which to read
- * @param buffer The buffer to copy read bytes into.
- * @param length The length of the buffer.
- * @return      See hdfsRead
- */
-LIBHDFS_EXTERNAL
-tSize hdfsPread(hdfsFS fs, hdfsFile file, tOffset position, void *buffer,
-                tSize length);
-
-/**
- * hdfsWrite - Write data into an open file.
- * @param fs The configured filesystem handle.
- * @param file The file handle.
- * @param buffer The data.
- * @param length The no. of bytes to write.
- * @return Returns the number of bytes written, -1 on error.
- */
-LIBHDFS_EXTERNAL
-tSize hdfsWrite(hdfsFS fs, hdfsFile file, const void *buffer, tSize length);
-
-/**
- * hdfsWrite - Flush the data.
- * @param fs The configured filesystem handle.
- * @param file The file handle.
- * @return Returns 0 on success, -1 on error.
- */
-LIBHDFS_EXTERNAL
-int hdfsFlush(hdfsFS fs, hdfsFile file);
-
-/**
- * hdfsHFlush - Flush out the data in client's user buffer. After the
- * return of this call, new readers will see the data.
- * @param fs configured filesystem handle
- * @param file file handle
- * @return 0 on success, -1 on error and sets errno
- */
-LIBHDFS_EXTERNAL
-int hdfsHFlush(hdfsFS fs, hdfsFile file);
-
-/**
- * hdfsHSync - Similar to posix fsync, Flush out the data in client's
- * user buffer. all the way to the disk device (but the disk may have
- * it in its cache).
- * @param fs configured filesystem handle
- * @param file file handle
- * @return 0 on success, -1 on error and sets errno
- */
-LIBHDFS_EXTERNAL
-int hdfsHSync(hdfsFS fs, hdfsFile file);
-
-/**
- * hdfsAvailable - Number of bytes that can be read from this
- * input stream without blocking.
- * @param fs The configured filesystem handle.
- * @param file The file handle.
- * @return Returns available bytes; -1 on error.
- */
-LIBHDFS_EXTERNAL
-int hdfsAvailable(hdfsFS fs, hdfsFile file);
-
-/**
- * hdfsCopy - Copy file from one filesystem to another.
- * @param srcFS The handle to source filesystem.
- * @param src The path of source file.
- * @param dstFS The handle to destination filesystem.
- * @param dst The path of destination file.
- * @return Returns 0 on success, -1 on error.
- */
-LIBHDFS_EXTERNAL
-int hdfsCopy(hdfsFS srcFS, const char *src, hdfsFS dstFS, const char *dst);
-
-/**
- * hdfsMove - Move file from one filesystem to another.
- * @param srcFS The handle to source filesystem.
- * @param src The path of source file.
- * @param dstFS The handle to destination filesystem.
- * @param dst The path of destination file.
- * @return Returns 0 on success, -1 on error.
- */
-LIBHDFS_EXTERNAL
-int hdfsMove(hdfsFS srcFS, const char *src, hdfsFS dstFS, const char *dst);
-
-/**
- * hdfsDelete - Delete file.
- * @param fs The configured filesystem handle.
- * @param path The path of the file.
- * @param recursive if path is a directory and set to
- * non-zero, the directory is deleted else throws an exception. In
- * case of a file the recursive argument is irrelevant.
- * @return Returns 0 on success, -1 on error.
- */
-LIBHDFS_EXTERNAL
-int hdfsDelete(hdfsFS fs, const char *path, int recursive);
-
-/**
- * hdfsRename - Rename file.
- * @param fs The configured filesystem handle.
- * @param oldPath The path of the source file.
- * @param newPath The path of the destination file.
- * @return Returns 0 on success, -1 on error.
- */
-LIBHDFS_EXTERNAL
-int hdfsRename(hdfsFS fs, const char *oldPath, const char *newPath);
-
-/**
- * hdfsGetWorkingDirectory - Get the current working directory for
- * the given filesystem.
- * @param fs The configured filesystem handle.
- * @param buffer The user-buffer to copy path of cwd into.
- * @param bufferSize The length of user-buffer.
- * @return Returns buffer, NULL on error.
- */
-LIBHDFS_EXTERNAL
-char *hdfsGetWorkingDirectory(hdfsFS fs, char *buffer, size_t bufferSize);
-
-/**
- * hdfsSetWorkingDirectory - Set the working directory. All relative
- * paths will be resolved relative to it.
- * @param fs The configured filesystem handle.
- * @param path The path of the new 'cwd'.
- * @return Returns 0 on success, -1 on error.
- */
-LIBHDFS_EXTERNAL
-int hdfsSetWorkingDirectory(hdfsFS fs, const char *path);
-
-/**
- * hdfsCreateDirectory - Make the given file and all non-existent
- * parents into directories.
- * @param fs The configured filesystem handle.
- * @param path The path of the directory.
- * @return Returns 0 on success, -1 on error.
- */
-LIBHDFS_EXTERNAL
-int hdfsCreateDirectory(hdfsFS fs, const char *path);
-
-/**
- * hdfsSetReplication - Set the replication of the specified
- * file to the supplied value
- * @param fs The configured filesystem handle.
- * @param path The path of the file.
- * @return Returns 0 on success, -1 on error.
- */
-LIBHDFS_EXTERNAL
-int hdfsSetReplication(hdfsFS fs, const char *path, int16_t replication);
-
-/**
- * hdfsFileInfo - Information about a file/directory.
- */
-typedef struct {
-  tObjectKind mKind;  /* file or directory */
-  char *mName;        /* the name of the file */
-  tTime mLastMod;     /* the last modification time for the file in seconds */
-  tOffset mSize;      /* the size of the file in bytes */
-  short mReplication; /* the count of replicas */
-  tOffset mBlockSize; /* the block size for the file */
-  char *mOwner;       /* the owner of the file */
-  char *mGroup;       /* the group associated with the file */
-  short mPermissions; /* the permissions associated with the file */
-  tTime mLastAccess;  /* the last access time for the file in seconds */
-} hdfsFileInfo;
-
-/**
- * hdfsListDirectory - Get list of files/directories for a given
- * directory-path. hdfsFreeFileInfo should be called to deallocate memory.
- * @param fs The configured filesystem handle.
- * @param path The path of the directory.
- * @param numEntries Set to the number of files/directories in path.
- * @return Returns a dynamically-allocated array of hdfsFileInfo
- * objects; NULL on error.
- */
-LIBHDFS_EXTERNAL
-hdfsFileInfo *hdfsListDirectory(hdfsFS fs, const char *path, int *numEntries);
-
-/**
- * hdfsGetPathInfo - Get information about a path as a (dynamically
- * allocated) single hdfsFileInfo struct. hdfsFreeFileInfo should be
- * called when the pointer is no longer needed.
- * @param fs The configured filesystem handle.
- * @param path The path of the file.
- * @return Returns a dynamically-allocated hdfsFileInfo object;
- * NULL on error.
- */
-LIBHDFS_EXTERNAL
-hdfsFileInfo *hdfsGetPathInfo(hdfsFS fs, const char *path);
-
-/**
- * hdfsFreeFileInfo - Free up the hdfsFileInfo array (including fields)
- * @param hdfsFileInfo The array of dynamically-allocated hdfsFileInfo
- * objects.
- * @param numEntries The size of the array.
- */
-LIBHDFS_EXTERNAL
-void hdfsFreeFileInfo(hdfsFileInfo *hdfsFileInfo, int numEntries);
-
-/**
- * hdfsFileIsEncrypted: determine if a file is encrypted based on its
- * hdfsFileInfo.
- * @return -1 if there was an error (errno will be set), 0 if the file is
- *         not encrypted, 1 if the file is encrypted.
- */
-LIBHDFS_EXTERNAL
-int hdfsFileIsEncrypted(hdfsFileInfo *hdfsFileInfo);
-
-/**
- * hdfsGetHosts - Get hostnames where a particular block (determined by
- * pos & blocksize) of a file is stored. The last element in the array
- * is NULL. Due to replication, a single block could be present on
- * multiple hosts.
- * @param fs The configured filesystem handle.
- * @param path The path of the file.
- * @param start The start of the block.
- * @param length The length of the block.
- * @return Returns a dynamically-allocated 2-d array of blocks-hosts;
- * NULL on error.
- */
-LIBHDFS_EXTERNAL
-char ***hdfsGetHosts(hdfsFS fs, const char *path, tOffset start,
-                     tOffset length);
-
-/**
- * hdfsFreeHosts - Free up the structure returned by hdfsGetHosts
- * @param hdfsFileInfo The array of dynamically-allocated hdfsFileInfo
- * objects.
- * @param numEntries The size of the array.
- */
-LIBHDFS_EXTERNAL
-void hdfsFreeHosts(char ***blockHosts);
-
-/**
- * hdfsGetDefaultBlockSize - Get the default blocksize.
- *
- * @param fs            The configured filesystem handle.
- * @deprecated          Use hdfsGetDefaultBlockSizeAtPath instead.
- *
- * @return              Returns the default blocksize, or -1 on error.
- */
-LIBHDFS_EXTERNAL
-tOffset hdfsGetDefaultBlockSize(hdfsFS fs);
-
-/**
- * hdfsGetDefaultBlockSizeAtPath - Get the default blocksize at the
- * filesystem indicated by a given path.
- *
- * @param fs            The configured filesystem handle.
- * @param path          The given path will be used to locate the actual
- *                      filesystem.  The full path does not have to exist.
- *
- * @return              Returns the default blocksize, or -1 on error.
- */
-LIBHDFS_EXTERNAL
-tOffset hdfsGetDefaultBlockSizeAtPath(hdfsFS fs, const char *path);
-
-/**
- * hdfsGetCapacity - Return the raw capacity of the filesystem.
- * @param fs The configured filesystem handle.
- * @return Returns the raw-capacity; -1 on error.
- */
-LIBHDFS_EXTERNAL
-tOffset hdfsGetCapacity(hdfsFS fs);
-
-/**
- * hdfsGetUsed - Return the total raw size of all files in the filesystem.
- * @param fs The configured filesystem handle.
- * @return Returns the total-size; -1 on error.
- */
-LIBHDFS_EXTERNAL
-tOffset hdfsGetUsed(hdfsFS fs);
-
-/**
- * Change the user and/or group of a file or directory.
- *
- * @param fs            The configured filesystem handle.
- * @param path          the path to the file or directory
- * @param owner         User string.  Set to NULL for 'no change'
- * @param group         Group string.  Set to NULL for 'no change'
- * @return              0 on success else -1
- */
-LIBHDFS_EXTERNAL
-int hdfsChown(hdfsFS fs, const char *path, const char *owner,
-              const char *group);
-
-/**
- * hdfsChmod
- * @param fs The configured filesystem handle.
- * @param path the path to the file or directory
- * @param mode the bitmask to set it to
- * @return 0 on success else -1
- */
-LIBHDFS_EXTERNAL
-int hdfsChmod(hdfsFS fs, const char *path, short mode);
-
-/**
- * hdfsUtime
- * @param fs The configured filesystem handle.
- * @param path the path to the file or directory
- * @param mtime new modification time or -1 for no change
- * @param atime new access time or -1 for no change
- * @return 0 on success else -1
- */
-LIBHDFS_EXTERNAL
-int hdfsUtime(hdfsFS fs, const char *path, tTime mtime, tTime atime);
-
-/**
- * Allocate a zero-copy options structure.
- *
- * You must free all options structures allocated with this function using
- * hadoopRzOptionsFree.
- *
- * @return            A zero-copy options structure, or NULL if one could
- *                    not be allocated.  If NULL is returned, errno will
- *                    contain the error number.
- */
-LIBHDFS_EXTERNAL
-struct hadoopRzOptions *hadoopRzOptionsAlloc(void);
-
-/**
- * Determine whether we should skip checksums in read0.
- *
- * @param opts        The options structure.
- * @param skip        Nonzero to skip checksums sometimes; zero to always
- *                    check them.
- *
- * @return            0 on success; -1 plus errno on failure.
- */
-LIBHDFS_EXTERNAL
-int hadoopRzOptionsSetSkipChecksum(struct hadoopRzOptions *opts, int skip);
-
-/**
- * Set the ByteBufferPool to use with read0.
- *
- * @param opts        The options structure.
- * @param className   If this is NULL, we will not use any
- *                    ByteBufferPool.  If this is non-NULL, it will be
- *                    treated as the name of the pool class to use.
- *                    For example, you can use
- *                    ELASTIC_BYTE_BUFFER_POOL_CLASS.
- *
- * @return            0 if the ByteBufferPool class was found and
- *                    instantiated;
- *                    -1 plus errno otherwise.
- */
-LIBHDFS_EXTERNAL
-int hadoopRzOptionsSetByteBufferPool(struct hadoopRzOptions *opts,
-                                     const char *className);
-
-/**
- * Free a hadoopRzOptionsFree structure.
- *
- * @param opts        The options structure to free.
- *                    Any associated ByteBufferPool will also be freed.
- */
-LIBHDFS_EXTERNAL
-void hadoopRzOptionsFree(struct hadoopRzOptions *opts);
-
-/**
- * Perform a byte buffer read.
- * If possible, this will be a zero-copy (mmap) read.
- *
- * @param file       The file to read from.
- * @param opts       An options structure created by hadoopRzOptionsAlloc.
- * @param maxLength  The maximum length to read.  We may read fewer bytes
- *                   than this length.
- *
- * @return           On success, we will return a new hadoopRzBuffer.
- *                   This buffer will continue to be valid and readable
- *                   until it is released by readZeroBufferFree.  Failure to
- *                   release a buffer will lead to a memory leak.
- *                   You can access the data within the hadoopRzBuffer with
- *                   hadoopRzBufferGet.  If you have reached EOF, the data
- *                   within the hadoopRzBuffer will be NULL.  You must still
- *                   free hadoopRzBuffer instances containing NULL.
- *
- *                   On failure, we will return NULL plus an errno code.
- *                   errno = EOPNOTSUPP indicates that we could not do a
- *                   zero-copy read, and there was no ByteBufferPool
- *                   supplied.
- */
-LIBHDFS_EXTERNAL
-struct hadoopRzBuffer *hadoopReadZero(hdfsFile file,
-                                      struct hadoopRzOptions *opts,
-                                      int32_t maxLength);
-
-/**
- * Determine the length of the buffer returned from readZero.
- *
- * @param buffer     a buffer returned from readZero.
- * @return           the length of the buffer.
- */
-LIBHDFS_EXTERNAL
-int32_t hadoopRzBufferLength(const struct hadoopRzBuffer *buffer);
-
-/**
- * Get a pointer to the raw buffer returned from readZero.
- *
- * To find out how many bytes this buffer contains, call
- * hadoopRzBufferLength.
- *
- * @param buffer     a buffer returned from readZero.
- * @return           a pointer to the start of the buffer.  This will be
- *                   NULL when end-of-file has been reached.
- */
-LIBHDFS_EXTERNAL
-const void *hadoopRzBufferGet(const struct hadoopRzBuffer *buffer);
-
-/**
- * Release a buffer obtained through readZero.
- *
- * @param file       The hdfs stream that created this buffer.  This must be
- *                   the same stream you called hadoopReadZero on.
- * @param buffer     The buffer to release.
- */
-LIBHDFS_EXTERNAL
-void hadoopRzBufferFree(hdfsFile file, struct hadoopRzBuffer *buffer);
-
-#ifdef __cplusplus
-}
-#endif
-
-#undef LIBHDFS_EXTERNAL
-#endif /*LIBHDFS_HDFS_H*/
-
-/**
- * vim: ts=4: sw=4: et
- */
diff --git a/third_party/highwayhash.BUILD b/third_party/highwayhash.BUILD
deleted file mode 100644
index 1b8e407..0000000
--- a/third_party/highwayhash.BUILD
+++ /dev/null
@@ -1,32 +0,0 @@
-# Description:
-#   SipHash and HighwayHash: cryptographically-strong pseudorandom functions
-
-licenses(["notice"])  # Apache 2.0
-
-exports_files(["LICENSE"])
-
-cc_library(
-    name = "sip_hash",
-    srcs = ["highwayhash/sip_hash.cc"],
-    hdrs = [
-        "highwayhash/sip_hash.h",
-        "highwayhash/state_helpers.h",
-    ],
-    visibility = ["//visibility:public"],
-    deps = [
-        ":arch_specific",
-        ":compiler_specific",
-    ],
-)
-
-cc_library(
-    name = "arch_specific",
-    srcs = ["highwayhash/arch_specific.cc"],
-    hdrs = ["highwayhash/arch_specific.h"],
-    deps = [":compiler_specific"],
-)
-
-cc_library(
-    name = "compiler_specific",
-    hdrs = ["highwayhash/compiler_specific.h"],
-)
diff --git a/third_party/jemalloc.BUILD b/third_party/jemalloc.BUILD
deleted file mode 100644
index 1b0829b..0000000
--- a/third_party/jemalloc.BUILD
+++ /dev/null
@@ -1,356 +0,0 @@
-# Description:
-# jemalloc - a general-purpose scalable concurrent malloc implementation
-
-licenses(["notice"])  # BSD
-
-exports_files(["COPYING"])
-
-load("@org_tensorflow//third_party:common.bzl", "template_rule")
-
-cc_library(
-    name = "jemalloc_headers",
-    hdrs = ["include/jemalloc/jemalloc.h"],
-    includes = ["include"],
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "jemalloc_impl",
-    srcs = [
-        "src/arena.c",
-        "src/atomic.c",
-        "src/base.c",
-        "src/bitmap.c",
-        "src/chunk.c",
-        "src/chunk_dss.c",
-        "src/chunk_mmap.c",
-        "src/ckh.c",
-        "src/ctl.c",
-        "src/extent.c",
-        "src/hash.c",
-        "src/huge.c",
-        "src/jemalloc.c",
-        "src/mb.c",
-        "src/mutex.c",
-        "src/nstime.c",
-        "src/pages.c",
-        "src/prng.c",
-        "src/prof.c",
-        "src/quarantine.c",
-        "src/rtree.c",
-        "src/spin.c",
-        "src/stats.c",
-        "src/tcache.c",
-        "src/tsd.c",
-        "src/util.c",
-        "src/witness.c",
-    ],
-    hdrs = [
-        "include/jemalloc/internal/arena.h",
-        "include/jemalloc/internal/assert.h",
-        "include/jemalloc/internal/atomic.h",
-        "include/jemalloc/internal/base.h",
-        "include/jemalloc/internal/bitmap.h",
-        "include/jemalloc/internal/chunk.h",
-        "include/jemalloc/internal/chunk_dss.h",
-        "include/jemalloc/internal/chunk_mmap.h",
-        "include/jemalloc/internal/ckh.h",
-        "include/jemalloc/internal/ctl.h",
-        "include/jemalloc/internal/extent.h",
-        "include/jemalloc/internal/hash.h",
-        "include/jemalloc/internal/huge.h",
-        "include/jemalloc/internal/jemalloc_internal.h",
-        "include/jemalloc/internal/jemalloc_internal_decls.h",
-        "include/jemalloc/internal/jemalloc_internal_defs.h",
-        "include/jemalloc/internal/jemalloc_internal_macros.h",
-        "include/jemalloc/internal/mb.h",
-        "include/jemalloc/internal/mutex.h",
-        "include/jemalloc/internal/nstime.h",
-        "include/jemalloc/internal/pages.h",
-        "include/jemalloc/internal/ph.h",
-        "include/jemalloc/internal/private_namespace.h",
-        "include/jemalloc/internal/prng.h",
-        "include/jemalloc/internal/prof.h",
-        "include/jemalloc/internal/ql.h",
-        "include/jemalloc/internal/qr.h",
-        "include/jemalloc/internal/quarantine.h",
-        "include/jemalloc/internal/rb.h",
-        "include/jemalloc/internal/rtree.h",
-        "include/jemalloc/internal/size_classes.h",
-        "include/jemalloc/internal/smoothstep.h",
-        "include/jemalloc/internal/spin.h",
-        "include/jemalloc/internal/stats.h",
-        "include/jemalloc/internal/tcache.h",
-        "include/jemalloc/internal/ticker.h",
-        "include/jemalloc/internal/tsd.h",
-        "include/jemalloc/internal/util.h",
-        "include/jemalloc/internal/valgrind.h",
-        "include/jemalloc/internal/witness.h",
-    ],
-    # Same flags that jemalloc uses to build.
-    copts = [
-        "-O3",
-        "-funroll-loops",
-        "-D_GNU_SOURCE",
-        "-D_REENTRANT",
-    ],
-    includes = ["include"],
-    # pthread_atfork() is called for PPC.
-    linkopts = select({
-        "@org_tensorflow//tensorflow:linux_ppc64le": [
-            "-lpthread",
-        ],
-        "@org_tensorflow//tensorflow:linux_x86_64": [
-            "-lpthread",
-        ],
-        "//conditions:default": [
-        ],
-    }),
-    visibility = ["//visibility:public"],
-    deps = [":jemalloc_headers"],
-)
-
-sh_binary(
-    name = "jemalloc_sh",
-    srcs = ["include/jemalloc/jemalloc.sh"],
-)
-
-genrule(
-    name = "jemalloc_h",
-    srcs = [
-        ":jemalloc_defs_h",
-        ":jemalloc_macros_h",
-        ":jemalloc_mangle_h",
-        ":jemalloc_protos_h",
-        ":jemalloc_rename_h",
-        ":jemalloc_typedefs_h",
-    ],
-    outs = ["include/jemalloc/jemalloc.h"],
-    cmd = "$(location :jemalloc_sh) $$(dirname $(location :jemalloc_defs_h))/../../ >$@",
-    tools = [":jemalloc_sh"],
-)
-
-# Add to this list if you want to export more symbols from jemalloc.
-genrule(
-    name = "public_symbols_txt",
-    outs = ["include/jemalloc/internal/public_symbols.txt"],
-    cmd = "\n".join([
-        "cat <<'EOF' > $@",
-        "free:jemalloc_free",
-        "malloc:jemalloc_malloc",
-        "posix_memalign:jemalloc_posix_memalign",
-        "realloc:jemalloc_realloc",
-        "EOF",
-    ]),
-)
-
-sh_binary(
-    name = "jemalloc_mangle_sh",
-    srcs = ["include/jemalloc/jemalloc_mangle.sh"],
-)
-
-genrule(
-    name = "jemalloc_mangle_h",
-    srcs = [":public_symbols_txt"],
-    outs = ["include/jemalloc/jemalloc_mangle.h"],
-    cmd = "$(location :jemalloc_mangle_sh) $(location :public_symbols_txt) je_ >$@",
-    tools = [":jemalloc_mangle_sh"],
-)
-
-sh_binary(
-    name = "jemalloc_rename_sh",
-    srcs = ["include/jemalloc/jemalloc_rename.sh"],
-)
-
-genrule(
-    name = "jemalloc_rename_h",
-    srcs = [":public_symbols_txt"],
-    outs = ["include/jemalloc/jemalloc_rename.h"],
-    cmd = "$(location :jemalloc_rename_sh) $(location :public_symbols_txt) >$@",
-    tools = [":jemalloc_rename_sh"],
-)
-
-sh_binary(
-    name = "private_namespace_sh",
-    srcs = ["include/jemalloc/internal/private_namespace.sh"],
-)
-
-genrule(
-    name = "private_namespace_h",
-    srcs = ["include/jemalloc/internal/private_symbols.txt"],
-    outs = ["include/jemalloc/internal/private_namespace.h"],
-    cmd = "$(location :private_namespace_sh) $(location include/jemalloc/internal/private_symbols.txt) >$@",
-    tools = [":private_namespace_sh"],
-)
-
-sh_binary(
-    name = "public_namespace_sh",
-    srcs = ["include/jemalloc/internal/public_namespace.sh"],
-)
-
-genrule(
-    name = "public_namespace_h",
-    srcs = [":public_symbols_txt"],
-    outs = ["include/jemalloc/internal/public_namespace.h"],
-    cmd = "$(location :public_namespace_sh) $(location :public_symbols_txt) >$@",
-    tools = [":public_namespace_sh"],
-)
-
-sh_binary(
-    name = "size_classes_sh",
-    srcs = ["include/jemalloc/internal/size_classes.sh"],
-)
-
-# Size classes for Linux x86_64 and ppc64le. Update if adding builds for other
-# architectures. See size_classes.sh for details on the arguments.
-# For default case, kept the arguments same as that of  x86_64 for now.
-genrule(
-    name = "size_classes_h",
-    outs = ["include/jemalloc/internal/size_classes.h"],
-    cmd = select({
-        "@org_tensorflow//tensorflow:linux_ppc64le": "$(location :size_classes_sh) \"3 4\" 3 16 2 >$@",
-        "@org_tensorflow//tensorflow:linux_x86_64": "$(location :size_classes_sh) \"3 4\" 3 12 2 >$@",
-        "//conditions:default": "$(location :size_classes_sh) \"3 4\" 3 12 2 >$@",
-    }),
-    tools = [":size_classes_sh"],
-)
-
-template_rule(
-    name = "jemalloc_internal_h",
-    src = "include/jemalloc/internal/jemalloc_internal.h.in",
-    out = "include/jemalloc/internal/jemalloc_internal.h",
-    substitutions = {
-        "@private_namespace@": "je_",
-        "@install_suffix@": "",
-    },
-)
-
-template_rule(
-    name = "jemalloc_internal_defs_h",
-    src = "include/jemalloc/internal/jemalloc_internal_defs.h.in",
-    out = "include/jemalloc/internal/jemalloc_internal_defs.h",
-    substitutions = {
-        "#undef JEMALLOC_PREFIX": "#define JEMALLOC_PREFIX \"jemalloc_\"",
-        "#undef JEMALLOC_CPREFIX": "#define JEMALLOC_CPREFIX \"JEMALLOC_\"",
-        "#undef JEMALLOC_PRIVATE_NAMESPACE": "#define JEMALLOC_PRIVATE_NAMESPACE je_",
-        "#undef CPU_SPINWAIT": "\n".join([
-            "#if defined(__powerpc64__) || defined(__powerpc__)",
-            "#define CPU_SPINWAIT __asm__ volatile(\"or 27,27,27\")",
-            "#else",
-            "#define CPU_SPINWAIT __asm__ volatile(\"pause\")",
-            "#endif",
-        ]),
-        "#undef JEMALLOC_HAVE_BUILTIN_CLZ": "#define JEMALLOC_HAVE_BUILTIN_CLZ",
-        "#undef JEMALLOC_USE_SYSCALL": "#define JEMALLOC_USE_SYSCALL",
-        "#undef JEMALLOC_HAVE_SECURE_GETENV": "#define JEMALLOC_HAVE_SECURE_GETENV",
-        "#undef JEMALLOC_HAVE_PTHREAD_ATFORK": "#define JEMALLOC_HAVE_PTHREAD_ATFORK",
-        "#undef JEMALLOC_HAVE_CLOCK_MONOTONIC_COARSE": "#define JEMALLOC_HAVE_CLOCK_MONOTONIC_COARSE 1",
-        # Newline required because of substitution conflicts.
-        "#undef JEMALLOC_HAVE_CLOCK_MONOTONIC\n": "#define JEMALLOC_HAVE_CLOCK_MONOTONIC 1\n",
-        "#undef JEMALLOC_THREADED_INIT": "#define JEMALLOC_THREADED_INIT",
-        "#undef JEMALLOC_TLS_MODEL": "#define JEMALLOC_TLS_MODEL __attribute__((tls_model(\"initial-exec\")))",
-        "#undef JEMALLOC_CC_SILENCE": "#define JEMALLOC_CC_SILENCE",
-        "#undef JEMALLOC_STATS": "#define JEMALLOC_STATS",
-        "#undef JEMALLOC_TCACHE": "#define JEMALLOC_TCACHE",
-        "#undef JEMALLOC_DSS": "#define JEMALLOC_DSS",
-        "#undef JEMALLOC_FILL": "#define JEMALLOC_FILL",
-        "#undef LG_TINY_MIN": "#define LG_TINY_MIN 3",
-        "#undef LG_PAGE": "\n".join([
-            "#if defined(__powerpc64__) || defined(__powerpc__)",
-            "#define LG_PAGE 16",
-            "#else",
-            "#define LG_PAGE 12",
-            "#endif",
-        ]),
-        "#undef JEMALLOC_MAPS_COALESCE": "#define JEMALLOC_MAPS_COALESCE",
-        "#undef JEMALLOC_TLS": "#define JEMALLOC_TLS",
-        "#undef JEMALLOC_INTERNAL_UNREACHABLE": "#define JEMALLOC_INTERNAL_UNREACHABLE __builtin_unreachable",
-        "#undef JEMALLOC_INTERNAL_FFSLL": "#define JEMALLOC_INTERNAL_FFSLL __builtin_ffsll",
-        # Newline required because of substitution conflicts.
-        "#undef JEMALLOC_INTERNAL_FFSL\n": "#define JEMALLOC_INTERNAL_FFSL __builtin_ffsl\n",
-        "#undef JEMALLOC_INTERNAL_FFS\n": "#define JEMALLOC_INTERNAL_FFS __builtin_ffs\n",
-        "#undef JEMALLOC_CACHE_OBLIVIOUS": "#define JEMALLOC_CACHE_OBLIVIOUS",
-        "#undef JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY": "#define JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY",
-        "#undef JEMALLOC_HAVE_MADVISE": "#define JEMALLOC_HAVE_MADVISE",
-        "#undef JEMALLOC_PURGE_MADVISE_DONTNEED": "#define JEMALLOC_PURGE_MADVISE_DONTNEED",
-        "#undef JEMALLOC_THP": "#define JEMALLOC_THP",
-        "#undef JEMALLOC_HAS_ALLOCA_H": "#define JEMALLOC_HAS_ALLOCA_H 1",
-        # Newline required because of substitution conflicts.
-        "#undef LG_SIZEOF_INT\n": "#define LG_SIZEOF_INT 2\n",
-        "#undef LG_SIZEOF_LONG\n": "#define LG_SIZEOF_LONG 3\n",
-        "#undef LG_SIZEOF_LONG_LONG": "#define LG_SIZEOF_LONG_LONG 3",
-        "#undef LG_SIZEOF_INTMAX_T": "#define LG_SIZEOF_INTMAX_T 3",
-        "#undef JEMALLOC_GLIBC_MALLOC_HOOK": "#define JEMALLOC_GLIBC_MALLOC_HOOK",
-        "#undef JEMALLOC_GLIBC_MEMALIGN_HOOK": "#define JEMALLOC_GLIBC_MEMALIGN_HOOK",
-        "#undef JEMALLOC_HAVE_PTHREAD_MUTEX_ADAPTIVE_NP": "#define JEMALLOC_HAVE_PTHREAD_MUTEX_ADAPTIVE_NP",
-        "#undef JEMALLOC_CONFIG_MALLOC_CONF": "#define JEMALLOC_CONFIG_MALLOC_CONF \"\"",
-    },
-)
-
-template_rule(
-    name = "jemalloc_defs_h",
-    src = "include/jemalloc/jemalloc_defs.h.in",
-    out = "include/jemalloc/jemalloc_defs.h",
-    substitutions = {
-        "#undef JEMALLOC_HAVE_ATTR": "#define JEMALLOC_HAVE_ATTR",
-        "#undef JEMALLOC_HAVE_ATTR_ALLOC_SIZE": "#define JEMALLOC_HAVE_ATTR_ALLOC_SIZE",
-        "#undef JEMALLOC_HAVE_ATTR_FORMAT_GNU_PRINTF": "#define JEMALLOC_HAVE_ATTR_FORMAT_GNU_PRINTF",
-        "#undef JEMALLOC_HAVE_ATTR_FORMAT_PRINTF": "#define JEMALLOC_HAVE_ATTR_FORMAT_PRINTF",
-        "#undef JEMALLOC_OVERRIDE_MEMALIGN": "#define JEMALLOC_OVERRIDE_MEMALIGN",
-        "#undef JEMALLOC_OVERRIDE_VALLOC": "#define JEMALLOC_OVERRIDE_VALLOC",
-        "#undef JEMALLOC_USABLE_SIZE_CONST": "#define JEMALLOC_USABLE_SIZE_CONST",
-        "#undef JEMALLOC_USE_CXX_THROW": "#define JEMALLOC_USE_CXX_THROW",
-        "#undef LG_SIZEOF_PTR": "#define LG_SIZEOF_PTR 3",
-    },
-)
-
-template_rule(
-    name = "jemalloc_macros_h",
-    src = "include/jemalloc/jemalloc_macros.h.in",
-    out = "include/jemalloc/jemalloc_macros.h",
-    substitutions = {
-        "@jemalloc_version@": "0.0.0",
-        "@jemalloc_version_major@": "0",
-        "@jemalloc_version_minor@": "0",
-        "@jemalloc_version_bugfix@": "0",
-        "@jemalloc_version_nrev@": "0",
-        "@jemalloc_version_gid@": "0000000000000000000000000000000000000000",
-    },
-)
-
-template_rule(
-    name = "jemalloc_protos_h",
-    src = "include/jemalloc/jemalloc_protos.h.in",
-    out = "include/jemalloc/jemalloc_protos.h",
-    substitutions = {
-        "@aligned_alloc": "aligned_alloc",
-        "@calloc": "calloc",
-        "@cbopaque": "cbopaque",
-        "@dallocx": "dallocx",
-        "@free": "free",
-        "@je": "je",
-        "@mallctl": "mallctl",
-        "@mallctlnametomib": "mallctlnametomib",
-        "@mallctlbymib": "mallctlbymib",
-        "@malloc_stats_print": "malloc_stats_print",
-        "@malloc_usable_size": "malloc_usable_size",
-        "@malloc": "malloc",
-        "@mallocx": "mallocx",
-        "@memalign": "memalign",
-        "@nallocx": "nallocx",
-        "@posix_memalign": "posix_memalign",
-        "@rallocx": "rallocx",
-        "@realloc": "realloc",
-        "@sallocx": "sallocx",
-        "@sdallocx": "sdallocx",
-        "@valloc": "valloc",
-        "@xallocx": "xallocx",
-    },
-)
-
-template_rule(
-    name = "jemalloc_typedefs_h",
-    src = "include/jemalloc/jemalloc_typedefs.h.in",
-    out = "include/jemalloc/jemalloc_typedefs.h",
-    substitutions = {},
-)
diff --git a/third_party/jpeg/BUILD b/third_party/jpeg/BUILD
deleted file mode 100644
index 5b01f6e..0000000
--- a/third_party/jpeg/BUILD
+++ /dev/null
@@ -1 +0,0 @@
-licenses(["notice"])
diff --git a/third_party/jpeg/jpeg.BUILD b/third_party/jpeg/jpeg.BUILD
deleted file mode 100644
index 4418ac3..0000000
--- a/third_party/jpeg/jpeg.BUILD
+++ /dev/null
@@ -1,550 +0,0 @@
-# Description:
-#   libjpeg-turbo is a drop in replacement for jpeglib optimized with SIMD.
-
-licenses(["notice"])  # custom notice-style license, see LICENSE.md
-
-exports_files(["LICENSE.md"])
-
-load("@org_tensorflow//third_party:common.bzl", "template_rule")
-
-libjpegturbo_nocopts = "-[W]error"
-
-WIN_COPTS = [
-    "/Ox",
-    "/w14711",  # function 'function' selected for inline expansion
-    "/w14710",  # 'function' : function not inlined
-]
-
-libjpegturbo_copts = select({
-    ":android": [
-        "-O2",
-        "-fPIE",
-        "-w",
-    ],
-    ":windows": WIN_COPTS,
-    ":windows_msvc": WIN_COPTS,
-    "//conditions:default": [
-        "-O3",
-        "-w",
-    ],
-}) + select({
-    ":armeabi-v7a": [
-        "-D__ARM_NEON__",
-        "-march=armv7-a",
-        "-mfloat-abi=softfp",
-        "-fprefetch-loop-arrays",
-    ],
-    ":linux_ppc64le": [
-        "-mcpu=power8",
-        "-mtune=power8",
-    ],
-    "//conditions:default": [],
-})
-
-cc_library(
-    name = "jpeg",
-    srcs = [
-        "jaricom.c",
-        "jcapimin.c",
-        "jcapistd.c",
-        "jcarith.c",
-        "jccoefct.c",
-        "jccolor.c",
-        "jcdctmgr.c",
-        "jchuff.c",
-        "jchuff.h",
-        "jcinit.c",
-        "jcmainct.c",
-        "jcmarker.c",
-        "jcmaster.c",
-        "jcomapi.c",
-        "jconfig.h",
-        "jconfigint.h",
-        "jcparam.c",
-        "jcphuff.c",
-        "jcprepct.c",
-        "jcsample.c",
-        "jctrans.c",
-        "jdapimin.c",
-        "jdapistd.c",
-        "jdarith.c",
-        "jdatadst.c",
-        "jdatasrc.c",
-        "jdcoefct.c",
-        "jdcoefct.h",
-        "jdcolor.c",
-        "jdct.h",
-        "jddctmgr.c",
-        "jdhuff.c",
-        "jdhuff.h",
-        "jdinput.c",
-        "jdmainct.c",
-        "jdmainct.h",
-        "jdmarker.c",
-        "jdmaster.c",
-        "jdmaster.h",
-        "jdmerge.c",
-        "jdphuff.c",
-        "jdpostct.c",
-        "jdsample.c",
-        "jdsample.h",
-        "jdtrans.c",
-        "jerror.c",
-        "jfdctflt.c",
-        "jfdctfst.c",
-        "jfdctint.c",
-        "jidctflt.c",
-        "jidctfst.c",
-        "jidctint.c",
-        "jidctred.c",
-        "jinclude.h",
-        "jmemmgr.c",
-        "jmemnobs.c",
-        "jmemsys.h",
-        "jpeg_nbits_table.h",
-        "jpegcomp.h",
-        "jquant1.c",
-        "jquant2.c",
-        "jutils.c",
-        "jversion.h",
-    ],
-    hdrs = [
-        "jccolext.c",  # should have been named .inc
-        "jdcol565.c",  # should have been named .inc
-        "jdcolext.c",  # should have been named .inc
-        "jdmrg565.c",  # should have been named .inc
-        "jdmrgext.c",  # should have been named .inc
-        "jerror.h",
-        "jmorecfg.h",
-        "jpegint.h",
-        "jpeglib.h",
-        "jstdhuff.c",  # should have been named .inc
-    ],
-    copts = libjpegturbo_copts,
-    nocopts = libjpegturbo_nocopts,
-    visibility = ["//visibility:public"],
-    deps = select({
-        ":k8": [":simd_x86_64"],
-        ":armeabi-v7a": [":simd_armv7a"],
-        ":arm64-v8a": [":simd_armv8a"],
-        ":linux_ppc64le": [":simd_altivec"],
-        "//conditions:default": [":simd_none"],
-    }),
-)
-
-cc_library(
-    name = "simd_altivec",
-    srcs = [
-        "jchuff.h",
-        "jconfig.h",
-        "jdct.h",
-        "jerror.h",
-        "jinclude.h",
-        "jmorecfg.h",
-        "jpegint.h",
-        "jpeglib.h",
-        "jsimd.h",
-        "jsimddct.h",
-        "simd/jccolor-altivec.c",
-        "simd/jcgray-altivec.c",
-        "simd/jcsample.h",
-        "simd/jcsample-altivec.c",
-        "simd/jdcolor-altivec.c",
-        "simd/jdmerge-altivec.c",
-        "simd/jdsample-altivec.c",
-        "simd/jfdctfst-altivec.c",
-        "simd/jfdctint-altivec.c",
-        "simd/jidctfst-altivec.c",
-        "simd/jidctint-altivec.c",
-        "simd/jquanti-altivec.c",
-        "simd/jsimd.h",
-        "simd/jsimd_altivec.h",
-        "simd/jsimd_powerpc.c",
-    ],
-    hdrs = [
-        "simd/jccolext-altivec.c",  # should have been named .inc
-        "simd/jcgryext-altivec.c",  # should have been named .inc
-        "simd/jdcolext-altivec.c",  # should have been named .inc
-        "simd/jdmrgext-altivec.c",  # should have been named .inc
-    ],
-    copts = libjpegturbo_copts,
-    nocopts = libjpegturbo_nocopts,
-)
-
-cc_library(
-    name = "simd_x86_64",
-    srcs = [
-        "jchuff.h",
-        "jconfig.h",
-        "jdct.h",
-        "jerror.h",
-        "jinclude.h",
-        "jmorecfg.h",
-        "jpegint.h",
-        "jpeglib.h",
-        "jsimd.h",
-        "jsimddct.h",
-        "simd/jccolor-sse2-64.o",
-        "simd/jcgray-sse2-64.o",
-        "simd/jchuff-sse2-64.o",
-        "simd/jcsample-sse2-64.o",
-        "simd/jdcolor-sse2-64.o",
-        "simd/jdmerge-sse2-64.o",
-        "simd/jdsample-sse2-64.o",
-        "simd/jfdctflt-sse-64.o",
-        "simd/jfdctfst-sse2-64.o",
-        "simd/jfdctint-sse2-64.o",
-        "simd/jidctflt-sse2-64.o",
-        "simd/jidctfst-sse2-64.o",
-        "simd/jidctint-sse2-64.o",
-        "simd/jidctred-sse2-64.o",
-        "simd/jquantf-sse2-64.o",
-        "simd/jquanti-sse2-64.o",
-        "simd/jsimd.h",
-        "simd/jsimd_x86_64.c",
-    ],
-    copts = libjpegturbo_copts,
-    linkstatic = 1,
-    nocopts = libjpegturbo_nocopts,
-)
-
-genrule(
-    name = "simd_x86_64_assemblage23",
-    srcs = [
-        "simd/jccolext-sse2-64.asm",
-        "simd/jccolor-sse2-64.asm",
-        "simd/jcgray-sse2-64.asm",
-        "simd/jcgryext-sse2-64.asm",
-        "simd/jchuff-sse2-64.asm",
-        "simd/jcolsamp.inc",
-        "simd/jcsample-sse2-64.asm",
-        "simd/jdcolext-sse2-64.asm",
-        "simd/jdcolor-sse2-64.asm",
-        "simd/jdct.inc",
-        "simd/jdmerge-sse2-64.asm",
-        "simd/jdmrgext-sse2-64.asm",
-        "simd/jdsample-sse2-64.asm",
-        "simd/jfdctflt-sse-64.asm",
-        "simd/jfdctfst-sse2-64.asm",
-        "simd/jfdctint-sse2-64.asm",
-        "simd/jidctflt-sse2-64.asm",
-        "simd/jidctfst-sse2-64.asm",
-        "simd/jidctint-sse2-64.asm",
-        "simd/jidctred-sse2-64.asm",
-        "simd/jpeg_nbits_table.inc",
-        "simd/jquantf-sse2-64.asm",
-        "simd/jquanti-sse2-64.asm",
-        "simd/jsimdcfg.inc",
-        "simd/jsimdext.inc",
-    ],
-    outs = [
-        "simd/jccolor-sse2-64.o",
-        "simd/jcgray-sse2-64.o",
-        "simd/jchuff-sse2-64.o",
-        "simd/jcsample-sse2-64.o",
-        "simd/jdcolor-sse2-64.o",
-        "simd/jdmerge-sse2-64.o",
-        "simd/jdsample-sse2-64.o",
-        "simd/jfdctflt-sse-64.o",
-        "simd/jfdctfst-sse2-64.o",
-        "simd/jfdctint-sse2-64.o",
-        "simd/jidctflt-sse2-64.o",
-        "simd/jidctfst-sse2-64.o",
-        "simd/jidctint-sse2-64.o",
-        "simd/jidctred-sse2-64.o",
-        "simd/jquantf-sse2-64.o",
-        "simd/jquanti-sse2-64.o",
-    ],
-    cmd = "for out in $(OUTS); do\n" +
-          "  $(location @nasm//:nasm) -f elf64" +
-          "    -DELF -DPIC -DRGBX_FILLER_0XFF -D__x86_64__ -DARCH_X86_64" +
-          "    -I $$(dirname $(location simd/jdct.inc))/" +
-          "    -I $$(dirname $(location simd/jsimdcfg.inc))/" +
-          "    -o $$out" +
-          "    $$(dirname $(location simd/jdct.inc))/$$(basename $${out%.o}.asm)\n" +
-          "done",
-    tools = ["@nasm"],
-)
-
-cc_library(
-    name = "simd_armv7a",
-    srcs = [
-        "jchuff.h",
-        "jconfig.h",
-        "jdct.h",
-        "jinclude.h",
-        "jmorecfg.h",
-        "jpeglib.h",
-        "jsimd.h",
-        "jsimddct.h",
-        "simd/jsimd.h",
-        "simd/jsimd_arm.c",
-        "simd/jsimd_arm_neon.S",
-    ],
-    copts = libjpegturbo_copts,
-    nocopts = libjpegturbo_nocopts,
-)
-
-cc_library(
-    name = "simd_armv8a",
-    srcs = [
-        "jchuff.h",
-        "jconfig.h",
-        "jdct.h",
-        "jinclude.h",
-        "jmorecfg.h",
-        "jpeglib.h",
-        "jsimd.h",
-        "jsimddct.h",
-        "simd/jsimd.h",
-        "simd/jsimd_arm64.c",
-        "simd/jsimd_arm64_neon.S",
-    ],
-    copts = libjpegturbo_copts,
-    nocopts = libjpegturbo_nocopts,
-)
-
-cc_library(
-    name = "simd_none",
-    srcs = [
-        "jchuff.h",
-        "jconfig.h",
-        "jdct.h",
-        "jerror.h",
-        "jinclude.h",
-        "jmorecfg.h",
-        "jpegint.h",
-        "jpeglib.h",
-        "jsimd.h",
-        "jsimd_none.c",
-        "jsimddct.h",
-    ],
-    copts = libjpegturbo_copts,
-    nocopts = libjpegturbo_nocopts,
-)
-
-template_rule(
-    name = "jconfig_win",
-    src = "win/jconfig.h.in",
-    out = "jconfig_win.h",
-    substitutions = {
-        "@JPEG_LIB_VERSION@": "62",
-        "@VERSION@": "1.5.1",
-        "@LIBJPEG_TURBO_VERSION_NUMBER@": "1005001",
-        "cmakedefine": "define",
-        "@BITS_IN_JSAMPLE@": "8",
-    },
-)
-
-template_rule(
-    name = "jconfigint_win",
-    src = "win/jconfigint.h.in",
-    out = "jconfigint_win.h",
-    substitutions = {
-        "@VERSION@": "1.5.1",
-        "@BUILD@": "20161115",
-        "@CMAKE_PROJECT_NAME@": "libjpeg-turbo",
-    },
-)
-
-JCONFIG_NOWIN_COMMON_SUBSTITUTIONS = {
-    "LIBJPEG_TURBO_VERSION 0": "LIBJPEG_TURBO_VERSION 1.5.1",
-    "LIBJPEG_TURBO_VERSION_NUMBER 0": "LIBJPEG_TURBO_VERSION_NUMBER 1005001",
-    "#undef C_ARITH_CODING_SUPPORTED": "#define C_ARITH_CODING_SUPPORTED 1",
-    "#undef D_ARITH_CODING_SUPPORTED": "#define D_ARITH_CODING_SUPPORTED 1",
-    "#undef HAVE_LOCALE_H": "#define HAVE_LOCALE_H 1",
-    "#undef HAVE_STDDEF_H": "#define HAVE_STDDEF_H 1",
-    "#undef HAVE_STDLIB_H": "#define HAVE_STDLIB_H 1",
-    "#undef HAVE_UNSIGNED_CHAR": "#define HAVE_UNSIGNED_CHAR 1",
-    "#undef HAVE_UNSIGNED_SHORT": "#define HAVE_UNSIGNED_SHORT 1",
-    "#undef INCOMPLETE_TYPES_BROKEN": "",
-    "#undef MEM_SRCDST_SUPPORTED": "#define MEM_SRCDST_SUPPORTED 1",
-    "#undef NEED_BSD_STRINGS": "",
-    "#undef NEED_SYS_TYPES_H": "#define NEED_SYS_TYPES_H 1",
-    "#undef __CHAR_UNSIGNED__": "",
-    "#undef const": "",
-    "#undef size_t": "",
-    "#undef RIGHT_SHIFT_IS_UNSIGNED": "",
-}
-
-JCONFIG_NOWIN_SIMD_SUBSTITUTIONS = {
-    "#undef WITH_SIMD": "#define WITH_SIMD 1",
-}
-
-JCONFIG_NOWIN_NOSIMD_SUBSTITUTIONS = {
-    "#undef WITH_SIMD": "",
-}
-
-JCONFIG_NOWIN_SIMD_SUBSTITUTIONS.update(JCONFIG_NOWIN_COMMON_SUBSTITUTIONS)
-
-JCONFIG_NOWIN_NOSIMD_SUBSTITUTIONS.update(JCONFIG_NOWIN_COMMON_SUBSTITUTIONS)
-
-template_rule(
-    name = "jconfig_nowin_nosimd",
-    src = "jconfig.h.in",
-    out = "jconfig_nowin_nosimd.h",
-    substitutions = JCONFIG_NOWIN_NOSIMD_SUBSTITUTIONS,
-)
-
-template_rule(
-    name = "jconfig_nowin_simd",
-    src = "jconfig.h.in",
-    out = "jconfig_nowin_simd.h",
-    substitutions = JCONFIG_NOWIN_SIMD_SUBSTITUTIONS,
-)
-
-template_rule(
-    name = "jconfigint_nowin",
-    src = "jconfigint.h.in",
-    out = "jconfigint_nowin.h",
-    substitutions = {
-        "#undef BUILD": "#define BUILD \"20161115\"",
-        "#undef inline": "",
-        "#undef INLINE": "#define INLINE inline __attribute__((always_inline))",
-        "#undef PACKAGE_NAME": "#define PACKAGE_NAME \"libjpeg-turbo\"",
-        "#undef VERSION": "#define VERSION \"1.5.1\"",
-        "#undef SIZEOF_SIZE_T": "#if (__WORDSIZE==64 && !defined(__native_client__))\n" +
-                                "#define SIZEOF_SIZE_T 8\n" +
-                                "#else\n" +
-                                "#define SIZEOF_SIZE_T 4\n" +
-                                "#endif\n",
-    },
-)
-
-genrule(
-    name = "configure",
-    srcs = [
-        "jconfig_win.h",
-        "jconfig_nowin_nosimd.h",
-        "jconfig_nowin_simd.h",
-    ],
-    outs = ["jconfig.h"],
-    cmd = select({
-        ":windows": "cp $(location jconfig_win.h) $@",
-        ":windows_msvc": "cp $(location jconfig_win.h) $@",
-        ":k8": "cp $(location jconfig_nowin_simd.h) $@",
-        ":armeabi-v7a": "cp $(location jconfig_nowin_simd.h) $@",
-        ":arm64-v8a": "cp $(location jconfig_nowin_simd.h) $@",
-        ":linux_ppc64le": "cp $(location jconfig_nowin_simd.h) $@",
-        "//conditions:default": "cp $(location jconfig_nowin_nosimd.h) $@",
-    }),
-)
-
-genrule(
-    name = "configure_internal",
-    srcs = [
-        "jconfigint_win.h",
-        "jconfigint_nowin.h",
-    ],
-    outs = ["jconfigint.h"],
-    cmd = select({
-        ":windows": "cp $(location jconfigint_win.h) $@",
-        ":windows_msvc": "cp $(location jconfigint_win.h) $@",
-        "//conditions:default": "cp $(location jconfigint_nowin.h) $@",
-    }),
-)
-
-# jiminy cricket the way this file is generated is completely outrageous
-genrule(
-    name = "configure_simd",
-    outs = ["simd/jsimdcfg.inc"],
-    cmd = "cat <<'EOF' >$@\n" +
-          "%define DCTSIZE 8\n" +
-          "%define DCTSIZE2 64\n" +
-          "%define RGB_RED 0\n" +
-          "%define RGB_GREEN 1\n" +
-          "%define RGB_BLUE 2\n" +
-          "%define RGB_PIXELSIZE 3\n" +
-          "%define EXT_RGB_RED 0\n" +
-          "%define EXT_RGB_GREEN 1\n" +
-          "%define EXT_RGB_BLUE 2\n" +
-          "%define EXT_RGB_PIXELSIZE 3\n" +
-          "%define EXT_RGBX_RED 0\n" +
-          "%define EXT_RGBX_GREEN 1\n" +
-          "%define EXT_RGBX_BLUE 2\n" +
-          "%define EXT_RGBX_PIXELSIZE 4\n" +
-          "%define EXT_BGR_RED 2\n" +
-          "%define EXT_BGR_GREEN 1\n" +
-          "%define EXT_BGR_BLUE 0\n" +
-          "%define EXT_BGR_PIXELSIZE 3\n" +
-          "%define EXT_BGRX_RED 2\n" +
-          "%define EXT_BGRX_GREEN 1\n" +
-          "%define EXT_BGRX_BLUE 0\n" +
-          "%define EXT_BGRX_PIXELSIZE 4\n" +
-          "%define EXT_XBGR_RED 3\n" +
-          "%define EXT_XBGR_GREEN 2\n" +
-          "%define EXT_XBGR_BLUE 1\n" +
-          "%define EXT_XBGR_PIXELSIZE 4\n" +
-          "%define EXT_XRGB_RED 1\n" +
-          "%define EXT_XRGB_GREEN 2\n" +
-          "%define EXT_XRGB_BLUE 3\n" +
-          "%define EXT_XRGB_PIXELSIZE 4\n" +
-          "%define RGBX_FILLER_0XFF 1\n" +
-          "%define JSAMPLE byte ; unsigned char\n" +
-          "%define SIZEOF_JSAMPLE SIZEOF_BYTE ; sizeof(JSAMPLE)\n" +
-          "%define CENTERJSAMPLE 128\n" +
-          "%define JCOEF word ; short\n" +
-          "%define SIZEOF_JCOEF SIZEOF_WORD ; sizeof(JCOEF)\n" +
-          "%define JDIMENSION dword ; unsigned int\n" +
-          "%define SIZEOF_JDIMENSION SIZEOF_DWORD ; sizeof(JDIMENSION)\n" +
-          "%define JSAMPROW POINTER ; JSAMPLE * (jpeglib.h)\n" +
-          "%define JSAMPARRAY POINTER ; JSAMPROW * (jpeglib.h)\n" +
-          "%define JSAMPIMAGE POINTER ; JSAMPARRAY * (jpeglib.h)\n" +
-          "%define JCOEFPTR POINTER ; JCOEF * (jpeglib.h)\n" +
-          "%define SIZEOF_JSAMPROW SIZEOF_POINTER ; sizeof(JSAMPROW)\n" +
-          "%define SIZEOF_JSAMPARRAY SIZEOF_POINTER ; sizeof(JSAMPARRAY)\n" +
-          "%define SIZEOF_JSAMPIMAGE SIZEOF_POINTER ; sizeof(JSAMPIMAGE)\n" +
-          "%define SIZEOF_JCOEFPTR SIZEOF_POINTER ; sizeof(JCOEFPTR)\n" +
-          "%define DCTELEM word ; short\n" +
-          "%define SIZEOF_DCTELEM SIZEOF_WORD ; sizeof(DCTELEM)\n" +
-          "%define float FP32 ; float\n" +
-          "%define SIZEOF_FAST_FLOAT SIZEOF_FP32 ; sizeof(float)\n" +
-          "%define ISLOW_MULT_TYPE word ; must be short\n" +
-          "%define SIZEOF_ISLOW_MULT_TYPE SIZEOF_WORD ; sizeof(ISLOW_MULT_TYPE)\n" +
-          "%define IFAST_MULT_TYPE word ; must be short\n" +
-          "%define SIZEOF_IFAST_MULT_TYPE SIZEOF_WORD ; sizeof(IFAST_MULT_TYPE)\n" +
-          "%define IFAST_SCALE_BITS 2 ; fractional bits in scale factors\n" +
-          "%define FLOAT_MULT_TYPE FP32 ; must be float\n" +
-          "%define SIZEOF_FLOAT_MULT_TYPE SIZEOF_FP32 ; sizeof(FLOAT_MULT_TYPE)\n" +
-          "%define JSIMD_NONE 0x00\n" +
-          "%define JSIMD_MMX 0x01\n" +
-          "%define JSIMD_3DNOW 0x02\n" +
-          "%define JSIMD_SSE 0x04\n" +
-          "%define JSIMD_SSE2 0x08\n" +
-          "EOF",
-)
-
-config_setting(
-    name = "k8",
-    values = {"cpu": "k8"},
-)
-
-config_setting(
-    name = "android",
-    values = {"crosstool_top": "//external:android/crosstool"},
-)
-
-config_setting(
-    name = "armeabi-v7a",
-    values = {"cpu": "armeabi-v7a"},
-)
-
-config_setting(
-    name = "arm64-v8a",
-    values = {"cpu": "arm64-v8a"},
-)
-
-config_setting(
-    name = "windows",
-    values = {"cpu": "x64_windows"},
-)
-
-config_setting(
-    name = "windows_msvc",
-    values = {"cpu": "x64_windows_msvc"},
-)
-
-config_setting(
-    name = "linux_ppc64le",
-    values = {"cpu": "ppc"},
-)
diff --git a/third_party/jsoncpp.BUILD b/third_party/jsoncpp.BUILD
deleted file mode 100644
index 65f9841..0000000
--- a/third_party/jsoncpp.BUILD
+++ /dev/null
@@ -1,34 +0,0 @@
-licenses(["unencumbered"])  # Public Domain or MIT
-
-exports_files(["LICENSE"])
-
-cc_library(
-    name = "jsoncpp",
-    srcs = [
-        "include/json/assertions.h",
-        "src/lib_json/json_batchallocator.h",
-        "src/lib_json/json_reader.cpp",
-        "src/lib_json/json_tool.h",
-        "src/lib_json/json_value.cpp",
-        "src/lib_json/json_writer.cpp",
-    ],
-    hdrs = [
-        "include/json/autolink.h",
-        "include/json/config.h",
-        "include/json/features.h",
-        "include/json/forwards.h",
-        "include/json/json.h",
-        "include/json/reader.h",
-        "include/json/value.h",
-        "include/json/writer.h",
-    ],
-    copts = ["-DJSON_USE_EXCEPTION=0"],
-    includes = ["include"],
-    visibility = ["//visibility:public"],
-    deps = [":private"],
-)
-
-cc_library(
-    name = "private",
-    textual_hdrs = ["src/lib_json/json_valueiterator.inl"],
-)
diff --git a/third_party/kafka/BUILD b/third_party/kafka/BUILD
deleted file mode 100644
index a839ca7..0000000
--- a/third_party/kafka/BUILD
+++ /dev/null
@@ -1,152 +0,0 @@
-# Description:
-#   Kafka C/C++ (librdkafka) client library
-
-licenses(["notice"])  # 2-clause BSD license
-
-exports_files(["LICENSE"])
-
-cc_library(
-    name = "kafka",
-    srcs = [
-        "config.h",
-        "src-cpp/ConfImpl.cpp",
-        "src-cpp/ConsumerImpl.cpp",
-        "src-cpp/HandleImpl.cpp",
-        "src-cpp/KafkaConsumerImpl.cpp",
-        "src-cpp/MessageImpl.cpp",
-        "src-cpp/MetadataImpl.cpp",
-        "src-cpp/QueueImpl.cpp",
-        "src-cpp/RdKafka.cpp",
-        "src-cpp/TopicImpl.cpp",
-        "src-cpp/TopicPartitionImpl.cpp",
-        "src/crc32c.c",
-        "src/crc32c.h",
-        "src/lz4.c",
-        "src/lz4.h",
-        "src/lz4frame.c",
-        "src/lz4frame.h",
-        "src/lz4frame_static.h",
-        "src/lz4hc.c",
-        "src/lz4hc.h",
-        "src/lz4opt.h",
-        "src/queue.h",
-        "src/rd.h",
-        "src/rdaddr.c",
-        "src/rdaddr.h",
-        "src/rdatomic.h",
-        "src/rdavg.h",
-        "src/rdavl.c",
-        "src/rdavl.h",
-        "src/rdbuf.c",
-        "src/rdbuf.h",
-        "src/rdcrc32.h",
-        "src/rddl.h",
-        "src/rdendian.h",
-        "src/rdgz.c",
-        "src/rdgz.h",
-        "src/rdinterval.h",
-        "src/rdkafka.c",
-        "src/rdkafka.h",
-        "src/rdkafka_assignor.c",
-        "src/rdkafka_assignor.h",
-        "src/rdkafka_broker.c",
-        "src/rdkafka_broker.h",
-        "src/rdkafka_buf.c",
-        "src/rdkafka_buf.h",
-        "src/rdkafka_cgrp.c",
-        "src/rdkafka_cgrp.h",
-        "src/rdkafka_conf.c",
-        "src/rdkafka_conf.h",
-        "src/rdkafka_event.h",
-        "src/rdkafka_feature.c",
-        "src/rdkafka_feature.h",
-        "src/rdkafka_int.h",
-        "src/rdkafka_interceptor.c",
-        "src/rdkafka_interceptor.h",
-        "src/rdkafka_lz4.c",
-        "src/rdkafka_lz4.h",
-        "src/rdkafka_metadata.c",
-        "src/rdkafka_metadata.h",
-        "src/rdkafka_metadata_cache.c",
-        "src/rdkafka_msg.c",
-        "src/rdkafka_msg.h",
-        "src/rdkafka_msgset.h",
-        "src/rdkafka_msgset_reader.c",
-        "src/rdkafka_msgset_writer.c",
-        "src/rdkafka_offset.c",
-        "src/rdkafka_offset.h",
-        "src/rdkafka_op.c",
-        "src/rdkafka_op.h",
-        "src/rdkafka_partition.c",
-        "src/rdkafka_partition.h",
-        "src/rdkafka_pattern.c",
-        "src/rdkafka_pattern.h",
-        "src/rdkafka_proto.h",
-        "src/rdkafka_queue.c",
-        "src/rdkafka_queue.h",
-        "src/rdkafka_range_assignor.c",
-        "src/rdkafka_request.c",
-        "src/rdkafka_request.h",
-        "src/rdkafka_roundrobin_assignor.c",
-        "src/rdkafka_sasl.c",
-        "src/rdkafka_sasl.h",
-        "src/rdkafka_sasl_int.h",
-        "src/rdkafka_sasl_plain.c",
-        "src/rdkafka_subscription.c",
-        "src/rdkafka_subscription.h",
-        "src/rdkafka_timer.c",
-        "src/rdkafka_timer.h",
-        "src/rdkafka_topic.c",
-        "src/rdkafka_topic.h",
-        "src/rdkafka_transport.c",
-        "src/rdkafka_transport.h",
-        "src/rdkafka_transport_int.h",
-        "src/rdlist.c",
-        "src/rdlist.h",
-        "src/rdlog.c",
-        "src/rdlog.h",
-        "src/rdports.c",
-        "src/rdports.h",
-        "src/rdposix.h",
-        "src/rdrand.c",
-        "src/rdrand.h",
-        "src/rdregex.c",
-        "src/rdregex.h",
-        "src/rdstring.c",
-        "src/rdstring.h",
-        "src/rdsysqueue.h",
-        "src/rdtime.h",
-        "src/rdtypes.h",
-        "src/rdunittest.c",
-        "src/rdunittest.h",
-        "src/rdvarint.c",
-        "src/rdvarint.h",
-        "src/snappy.c",
-        "src/snappy.h",
-        "src/tinycthread.c",
-        "src/tinycthread.h",
-        "src/xxhash.c",
-        "src/xxhash.h",
-    ],
-    hdrs = [
-        "config.h",
-        "src-cpp/rdkafkacpp.h",
-        "src-cpp/rdkafkacpp_int.h",
-        "src/lz4.c",
-        "src/snappy_compat.h",
-    ],
-    copts = [
-        "-Iexternal/kafka/src",
-        "-Iexternal/kafka/src-cpp",
-    ],
-    defines = [
-    ],
-    linkopts = [
-        "-lpthread",
-    ],
-    visibility = ["//visibility:public"],
-    deps = [
-        "@boringssl//:ssl",
-        "@zlib_archive//:zlib",
-    ],
-)
diff --git a/third_party/kafka/config.patch b/third_party/kafka/config.patch
deleted file mode 100644
index fa5c2d3..0000000
--- a/third_party/kafka/config.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -Naur a/config.h b/config.h
---- a/config.h	1970-01-01 00:00:00.000000000 +0000
-+++ b/config.h	2017-10-28 00:57:03.316957390 +0000
-@@ -0,0 +1,40 @@
-+#pragma once
-+#define WITHOUT_OPTIMIZATION 0
-+#define ENABLE_DEVEL 0
-+#define ENABLE_REFCNT_DEBUG 0
-+#define ENABLE_SHAREDPTR_DEBUG 0
-+
-+#define HAVE_ATOMICS_32 1
-+#define HAVE_ATOMICS_32_SYNC 1
-+
-+#if (HAVE_ATOMICS_32)
-+# if (HAVE_ATOMICS_32_SYNC)
-+#  define ATOMIC_OP32(OP1,OP2,PTR,VAL) __sync_ ## OP1 ## _and_ ## OP2(PTR, VAL)
-+# else
-+#  define ATOMIC_OP32(OP1,OP2,PTR,VAL) __atomic_ ## OP1 ## _ ## OP2(PTR, VAL, __ATOMIC_SEQ_CST)
-+# endif
-+#endif
-+
-+#define HAVE_ATOMICS_64 1
-+#define HAVE_ATOMICS_64_SYNC 1
-+
-+#if (HAVE_ATOMICS_64)
-+# if (HAVE_ATOMICS_64_SYNC)
-+#  define ATOMIC_OP64(OP1,OP2,PTR,VAL) __sync_ ## OP1 ## _and_ ## OP2(PTR, VAL)
-+# else
-+#  define ATOMIC_OP64(OP1,OP2,PTR,VAL) __atomic_ ## OP1 ## _ ## OP2(PTR, VAL, __ATOMIC_SEQ_CST)
-+# endif
-+#endif
-+
-+
-+#define WITH_ZLIB 1
-+#define WITH_LIBDL 1
-+#define WITH_PLUGINS 0
-+#define WITH_SNAPPY 1
-+#define WITH_SOCKEM 1
-+#define WITH_SSL 1
-+#define WITH_SASL 0
-+#define WITH_SASL_SCRAM 0
-+#define WITH_SASL_CYRUS 0
-+#define HAVE_REGEX 1
-+#define HAVE_STRNDUP 1
diff --git a/third_party/libxsmm.BUILD b/third_party/libxsmm.BUILD
deleted file mode 100644
index 4124f2d..0000000
--- a/third_party/libxsmm.BUILD
+++ /dev/null
@@ -1,136 +0,0 @@
-# Description:
-#    LIBXSMM: Library for small matrix-matrix multiplications targeting Intel Architecture (x86).
-
-licenses(["notice"])  # BSD 3-clause
-
-exports_files(["LICENSE"])
-
-# Arguments to ./scripts/libxsmm_interface.py, see that file for detailed description.
-#  precision: SP & DP
-#  prefetch: 1 (auto)
-libxsmm_interface_arguments = "0 1"
-
-# Arguments to ./scripts/libxsmm_config.py, see that file for detailed description.
-# rely on default arguments
-libxsmm_config_arguments = ""
-
-# Arguments to ./scripts/libxsmm_dispatch.py, see that file for detailed description.
-#  (dummy argument)
-libxsmm_dispatch_arguments = "0"
-
-genrule(
-    name = "libxsmm_headers",
-    srcs = [
-        "src/template/libxsmm.h",
-        "src/template/libxsmm_config.h",
-    ],
-    outs = [
-        "include/libxsmm.h",
-        "include/libxsmm_config.h",
-        "include/libxsmm_dispatch.h",
-    ],
-    cmd = "$(location :libxsmm_interface) $(location src/template/libxsmm.h) " + libxsmm_interface_arguments + " > $(location include/libxsmm.h);" +
-          "$(location :libxsmm_config) $(location src/template/libxsmm_config.h) " + libxsmm_config_arguments + " > $(location include/libxsmm_config.h);" +
-          "$(location :libxsmm_dispatch) " + libxsmm_dispatch_arguments + " > $(location include/libxsmm_dispatch.h)",
-    tools = [
-        ":libxsmm_config",
-        ":libxsmm_dispatch",
-        ":libxsmm_interface",
-    ],
-    visibility = [
-        "//tensorflow/core/kernels:__pkg__",
-        "//third_party/eigen3:__pkg__",
-    ],
-)
-
-cc_library(
-    name = "xsmm_avx",
-    srcs = [
-        "src/libxsmm_cpuid_x86.c",
-        "src/libxsmm_dnn.c",
-        "src/libxsmm_dnn_convolution_backward.c",
-        "src/libxsmm_dnn_convolution_forward.c",
-        "src/libxsmm_dnn_convolution_weight_update.c",
-        "src/libxsmm_dnn_convolution_winograd_backward.c",
-        "src/libxsmm_dnn_convolution_winograd_forward.c",
-        "src/libxsmm_dnn_convolution_winograd_weight_update.c",
-        "src/libxsmm_dnn_handle.c",
-        "src/libxsmm_dump.c",
-        "src/libxsmm_ext_gemm.c",
-        "src/libxsmm_ext_trans.c",
-        "src/libxsmm_fsspmdm.c",
-        "src/libxsmm_gemm.c",
-        "src/libxsmm_main.c",
-        "src/libxsmm_malloc.c",
-        "src/libxsmm_perf.c",
-        "src/libxsmm_spmdm.c",
-        "src/libxsmm_sync.c",
-        "src/libxsmm_timer.c",
-        "src/libxsmm_trace.c",
-        "src/libxsmm_trans.c",
-    ] + glob([
-        "src/generator_*.c",
-    ]),
-    hdrs = [
-        "include/libxsmm_cpuid.h",
-        "include/libxsmm_dnn.h",
-        "include/libxsmm_frontend.h",
-        "include/libxsmm_fsspmdm.h",
-        "include/libxsmm_generator.h",
-        "include/libxsmm_intrinsics_x86.h",
-        "include/libxsmm_macros.h",
-        "include/libxsmm_malloc.h",
-        "include/libxsmm_spmdm.h",
-        "include/libxsmm_sync.h",
-        "include/libxsmm_timer.h",
-        "include/libxsmm_typedefs.h",
-        # Source files #included internally:
-        "src/libxsmm_gemm_diff.c",
-        "src/libxsmm_hash.c",
-        # Generated:
-        "include/libxsmm.h",
-        "include/libxsmm_config.h",
-        "include/libxsmm_dispatch.h",
-    ] + glob([
-        # trigger rebuild if template changed
-        "src/template/*.c",
-    ]),
-    copts = [
-        "-mavx",  # JIT does not work without avx anyway, and this silences some CRC32 warnings.
-        "-Wno-vla",  # Libxsmm convolutions heavily use VLA.
-    ],
-    defines = [
-        "LIBXSMM_BUILD",
-        "__BLAS=0",
-    ],
-    includes = [
-        "include",
-        "src",
-        "src/template",
-    ],
-    visibility = ["//visibility:public"],
-)
-
-py_library(
-    name = "libxsmm_scripts",
-    srcs = glob(["scripts/*.py"]),
-    data = ["version.txt"],
-)
-
-py_binary(
-    name = "libxsmm_interface",
-    srcs = ["scripts/libxsmm_interface.py"],
-    deps = [":libxsmm_scripts"],
-)
-
-py_binary(
-    name = "libxsmm_config",
-    srcs = ["scripts/libxsmm_config.py"],
-    deps = [":libxsmm_scripts"],
-)
-
-py_binary(
-    name = "libxsmm_dispatch",
-    srcs = ["scripts/libxsmm_dispatch.py"],
-    deps = [":libxsmm_scripts"],
-)
diff --git a/third_party/linenoise.BUILD b/third_party/linenoise.BUILD
deleted file mode 100644
index 9924a62..0000000
--- a/third_party/linenoise.BUILD
+++ /dev/null
@@ -1,13 +0,0 @@
-licenses(["notice"])  # 2-clause BSD
-
-exports_files(["LICENSE"])
-
-package(
-    default_visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "linenoise",
-    srcs = ["linenoise.c"],
-    hdrs = ["linenoise.h"],
-)
diff --git a/third_party/llvm/BUILD b/third_party/llvm/BUILD
deleted file mode 100644
index 0a9fd6b..0000000
--- a/third_party/llvm/BUILD
+++ /dev/null
@@ -1,8 +0,0 @@
-licenses(["notice"])
-
-py_binary(
-    name = "expand_cmake_vars",
-    srcs = ["expand_cmake_vars.py"],
-    srcs_version = "PY2AND3",
-    visibility = ["@llvm//:__subpackages__"],
-)
diff --git a/third_party/llvm/expand_cmake_vars.py b/third_party/llvm/expand_cmake_vars.py
deleted file mode 100644
index ffc6a25..0000000
--- a/third_party/llvm/expand_cmake_vars.py
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ==============================================================================
-
-"""Expands CMake variables in a text file."""
-
-from __future__ import absolute_import
-from __future__ import division
-from __future__ import print_function
-
-import re
-import sys
-
-_CMAKE_DEFINE_REGEX = re.compile(r"\s*#cmakedefine\s+([A-Za-z_0-9]*)(\s.*)?$")
-_CMAKE_DEFINE01_REGEX = re.compile(r"\s*#cmakedefine01\s+([A-Za-z_0-9]*)")
-_CMAKE_VAR_REGEX = re.compile(r"\${([A-Za-z_0-9]*)}")
-
-
-def _parse_args(argv):
-  """Parses arguments with the form KEY=VALUE into a dictionary."""
-  result = {}
-  for arg in argv:
-    k, v = arg.split("=")
-    result[k] = v
-  return result
-
-
-def _expand_variables(input_str, cmake_vars):
-  """Expands ${VARIABLE}s in 'input_str', using dictionary 'cmake_vars'.
-
-  Args:
-    input_str: the string containing ${VARIABLE} expressions to expand.
-    cmake_vars: a dictionary mapping variable names to their values.
-
-  Returns:
-    The expanded string.
-  """
-  def replace(match):
-    if match.group(1) in cmake_vars:
-      return cmake_vars[match.group(1)]
-    return ""
-  return _CMAKE_VAR_REGEX.sub(replace, input_str)
-
-
-def _expand_cmakedefines(line, cmake_vars):
-  """Expands #cmakedefine declarations, using a dictionary 'cmake_vars'."""
-
-  # Handles #cmakedefine lines
-  match = _CMAKE_DEFINE_REGEX.match(line)
-  if match:
-    name = match.group(1)
-    suffix = match.group(2) or ""
-    if name in cmake_vars:
-      return "#define {}{}\n".format(name,
-                                     _expand_variables(suffix, cmake_vars))
-    else:
-      return "/* #undef {} */\n".format(name)
-
-  # Handles #cmakedefine01 lines
-  match = _CMAKE_DEFINE01_REGEX.match(line)
-  if match:
-    name = match.group(1)
-    value = cmake_vars.get(name, "0")
-    return "#define {} {}\n".format(name, value)
-
-  # Otherwise return the line unchanged.
-  return _expand_variables(line, cmake_vars)
-
-
-def main():
-  cmake_vars = _parse_args(sys.argv[1:])
-  for line in sys.stdin:
-    sys.stdout.write(_expand_cmakedefines(line, cmake_vars))
-
-
-if __name__ == "__main__":
-  main()
diff --git a/third_party/llvm/llvm.BUILD b/third_party/llvm/llvm.BUILD
deleted file mode 100644
index 35a1ce3..0000000
--- a/third_party/llvm/llvm.BUILD
+++ /dev/null
@@ -1,2286 +0,0 @@
-# Bazel BUILD file for LLVM.
-#
-# This BUILD file is auto-generated; do not edit!
-
-licenses(["notice"])
-
-exports_files(["LICENSE.TXT"])
-
-load(
-    "@org_tensorflow//third_party/llvm:llvm.bzl",
-    "gentbl",
-    "expand_cmake_vars",
-    "llvm_target_cmake_vars",
-    "cmake_var_string",
-)
-load(
-    "@org_tensorflow//third_party:common.bzl",
-    "template_rule",
-)
-
-package(default_visibility = ["//visibility:public"])
-
-llvm_host_triple = "x86_64-unknown-linux_gnu"
-
-llvm_targets = [
-    "AArch64",
-    # Uncomment to enable the AMDGPU backend.
-    # TODO(phawkins): use a configure-time test.
-    # "AMDGPU",
-    "ARM",
-    "NVPTX",
-    "PowerPC",
-    "X86",
-]
-
-llvm_target_asm_parsers = llvm_targets
-
-llvm_target_asm_printers = llvm_targets
-
-llvm_target_disassemblers = llvm_targets
-
-# TODO(phawkins): the set of CMake variables was hardcoded for expediency.
-# However, we should really detect many of these via configure-time tests.
-
-# The set of CMake variables common to all targets.
-cmake_vars = {
-    # Headers
-    "HAVE_DIRENT_H": 1,
-    "HAVE_DLFCN_H": 1,
-    "HAVE_ERRNO_H": 1,
-    "HAVE_EXECINFO_H": 1,
-    "HAVE_FCNTL_H": 1,
-    "HAVE_INTTYPES_H": 1,
-    "HAVE_PTHREAD_H": 1,
-    "HAVE_SIGNAL_H": 1,
-    "HAVE_STDINT_H": 1,
-    "HAVE_SYS_IOCTL_H": 1,
-    "HAVE_SYS_MMAN_H": 1,
-    "HAVE_SYS_PARAM_H": 1,
-    "HAVE_SYS_RESOURCE_H": 1,
-    "HAVE_SYS_STAT_H": 1,
-    "HAVE_SYS_TIME_H": 1,
-    "HAVE_SYS_TYPES_H": 1,
-    "HAVE_TERMIOS_H": 1,
-    "HAVE_UNISTD_H": 1,
-    "HAVE_ZLIB_H": 1,
-
-    # Features
-    "HAVE_BACKTRACE": 1,
-    "BACKTRACE_HEADER": "execinfo.h",
-    "HAVE_DLOPEN": 1,
-    "HAVE_FUTIMES": 1,
-    "HAVE_GETCWD": 1,
-    "HAVE_GETPAGESIZE": 1,
-    "HAVE_GETRLIMIT": 1,
-    "HAVE_GETRUSAGE": 1,
-    "HAVE_GETTIMEOFDAY": 1,
-    "HAVE_INT64_T": 1,
-    "HAVE_ISATTY": 1,
-    "HAVE_LIBEDIT": 1,
-    "HAVE_LIBPTHREAD": 1,
-    "HAVE_LIBZ": 1,
-    "HAVE_MKDTEMP": 1,
-    "HAVE_MKSTEMP": 1,
-    "HAVE_MKTEMP": 1,
-    "HAVE_PREAD": 1,
-    "HAVE_PTHREAD_GETSPECIFIC": 1,
-    "HAVE_PTHREAD_MUTEX_LOCK": 1,
-    "HAVE_PTHREAD_RWLOCK_INIT": 1,
-    "HAVE_REALPATH": 1,
-    "HAVE_SBRK": 1,
-    "HAVE_SETENV": 1,
-    "HAVE_SETRLIMIT": 1,
-    "HAVE_SIGALTSTACK": 1,
-    "HAVE_STRERROR": 1,
-    "HAVE_STRERROR_R": 1,
-    "HAVE_STRTOLL": 1,
-    "HAVE_SYSCONF": 1,
-    "HAVE_UINT64_T": 1,
-    "HAVE__UNWIND_BACKTRACE": 1,
-
-    # LLVM features
-    "ENABLE_BACKTRACES": 1,
-    "LLVM_BINDIR": "/dev/null",
-    "LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING": 0,
-    "LLVM_ENABLE_ABI_BREAKING_CHECKS": 0,
-    "LLVM_ENABLE_THREADS": 1,
-    "LLVM_ENABLE_ZLIB": 1,
-    "LLVM_HAS_ATOMICS": 1,
-    "LLVM_INCLUDEDIR": "/dev/null",
-    "LLVM_INFODIR": "/dev/null",
-    "LLVM_MANDIR": "/dev/null",
-    "LLVM_NATIVE_TARGET": 1,
-    "LLVM_NATIVE_TARGETINFO": 1,
-    "LLVM_NATIVE_TARGETMC": 1,
-    "LLVM_NATIVE_ASMPRINTER": 1,
-    "LLVM_NATIVE_ASMPARSER": 1,
-    "LLVM_NATIVE_DISASSEMBLER": 1,
-    "LLVM_ON_UNIX": 1,
-    "LLVM_PREFIX": "/dev/null",
-    "LLVM_VERSION_MAJOR": 0,
-    "LLVM_VERSION_MINOR": 0,
-    "LLVM_VERSION_PATCH": 0,
-    "LTDL_SHLIB_EXT": ".so",
-    "PACKAGE_NAME": "llvm",
-    "PACKAGE_STRING": "llvm tensorflow-trunk",
-    "PACKAGE_VERSION": "tensorflow-trunk",
-    "RETSIGTYPE": "void",
-}
-
-# CMake variables specific to the Linux platform
-linux_cmake_vars = {
-    "HAVE_MALLOC_H": 1,
-    "HAVE_LINK_H": 1,
-    "HAVE_MALLINFO": 1,
-    "HAVE_FUTIMENS": 1,
-}
-
-# CMake variables specific to the Darwin (Mac OS X) platform.
-darwin_cmake_vars = {
-    "HAVE_MALLOC_MALLOC_H": 1,
-}
-
-# Select a set of CMake variables based on the platform.
-# TODO(phawkins): use a better method to select the right host triple, rather
-# than hardcoding x86_64.
-all_cmake_vars = select({
-    "@org_tensorflow//tensorflow:darwin": cmake_var_string(
-        cmake_vars + llvm_target_cmake_vars("X86", "x86_64-apple-darwin") +
-        darwin_cmake_vars,
-    ),
-    "@org_tensorflow//tensorflow:linux_ppc64le": cmake_var_string(
-        cmake_vars +
-        llvm_target_cmake_vars("PowerPC", "powerpc64le-unknown-linux_gnu") +
-        linux_cmake_vars,
-    ),
-    "//conditions:default": cmake_var_string(
-        cmake_vars +
-        llvm_target_cmake_vars("X86", "x86_64-unknown-linux_gnu") +
-        linux_cmake_vars,
-    ),
-})
-
-# Performs CMake variable substitutions on configuration header files.
-expand_cmake_vars(
-    name = "config_gen",
-    src = "include/llvm/Config/config.h.cmake",
-    cmake_vars = all_cmake_vars,
-    dst = "include/llvm/Config/config.h",
-)
-
-expand_cmake_vars(
-    name = "llvm_config_gen",
-    src = "include/llvm/Config/llvm-config.h.cmake",
-    cmake_vars = all_cmake_vars,
-    dst = "include/llvm/Config/llvm-config.h",
-)
-
-expand_cmake_vars(
-    name = "abi_breaking_gen",
-    src = "include/llvm/Config/abi-breaking.h.cmake",
-    cmake_vars = all_cmake_vars,
-    dst = "include/llvm/Config/abi-breaking.h",
-)
-
-# Performs macro expansions on .def.in files
-template_rule(
-    name = "targets_def_gen",
-    src = "include/llvm/Config/Targets.def.in",
-    out = "include/llvm/Config/Targets.def",
-    substitutions = {
-        "@LLVM_ENUM_TARGETS@": "\n".join(
-            ["LLVM_TARGET({})".format(t) for t in llvm_targets],
-        ),
-    },
-)
-
-template_rule(
-    name = "asm_parsers_def_gen",
-    src = "include/llvm/Config/AsmParsers.def.in",
-    out = "include/llvm/Config/AsmParsers.def",
-    substitutions = {
-        "@LLVM_ENUM_ASM_PARSERS@": "\n".join(
-            ["LLVM_ASM_PARSER({})".format(t) for t in llvm_target_asm_parsers],
-        ),
-    },
-)
-
-template_rule(
-    name = "asm_printers_def_gen",
-    src = "include/llvm/Config/AsmPrinters.def.in",
-    out = "include/llvm/Config/AsmPrinters.def",
-    substitutions = {
-        "@LLVM_ENUM_ASM_PRINTERS@": "\n".join(
-            ["LLVM_ASM_PRINTER({})".format(t) for t in llvm_target_asm_printers],
-        ),
-    },
-)
-
-template_rule(
-    name = "disassemblers_def_gen",
-    src = "include/llvm/Config/Disassemblers.def.in",
-    out = "include/llvm/Config/Disassemblers.def",
-    substitutions = {
-        "@LLVM_ENUM_DISASSEMBLERS@": "\n".join(
-            ["LLVM_DISASSEMBLER({})".format(t) for t in llvm_target_disassemblers],
-        ),
-    },
-)
-
-# A common library that all LLVM targets depend on.
-cc_library(
-    name = "config",
-    hdrs = [
-        "include/llvm/Config/AsmParsers.def",
-        "include/llvm/Config/AsmPrinters.def",
-        "include/llvm/Config/Disassemblers.def",
-        "include/llvm/Config/Targets.def",
-        "include/llvm/Config/abi-breaking.h",
-        "include/llvm/Config/config.h",
-        "include/llvm/Config/llvm-config.h",
-    ],
-    defines = [
-        "LLVM_ENABLE_STATS",
-        "__STDC_LIMIT_MACROS",
-        "__STDC_CONSTANT_MACROS",
-        "__STDC_FORMAT_MACROS",
-        "_DEBUG",
-        "LLVM_BUILD_GLOBAL_ISEL",
-    ],
-    includes = ["include"],
-)
-
-# A creator of an empty file include/llvm/Support/VCSRevision.h.
-# This is usually populated by the upstream build infrastructure, but in this
-# case we leave it blank. See upstream revision r300160.
-genrule(
-    name = "vcs_revision_gen",
-    srcs = [],
-    outs = ["include/llvm/Support/VCSRevision.h"],
-    cmd = "echo '' > \"$@\"",
-)
-
-# Rules that apply the LLVM tblgen tool.
-gentbl(
-    name = "intrinsics_gen",
-    tbl_outs = [("-gen-intrinsic", "include/llvm/IR/Intrinsics.inc")],
-    tblgen = ":llvm-tblgen",
-    td_file = "include/llvm/IR/Intrinsics.td",
-    td_srcs = glob([
-        "include/llvm/CodeGen/*.td",
-        "include/llvm/IR/Intrinsics*.td",
-    ]),
-)
-
-gentbl(
-    name = "attributes_gen",
-    tbl_outs = [("-gen-attrs", "include/llvm/IR/Attributes.inc")],
-    tblgen = ":llvm-tblgen",
-    td_file = "include/llvm/IR/Attributes.td",
-    td_srcs = ["include/llvm/IR/Attributes.td"],
-)
-
-gentbl(
-    name = "attributes_compat_gen",
-    tbl_outs = [("-gen-attrs", "lib/IR/AttributesCompatFunc.inc")],
-    tblgen = ":llvm-tblgen",
-    td_file = "lib/IR/AttributesCompatFunc.td",
-    td_srcs = [
-        "lib/IR/AttributesCompatFunc.td",
-        "include/llvm/IR/Attributes.td",
-    ],
-)
-
-# Binary targets used by Tensorflow.
-cc_binary(
-    name = "llvm-tblgen",
-    srcs = glob([
-        "utils/TableGen/*.cpp",
-        "utils/TableGen/*.h",
-    ]),
-    linkopts = [
-        "-lm",
-        "-ldl",
-        "-lpthread",
-    ],
-    stamp = 0,
-    deps = [
-        ":config",
-        ":support",
-        ":table_gen",
-    ],
-)
-
-cc_binary(
-    name = "FileCheck",
-    testonly = 1,
-    srcs = glob([
-        "utils/FileCheck/*.cpp",
-        "utils/FileCheck/*.h",
-    ]),
-    linkopts = [
-        "-ldl",
-        "-lm",
-        "-lpthread",
-    ],
-    stamp = 0,
-    deps = [":support"],
-)
-
-llvm_target_list = [
-    {
-        "name": "AArch64",
-        "lower_name": "aarch64",
-        "short_name": "AArch64",
-        "tbl_outs": [
-            ("-gen-register-bank", "lib/Target/AArch64/AArch64GenRegisterBank.inc"),
-            ("-gen-register-info", "lib/Target/AArch64/AArch64GenRegisterInfo.inc"),
-            ("-gen-instr-info", "lib/Target/AArch64/AArch64GenInstrInfo.inc"),
-            ("-gen-emitter", "lib/Target/AArch64/AArch64GenMCCodeEmitter.inc"),
-            ("-gen-pseudo-lowering", "lib/Target/AArch64/AArch64GenMCPseudoLowering.inc"),
-            ("-gen-asm-writer", "lib/Target/AArch64/AArch64GenAsmWriter.inc"),
-            ("-gen-asm-writer -asmwriternum=1", "lib/Target/AArch64/AArch64GenAsmWriter1.inc"),
-            ("-gen-asm-matcher", "lib/Target/AArch64/AArch64GenAsmMatcher.inc"),
-            ("-gen-dag-isel", "lib/Target/AArch64/AArch64GenDAGISel.inc"),
-            ("-gen-fast-isel", "lib/Target/AArch64/AArch64GenFastISel.inc"),
-            ("-gen-global-isel", "lib/Target/AArch64/AArch64GenGlobalISel.inc"),
-            ("-gen-callingconv", "lib/Target/AArch64/AArch64GenCallingConv.inc"),
-            ("-gen-subtarget", "lib/Target/AArch64/AArch64GenSubtargetInfo.inc"),
-            ("-gen-disassembler", "lib/Target/AArch64/AArch64GenDisassemblerTables.inc"),
-            ("-gen-searchable-tables", "lib/Target/AArch64/AArch64GenSystemOperands.inc"),
-        ],
-    },
-    {
-        "name": "AMDGPU",
-        "lower_name": "amdgpu",
-        "short_name": "AMDGPU",
-        "tbl_outs": [
-            ("-gen-register-bank", "lib/Target/AMDGPU/AMDGPUGenRegisterBank.inc"),
-            ("-gen-register-info", "lib/Target/AMDGPU/AMDGPUGenRegisterInfo.inc"),
-            ("-gen-instr-info", "lib/Target/AMDGPU/AMDGPUGenInstrInfo.inc"),
-            ("-gen-dag-isel", "lib/Target/AMDGPU/AMDGPUGenDAGISel.inc"),
-            ("-gen-callingconv", "lib/Target/AMDGPU/AMDGPUGenCallingConv.inc"),
-            ("-gen-subtarget", "lib/Target/AMDGPU/AMDGPUGenSubtargetInfo.inc"),
-            ("-gen-tgt-intrinsic", "lib/Target/AMDGPU/AMDGPUGenIntrinsics.inc"),
-            ("-gen-emitter", "lib/Target/AMDGPU/AMDGPUGenMCCodeEmitter.inc"),
-            ("-gen-dfa-packetizer", "lib/Target/AMDGPU/AMDGPUGenDFAPacketizer.inc"),
-            ("-gen-asm-writer", "lib/Target/AMDGPU/AMDGPUGenAsmWriter.inc"),
-            ("-gen-asm-matcher", "lib/Target/AMDGPU/AMDGPUGenAsmMatcher.inc"),
-            ("-gen-disassembler", "lib/Target/AMDGPU/AMDGPUGenDisassemblerTables.inc"),
-            ("-gen-pseudo-lowering", "lib/Target/AMDGPU/AMDGPUGenMCPseudoLowering.inc"),
-        ],
-    },
-    {
-        "name": "ARM",
-        "lower_name": "arm",
-        "short_name": "ARM",
-        "tbl_outs": [
-            ("-gen-register-bank", "lib/Target/ARM/ARMGenRegisterBank.inc"),
-            ("-gen-register-info", "lib/Target/ARM/ARMGenRegisterInfo.inc"),
-            ("-gen-searchable-tables", "lib/Target/ARM/ARMGenSystemRegister.inc"),
-            ("-gen-instr-info", "lib/Target/ARM/ARMGenInstrInfo.inc"),
-            ("-gen-emitter", "lib/Target/ARM/ARMGenMCCodeEmitter.inc"),
-            ("-gen-pseudo-lowering", "lib/Target/ARM/ARMGenMCPseudoLowering.inc"),
-            ("-gen-asm-writer", "lib/Target/ARM/ARMGenAsmWriter.inc"),
-            ("-gen-asm-matcher", "lib/Target/ARM/ARMGenAsmMatcher.inc"),
-            ("-gen-dag-isel", "lib/Target/ARM/ARMGenDAGISel.inc"),
-            ("-gen-fast-isel", "lib/Target/ARM/ARMGenFastISel.inc"),
-            ("-gen-global-isel", "lib/Target/ARM/ARMGenGlobalISel.inc"),
-            ("-gen-callingconv", "lib/Target/ARM/ARMGenCallingConv.inc"),
-            ("-gen-subtarget", "lib/Target/ARM/ARMGenSubtargetInfo.inc"),
-            ("-gen-disassembler", "lib/Target/ARM/ARMGenDisassemblerTables.inc"),
-        ],
-    },
-    {
-        "name": "NVPTX",
-        "lower_name": "nvptx",
-        "short_name": "NVPTX",
-        "tbl_outs": [
-            ("-gen-register-info", "lib/Target/NVPTX/NVPTXGenRegisterInfo.inc"),
-            ("-gen-instr-info", "lib/Target/NVPTX/NVPTXGenInstrInfo.inc"),
-            ("-gen-asm-writer", "lib/Target/NVPTX/NVPTXGenAsmWriter.inc"),
-            ("-gen-dag-isel", "lib/Target/NVPTX/NVPTXGenDAGISel.inc"),
-            ("-gen-subtarget", "lib/Target/NVPTX/NVPTXGenSubtargetInfo.inc"),
-        ],
-    },
-    {
-        "name": "PowerPC",
-        "lower_name": "powerpc",
-        "short_name": "PPC",
-        "tbl_outs": [
-            ("-gen-asm-writer", "lib/Target/PowerPC/PPCGenAsmWriter.inc"),
-            ("-gen-asm-matcher", "lib/Target/PowerPC/PPCGenAsmMatcher.inc"),
-            ("-gen-emitter", "lib/Target/PowerPC/PPCGenMCCodeEmitter.inc"),
-            ("-gen-register-info", "lib/Target/PowerPC/PPCGenRegisterInfo.inc"),
-            ("-gen-instr-info", "lib/Target/PowerPC/PPCGenInstrInfo.inc"),
-            ("-gen-dag-isel", "lib/Target/PowerPC/PPCGenDAGISel.inc"),
-            ("-gen-fast-isel", "lib/Target/PowerPC/PPCGenFastISel.inc"),
-            ("-gen-callingconv", "lib/Target/PowerPC/PPCGenCallingConv.inc"),
-            ("-gen-subtarget", "lib/Target/PowerPC/PPCGenSubtargetInfo.inc"),
-            ("-gen-disassembler", "lib/Target/PowerPC/PPCGenDisassemblerTables.inc"),
-        ],
-    },
-    {
-        "name": "X86",
-        "lower_name": "x86",
-        "short_name": "X86",
-        "tbl_outs": [
-            ("-gen-register-bank", "lib/Target/X86/X86GenRegisterBank.inc"),
-            ("-gen-register-info", "lib/Target/X86/X86GenRegisterInfo.inc"),
-            ("-gen-disassembler", "lib/Target/X86/X86GenDisassemblerTables.inc"),
-            ("-gen-instr-info", "lib/Target/X86/X86GenInstrInfo.inc"),
-            ("-gen-asm-writer", "lib/Target/X86/X86GenAsmWriter.inc"),
-            ("-gen-asm-writer -asmwriternum=1", "lib/Target/X86/X86GenAsmWriter1.inc"),
-            ("-gen-asm-matcher", "lib/Target/X86/X86GenAsmMatcher.inc"),
-            ("-gen-dag-isel", "lib/Target/X86/X86GenDAGISel.inc"),
-            ("-gen-fast-isel", "lib/Target/X86/X86GenFastISel.inc"),
-            ("-gen-global-isel", "lib/Target/X86/X86GenGlobalISel.inc"),
-            ("-gen-callingconv", "lib/Target/X86/X86GenCallingConv.inc"),
-            ("-gen-subtarget", "lib/Target/X86/X86GenSubtargetInfo.inc"),
-            ("-gen-x86-EVEX2VEX-tables", "lib/Target/X86/X86GenEVEX2VEXTables.inc"),
-        ],
-    },
-]
-
-[
-    gentbl(
-        name = target["lower_name"] + "_target_gen",
-        tbl_outs = target["tbl_outs"],
-        tblgen = ":llvm-tblgen",
-        td_file = ("lib/Target/" + target["name"] + "/" + target["short_name"] +
-                   ".td"),
-        td_srcs = glob([
-            "lib/Target/" + target["name"] + "/*.td",
-            "include/llvm/CodeGen/*.td",
-            "include/llvm/IR/Intrinsics*.td",
-            "include/llvm/TableGen/*.td",
-            "include/llvm/Target/*.td",
-            "include/llvm/Target/GlobalISel/*.td",
-        ]),
-    )
-    for target in llvm_target_list
-]
-
-# This target is used to provide *.def files to x86_code_gen.
-# Files with '.def' extension are not allowed in 'srcs' of 'cc_library' rule.
-cc_library(
-    name = "x86_defs",
-    hdrs = glob([
-        "lib/Target/X86/*.def",
-    ]),
-    visibility = ["//visibility:private"],
-)
-
-# This filegroup provides the docker build script in LLVM repo
-filegroup(
-    name = "docker",
-    srcs = glob([
-        "utils/docker/build_docker_image.sh",
-    ]),
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "aarch64_asm_parser",
-    srcs = glob([
-        "lib/Target/AArch64/AsmParser/*.c",
-        "lib/Target/AArch64/AsmParser/*.cpp",
-        "lib/Target/AArch64/AsmParser/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/AArch64/AsmParser/*.h",
-        "include/llvm/Target/AArch64/AsmParser/*.def",
-        "include/llvm/Target/AArch64/AsmParser/*.inc",
-        "lib/Target/AArch64/AsmParser/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/AArch64"],
-    deps = [
-        ":aarch64_desc",
-        ":aarch64_info",
-        ":aarch64_utils",
-        ":config",
-        ":mc",
-        ":mc_parser",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "aarch64_asm_printer",
-    srcs = glob([
-        "lib/Target/AArch64/InstPrinter/*.c",
-        "lib/Target/AArch64/InstPrinter/*.cpp",
-        "lib/Target/AArch64/InstPrinter/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/AArch64/InstPrinter/*.h",
-        "include/llvm/Target/AArch64/InstPrinter/*.def",
-        "include/llvm/Target/AArch64/InstPrinter/*.inc",
-        "lib/Target/AArch64/InstPrinter/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/AArch64"],
-    deps = [
-        ":aarch64_target_gen",
-        ":aarch64_utils",
-        ":config",
-        ":mc",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "aarch64_code_gen",
-    srcs = glob([
-        "lib/Target/AArch64/*.c",
-        "lib/Target/AArch64/*.cpp",
-        "lib/Target/AArch64/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/AArch64/*.h",
-        "include/llvm/Target/AArch64/*.def",
-        "include/llvm/Target/AArch64/*.inc",
-        "lib/Target/AArch64/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/AArch64"],
-    deps = [
-        ":aarch64_asm_printer",
-        ":aarch64_desc",
-        ":aarch64_info",
-        ":aarch64_utils",
-        ":analysis",
-        ":asm_printer",
-        ":code_gen",
-        ":config",
-        ":core",
-        ":global_i_sel",
-        ":mc",
-        ":scalar",
-        ":selection_dag",
-        ":support",
-        ":target",
-    ],
-)
-
-cc_library(
-    name = "aarch64_desc",
-    srcs = glob([
-        "lib/Target/AArch64/MCTargetDesc/*.c",
-        "lib/Target/AArch64/MCTargetDesc/*.cpp",
-        "lib/Target/AArch64/MCTargetDesc/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/AArch64/MCTargetDesc/*.h",
-        "include/llvm/Target/AArch64/MCTargetDesc/*.def",
-        "include/llvm/Target/AArch64/MCTargetDesc/*.inc",
-        "lib/Target/AArch64/MCTargetDesc/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/AArch64"],
-    deps = [
-        ":aarch64_asm_printer",
-        ":aarch64_info",
-        ":aarch64_target_gen",
-        ":attributes_gen",
-        ":config",
-        ":intrinsics_gen",
-        ":mc",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "aarch64_disassembler",
-    srcs = glob([
-        "lib/Target/AArch64/Disassembler/*.c",
-        "lib/Target/AArch64/Disassembler/*.cpp",
-        "lib/Target/AArch64/Disassembler/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/AArch64/Disassembler/*.h",
-        "include/llvm/Target/AArch64/Disassembler/*.def",
-        "include/llvm/Target/AArch64/Disassembler/*.inc",
-        "lib/Target/AArch64/Disassembler/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/AArch64"],
-    deps = [
-        ":aarch64_desc",
-        ":aarch64_info",
-        ":aarch64_utils",
-        ":config",
-        ":mc",
-        ":mc_disassembler",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "aarch64_info",
-    srcs = glob([
-        "lib/Target/AArch64/TargetInfo/*.c",
-        "lib/Target/AArch64/TargetInfo/*.cpp",
-        "lib/Target/AArch64/TargetInfo/*.inc",
-        "lib/Target/AArch64/MCTargetDesc/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/AArch64/TargetInfo/*.h",
-        "include/llvm/Target/AArch64/TargetInfo/*.def",
-        "include/llvm/Target/AArch64/TargetInfo/*.inc",
-        "lib/Target/AArch64/*.def",
-        "lib/Target/AArch64/AArch64*.h",
-        "lib/Target/AArch64/TargetInfo/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/AArch64"],
-    deps = [
-        ":code_gen",
-        ":config",
-        ":support",
-        ":target",
-    ],
-)
-
-cc_library(
-    name = "aarch64_utils",
-    srcs = glob([
-        "lib/Target/AArch64/Utils/*.c",
-        "lib/Target/AArch64/Utils/*.cpp",
-        "lib/Target/AArch64/Utils/*.inc",
-        "lib/Target/AArch64/MCTargetDesc/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/AArch64/Utils/*.h",
-        "include/llvm/Target/AArch64/Utils/*.def",
-        "include/llvm/Target/AArch64/Utils/*.inc",
-        "lib/Target/AArch64/Utils/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/AArch64"],
-    deps = [
-        ":aarch64_target_gen",
-        ":config",
-        ":mc",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "aggressive_inst_combine",
-    srcs = glob([
-        "lib/Transforms/AggressiveInstCombine/*.c",
-        "lib/Transforms/AggressiveInstCombine/*.cpp",
-        "lib/Transforms/AggressiveInstCombine/*.inc",
-        "lib/Transforms/AggressiveInstCombine/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Transforms/AggressiveInstCombine/*.h",
-        "include/llvm/Transforms/AggressiveInstCombine/*.def",
-        "include/llvm/Transforms/AggressiveInstCombine/*.inc",
-    ]),
-    deps = [
-        ":analysis",
-        ":config",
-        ":core",
-        ":support",
-        ":transform_utils",
-    ],
-)
-
-cc_library(
-    name = "analysis",
-    srcs = glob([
-        "lib/Analysis/*.c",
-        "lib/Analysis/*.cpp",
-        "lib/Analysis/*.inc",
-        "include/llvm/Transforms/Utils/Local.h",
-        "include/llvm/Transforms/Scalar.h",
-        "lib/Analysis/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Analysis/*.h",
-        "include/llvm/Analysis/*.def",
-        "include/llvm/Analysis/*.inc",
-    ]),
-    deps = [
-        ":binary_format",
-        ":config",
-        ":core",
-        ":object",
-        ":profile_data",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "amdgpu_desc",
-    srcs = glob([
-        "lib/Target/AMDGPU/MCTargetDesc/*.c",
-        "lib/Target/AMDGPU/MCTargetDesc/*.cpp",
-        "lib/Target/AMDGPU/MCTargetDesc/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/AMDGPU/MCTargetDesc/*.h",
-        "include/llvm/Target/AMDGPU/MCTargetDesc/*.def",
-        "include/llvm/Target/AMDGPU/MCTargetDesc/*.inc",
-        "lib/Target/AMDGPU/MCTargetDesc/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/AMDGPU"],
-    deps = [
-        ":amdgpu_asm_printer",
-        ":amdgpu_info",
-        ":amdgpu_utils",
-        ":config",
-        ":core",
-        ":mc",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "amdgpu_disassembler",
-    srcs = glob([
-        "lib/Target/AMDGPU/Disassembler/*.c",
-        "lib/Target/AMDGPU/Disassembler/*.cpp",
-        "lib/Target/AMDGPU/Disassembler/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/AMDGPU/Disassembler/*.h",
-        "include/llvm/Target/AMDGPU/Disassembler/*.def",
-        "include/llvm/Target/AMDGPU/Disassembler/*.inc",
-        "lib/Target/AMDGPU/Disassembler/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/AMDGPU"],
-    deps = [
-        ":amdgpu_desc",
-        ":amdgpu_info",
-        ":amdgpu_utils",
-        ":config",
-        ":mc",
-        ":mc_disassembler",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "amdgpu_info",
-    srcs = glob([
-        "lib/Target/AMDGPU/TargetInfo/*.c",
-        "lib/Target/AMDGPU/TargetInfo/*.cpp",
-        "lib/Target/AMDGPU/TargetInfo/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/AMDGPU/TargetInfo/*.h",
-        "include/llvm/Target/AMDGPU/TargetInfo/*.def",
-        "include/llvm/Target/AMDGPU/TargetInfo/*.inc",
-        "lib/Target/AMDGPU/TargetInfo/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/AMDGPU"],
-    deps = [
-        ":amdgpu_target_gen",
-        ":config",
-        ":core",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "amdgpu_utils",
-    srcs = glob([
-        "lib/Target/AMDGPU/Utils/*.c",
-        "lib/Target/AMDGPU/Utils/*.cpp",
-        "lib/Target/AMDGPU/Utils/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/AMDGPU/Utils/*.h",
-        "include/llvm/Target/AMDGPU/Utils/*.def",
-        "include/llvm/Target/AMDGPU/Utils/*.inc",
-        "lib/Target/AMDGPU/Utils/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/AMDGPU"],
-    deps = [
-        ":amdgpu_target_gen",
-        ":config",
-        ":core",
-        ":mc",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "amdgpu_asm_parser",
-    srcs = glob([
-        "lib/Target/AMDGPU/AsmParser/*.c",
-        "lib/Target/AMDGPU/AsmParser/*.cpp",
-        "lib/Target/AMDGPU/AsmParser/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/AMDGPU/AsmParser/*.h",
-        "include/llvm/Target/AMDGPU/AsmParser/*.def",
-        "include/llvm/Target/AMDGPU/AsmParser/*.inc",
-        "lib/Target/AMDGPU/AsmParser/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/AMDGPU"],
-    deps = [
-        ":amdgpu_desc",
-        ":amdgpu_info",
-        ":amdgpu_utils",
-        ":config",
-        ":mc",
-        ":mc_parser",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "amdgpu_asm_printer",
-    srcs = glob([
-        "lib/Target/AMDGPU/InstPrinter/*.c",
-        "lib/Target/AMDGPU/InstPrinter/*.cpp",
-        "lib/Target/AMDGPU/InstPrinter/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/AMDGPU/InstPrinter/*.h",
-        "include/llvm/Target/AMDGPU/InstPrinter/*.def",
-        "include/llvm/Target/AMDGPU/InstPrinter/*.inc",
-        "lib/Target/AMDGPU/InstPrinter/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/AMDGPU"],
-    deps = [
-        ":amdgpu_utils",
-        ":config",
-        ":mc",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "amdgpu_code_gen",
-    srcs = glob([
-        "lib/Target/AMDGPU/*.c",
-        "lib/Target/AMDGPU/*.cpp",
-        "lib/Target/AMDGPU/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/AMDGPU/*.h",
-        "include/llvm/Target/AMDGPU/*.def",
-        "include/llvm/Target/AMDGPU/*.inc",
-        "lib/Target/AMDGPU/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/AMDGPU"],
-    deps = [
-        ":amdgpu_asm_printer",
-        ":amdgpu_desc",
-        ":amdgpu_info",
-        ":amdgpu_utils",
-        ":analysis",
-        ":asm_printer",
-        ":code_gen",
-        ":config",
-        ":core",
-        ":global_i_sel",
-        ":ipo",
-        ":mc",
-        ":scalar",
-        ":selection_dag",
-        ":support",
-        ":target",
-        ":transform_utils",
-        ":vectorize",
-    ],
-)
-
-cc_library(
-    name = "arm_asm_parser",
-    srcs = glob([
-        "lib/Target/ARM/AsmParser/*.c",
-        "lib/Target/ARM/AsmParser/*.cpp",
-        "lib/Target/ARM/AsmParser/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/ARM/AsmParser/*.h",
-        "include/llvm/Target/ARM/AsmParser/*.def",
-        "include/llvm/Target/ARM/AsmParser/*.inc",
-        "lib/Target/ARM/AsmParser/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/ARM"],
-    deps = [
-        ":arm_desc",
-        ":arm_info",
-        ":arm_utils",
-        ":config",
-        ":mc",
-        ":mc_parser",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "arm_asm_printer",
-    srcs = glob([
-        "lib/Target/ARM/InstPrinter/*.c",
-        "lib/Target/ARM/InstPrinter/*.cpp",
-        "lib/Target/ARM/InstPrinter/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/ARM/InstPrinter/*.h",
-        "include/llvm/Target/ARM/InstPrinter/*.def",
-        "include/llvm/Target/ARM/InstPrinter/*.inc",
-        "lib/Target/ARM/*.h",
-        "lib/Target/ARM/InstPrinter/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/ARM"],
-    deps = [
-        ":arm_info",
-        ":arm_target_gen",
-        ":arm_utils",
-        ":config",
-        ":mc",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "arm_code_gen",
-    srcs = glob([
-        "lib/Target/ARM/*.c",
-        "lib/Target/ARM/*.cpp",
-        "lib/Target/ARM/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/ARM/*.h",
-        "include/llvm/Target/ARM/*.def",
-        "include/llvm/Target/ARM/*.inc",
-        "lib/Target/ARM/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/ARM"],
-    deps = [
-        ":analysis",
-        ":arm_asm_printer",
-        ":arm_desc",
-        ":arm_info",
-        ":arm_utils",
-        ":asm_printer",
-        ":code_gen",
-        ":config",
-        ":core",
-        ":global_i_sel",
-        ":mc",
-        ":scalar",
-        ":selection_dag",
-        ":support",
-        ":target",
-    ],
-)
-
-cc_library(
-    name = "arm_desc",
-    srcs = glob([
-        "lib/Target/ARM/MCTargetDesc/*.c",
-        "lib/Target/ARM/MCTargetDesc/*.cpp",
-        "lib/Target/ARM/MCTargetDesc/*.inc",
-        "lib/Target/ARM/*.h",
-        "include/llvm/CodeGen/GlobalISel/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/ARM/MCTargetDesc/*.h",
-        "include/llvm/Target/ARM/MCTargetDesc/*.def",
-        "include/llvm/Target/ARM/MCTargetDesc/*.inc",
-        "lib/Target/ARM/MCTargetDesc/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/ARM"],
-    deps = [
-        ":arm_asm_printer",
-        ":arm_info",
-        ":arm_target_gen",
-        ":attributes_gen",
-        ":config",
-        ":intrinsics_gen",
-        ":mc",
-        ":mc_disassembler",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "arm_disassembler",
-    srcs = glob([
-        "lib/Target/ARM/Disassembler/*.c",
-        "lib/Target/ARM/Disassembler/*.cpp",
-        "lib/Target/ARM/Disassembler/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/ARM/Disassembler/*.h",
-        "include/llvm/Target/ARM/Disassembler/*.def",
-        "include/llvm/Target/ARM/Disassembler/*.inc",
-        "lib/Target/ARM/Disassembler/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/ARM"],
-    deps = [
-        ":arm_desc",
-        ":arm_info",
-        ":arm_utils",
-        ":config",
-        ":mc_disassembler",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "arm_info",
-    srcs = glob([
-        "lib/Target/ARM/TargetInfo/*.c",
-        "lib/Target/ARM/TargetInfo/*.cpp",
-        "lib/Target/ARM/TargetInfo/*.inc",
-        "lib/Target/ARM/MCTargetDesc/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/ARM/TargetInfo/*.h",
-        "include/llvm/Target/ARM/TargetInfo/*.def",
-        "include/llvm/Target/ARM/TargetInfo/*.inc",
-        "lib/Target/ARM/TargetInfo/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/ARM"],
-    deps = [
-        ":arm_target_gen",
-        ":config",
-        ":support",
-        ":target",
-    ],
-)
-
-cc_library(
-    name = "arm_utils",
-    srcs = glob([
-        "lib/Target/ARM/Utils/*.c",
-        "lib/Target/ARM/Utils/*.cpp",
-        "lib/Target/ARM/Utils/*.inc",
-        "lib/Target/ARM/MCTargetDesc/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/ARM/Utils/*.h",
-        "include/llvm/Target/ARM/Utils/*.def",
-        "include/llvm/Target/ARM/Utils/*.inc",
-        "lib/Target/ARM/Utils/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/ARM"],
-    deps = [
-        ":arm_target_gen",
-        ":config",
-        ":mc",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "asm_parser",
-    srcs = glob([
-        "lib/AsmParser/*.c",
-        "lib/AsmParser/*.cpp",
-        "lib/AsmParser/*.inc",
-        "lib/AsmParser/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/AsmParser/*.h",
-        "include/llvm/AsmParser/*.def",
-        "include/llvm/AsmParser/*.inc",
-    ]),
-    deps = [
-        ":binary_format",
-        ":config",
-        ":core",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "asm_printer",
-    srcs = glob([
-        "lib/CodeGen/AsmPrinter/*.c",
-        "lib/CodeGen/AsmPrinter/*.cpp",
-        "lib/CodeGen/AsmPrinter/*.inc",
-        "lib/CodeGen/AsmPrinter/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/CodeGen/AsmPrinter/*.h",
-        "include/llvm/CodeGen/AsmPrinter/*.def",
-        "include/llvm/CodeGen/AsmPrinter/*.inc",
-        "lib/CodeGen/AsmPrinter/*.def",
-    ]),
-    deps = [
-        ":analysis",
-        ":binary_format",
-        ":code_gen",
-        ":config",
-        ":core",
-        ":debug_info_code_view",
-        ":debug_info_msf",
-        ":mc",
-        ":mc_parser",
-        ":support",
-        ":target",
-    ],
-)
-
-cc_library(
-    name = "binary_format",
-    srcs = glob([
-        "lib/BinaryFormat/*.c",
-        "lib/BinaryFormat/*.cpp",
-        "lib/BinaryFormat/*.inc",
-        "lib/BinaryFormat/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/BinaryFormat/*.h",
-        "include/llvm/BinaryFormat/*.def",
-        "include/llvm/BinaryFormat/*.inc",
-        "include/llvm/BinaryFormat/ELFRelocs/*.def",
-        "include/llvm/BinaryFormat/WasmRelocs/*.def",
-    ]),
-    deps = [
-        ":config",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "bit_reader",
-    srcs = glob([
-        "lib/Bitcode/Reader/*.c",
-        "lib/Bitcode/Reader/*.cpp",
-        "lib/Bitcode/Reader/*.inc",
-        "lib/Bitcode/Reader/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Bitcode/Reader/*.h",
-        "include/llvm/Bitcode/Reader/*.def",
-        "include/llvm/Bitcode/Reader/*.inc",
-        "include/llvm/Bitcode/BitstreamReader.h",
-    ]),
-    deps = [
-        ":config",
-        ":core",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "bit_writer",
-    srcs = glob([
-        "lib/Bitcode/Writer/*.c",
-        "lib/Bitcode/Writer/*.cpp",
-        "lib/Bitcode/Writer/*.inc",
-        "lib/Bitcode/Writer/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Bitcode/Writer/*.h",
-        "include/llvm/Bitcode/Writer/*.def",
-        "include/llvm/Bitcode/Writer/*.inc",
-        "include/llvm/Bitcode/BitcodeWriter.h",
-        "include/llvm/Bitcode/BitcodeWriterPass.h",
-        "include/llvm/Bitcode/BitstreamWriter.h",
-    ]),
-    deps = [
-        ":analysis",
-        ":config",
-        ":core",
-        ":mc",
-        ":object",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "code_gen",
-    srcs = glob([
-        "lib/CodeGen/*.c",
-        "lib/CodeGen/*.cpp",
-        "lib/CodeGen/*.inc",
-        "lib/CodeGen/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/CodeGen/*.h",
-        "include/llvm/CodeGen/*.def",
-        "include/llvm/CodeGen/*.inc",
-        "include/llvm/CodeGen/**/*.h",
-    ]),
-    deps = [
-        ":analysis",
-        ":bit_reader",
-        ":bit_writer",
-        ":config",
-        ":core",
-        ":instrumentation",
-        ":mc",
-        ":profile_data",
-        ":scalar",
-        ":support",
-        ":target",
-        ":transform_utils",
-    ],
-)
-
-cc_library(
-    name = "core",
-    srcs = glob([
-        "lib/IR/*.c",
-        "lib/IR/*.cpp",
-        "lib/IR/*.inc",
-        "include/llvm/Analysis/*.h",
-        "include/llvm/Bitcode/BitcodeReader.h",
-        "include/llvm/Bitcode/BitCodes.h",
-        "include/llvm/Bitcode/LLVMBitCodes.h",
-        "include/llvm/CodeGen/MachineValueType.h",
-        "include/llvm/CodeGen/ValueTypes.h",
-        "lib/IR/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/IR/*.h",
-        "include/llvm/IR/*.def",
-        "include/llvm/IR/*.inc",
-        "include/llvm/*.h",
-        "include/llvm/Analysis/*.def",
-    ]),
-    deps = [
-        ":attributes_compat_gen",
-        ":attributes_gen",
-        ":binary_format",
-        ":config",
-        ":intrinsics_gen",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "debug_info_code_view",
-    srcs = glob([
-        "lib/DebugInfo/CodeView/*.c",
-        "lib/DebugInfo/CodeView/*.cpp",
-        "lib/DebugInfo/CodeView/*.inc",
-        "lib/DebugInfo/CodeView/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/DebugInfo/CodeView/*.h",
-        "include/llvm/DebugInfo/CodeView/*.def",
-        "include/llvm/DebugInfo/CodeView/*.inc",
-    ]),
-    deps = [
-        ":binary_format",
-        ":config",
-        ":debug_info_msf",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "debug_info_msf",
-    srcs = glob([
-        "lib/DebugInfo/MSF/*.c",
-        "lib/DebugInfo/MSF/*.cpp",
-        "lib/DebugInfo/MSF/*.inc",
-        "lib/DebugInfo/MSF/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/DebugInfo/MSF/*.h",
-        "include/llvm/DebugInfo/MSF/*.def",
-        "include/llvm/DebugInfo/MSF/*.inc",
-    ]),
-    deps = [
-        ":config",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "demangle",
-    srcs = glob([
-        "lib/Demangle/*.c",
-        "lib/Demangle/*.cpp",
-        "lib/Demangle/*.inc",
-        "lib/Demangle/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Demangle/*.h",
-        "include/llvm/Demangle/*.def",
-        "include/llvm/Demangle/*.inc",
-    ]),
-    deps = [":config"],
-)
-
-cc_library(
-    name = "execution_engine",
-    srcs = glob([
-        "lib/ExecutionEngine/*.c",
-        "lib/ExecutionEngine/*.cpp",
-        "lib/ExecutionEngine/*.inc",
-        "lib/ExecutionEngine/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/ExecutionEngine/*.h",
-        "include/llvm/ExecutionEngine/*.def",
-        "include/llvm/ExecutionEngine/*.inc",
-    ]),
-    deps = [
-        ":config",
-        ":core",
-        ":mc",
-        ":object",
-        ":runtime_dyld",
-        ":support",
-        ":target",
-    ],
-)
-
-cc_library(
-    name = "global_i_sel",
-    srcs = glob([
-        "lib/CodeGen/GlobalISel/*.c",
-        "lib/CodeGen/GlobalISel/*.cpp",
-        "lib/CodeGen/GlobalISel/*.inc",
-        "lib/CodeGen/GlobalISel/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/CodeGen/GlobalISel/*.h",
-        "include/llvm/CodeGen/GlobalISel/*.def",
-        "include/llvm/CodeGen/GlobalISel/*.inc",
-    ]),
-    deps = [
-        ":analysis",
-        ":code_gen",
-        ":config",
-        ":core",
-        ":mc",
-        ":support",
-        ":target",
-        ":transform_utils",
-    ],
-)
-
-cc_library(
-    name = "instrumentation",
-    srcs = glob([
-        "lib/Transforms/Instrumentation/*.c",
-        "lib/Transforms/Instrumentation/*.cpp",
-        "lib/Transforms/Instrumentation/*.inc",
-        "lib/Transforms/Instrumentation/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Transforms/Instrumentation/*.h",
-        "include/llvm/Transforms/Instrumentation/*.def",
-        "include/llvm/Transforms/Instrumentation/*.inc",
-        "include/llvm/Transforms/GCOVProfiler.h",
-        "include/llvm/Transforms/Instrumentation.h",
-        "include/llvm/Transforms/InstrProfiling.h",
-        "include/llvm/Transforms/PGOInstrumentation.h",
-    ]),
-    deps = [
-        ":analysis",
-        ":config",
-        ":core",
-        ":mc",
-        ":profile_data",
-        ":support",
-        ":transform_utils",
-    ],
-)
-
-cc_library(
-    name = "inst_combine",
-    srcs = glob([
-        "lib/Transforms/InstCombine/*.c",
-        "lib/Transforms/InstCombine/*.cpp",
-        "lib/Transforms/InstCombine/*.inc",
-        "lib/Transforms/InstCombine/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Transforms/InstCombine/*.h",
-        "include/llvm/Transforms/InstCombine/*.def",
-        "include/llvm/Transforms/InstCombine/*.inc",
-    ]),
-    deps = [
-        ":analysis",
-        ":config",
-        ":core",
-        ":support",
-        ":transform_utils",
-    ],
-)
-
-cc_library(
-    name = "ipo",
-    srcs = glob([
-        "lib/Transforms/IPO/*.c",
-        "lib/Transforms/IPO/*.cpp",
-        "lib/Transforms/IPO/*.inc",
-        "include/llvm/Transforms/SampleProfile.h",
-        "include/llvm-c/Transforms/IPO.h",
-        "include/llvm-c/Transforms/PassManagerBuilder.h",
-        "lib/Transforms/IPO/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Transforms/IPO/*.h",
-        "include/llvm/Transforms/IPO/*.def",
-        "include/llvm/Transforms/IPO/*.inc",
-    ]),
-    deps = [
-        ":aggressive_inst_combine",
-        ":analysis",
-        ":bit_reader",
-        ":bit_writer",
-        ":config",
-        ":core",
-        ":inst_combine",
-        ":instrumentation",
-        ":ir_reader",
-        ":linker",
-        ":object",
-        ":profile_data",
-        ":scalar",
-        ":support",
-        ":transform_utils",
-        ":vectorize",
-    ],
-)
-
-cc_library(
-    name = "ir_reader",
-    srcs = glob([
-        "lib/IRReader/*.c",
-        "lib/IRReader/*.cpp",
-        "lib/IRReader/*.inc",
-        "lib/IRReader/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/IRReader/*.h",
-        "include/llvm/IRReader/*.def",
-        "include/llvm/IRReader/*.inc",
-    ]),
-    deps = [
-        ":asm_parser",
-        ":bit_reader",
-        ":config",
-        ":core",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "linker",
-    srcs = glob([
-        "lib/Linker/*.c",
-        "lib/Linker/*.cpp",
-        "lib/Linker/*.inc",
-        "lib/Linker/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Linker/*.h",
-        "include/llvm/Linker/*.def",
-        "include/llvm/Linker/*.inc",
-    ]),
-    deps = [
-        ":config",
-        ":core",
-        ":support",
-        ":transform_utils",
-    ],
-)
-
-cc_library(
-    name = "mc",
-    srcs = glob([
-        "lib/MC/*.c",
-        "lib/MC/*.cpp",
-        "lib/MC/*.inc",
-        "lib/MC/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/MC/*.h",
-        "include/llvm/MC/*.def",
-        "include/llvm/MC/*.inc",
-    ]),
-    deps = [
-        ":binary_format",
-        ":config",
-        ":debug_info_code_view",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "mc_disassembler",
-    srcs = glob([
-        "lib/MC/MCDisassembler/*.c",
-        "lib/MC/MCDisassembler/*.cpp",
-        "lib/MC/MCDisassembler/*.inc",
-        "lib/MC/MCDisassembler/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/MC/MCDisassembler/*.h",
-        "include/llvm/MC/MCDisassembler/*.def",
-        "include/llvm/MC/MCDisassembler/*.inc",
-    ]),
-    deps = [
-        ":config",
-        ":mc",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "mc_parser",
-    srcs = glob([
-        "lib/MC/MCParser/*.c",
-        "lib/MC/MCParser/*.cpp",
-        "lib/MC/MCParser/*.inc",
-        "lib/MC/MCParser/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/MC/MCParser/*.h",
-        "include/llvm/MC/MCParser/*.def",
-        "include/llvm/MC/MCParser/*.inc",
-    ]),
-    deps = [
-        ":config",
-        ":mc",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "nvptx_asm_printer",
-    srcs = glob([
-        "lib/Target/NVPTX/InstPrinter/*.c",
-        "lib/Target/NVPTX/InstPrinter/*.cpp",
-        "lib/Target/NVPTX/InstPrinter/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/NVPTX/InstPrinter/*.h",
-        "include/llvm/Target/NVPTX/InstPrinter/*.def",
-        "include/llvm/Target/NVPTX/InstPrinter/*.inc",
-        "lib/Target/NVPTX/InstPrinter/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/NVPTX"],
-    deps = [
-        "nvptx_target_gen",
-        ":attributes_gen",
-        ":config",
-        ":mc",
-        ":nvptx_info",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "nvptx_code_gen",
-    srcs = glob([
-        "lib/Target/NVPTX/*.c",
-        "lib/Target/NVPTX/*.cpp",
-        "lib/Target/NVPTX/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/NVPTX/*.h",
-        "include/llvm/Target/NVPTX/*.def",
-        "include/llvm/Target/NVPTX/*.inc",
-        "lib/Target/NVPTX/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/NVPTX"],
-    deps = [
-        ":analysis",
-        ":asm_printer",
-        ":code_gen",
-        ":config",
-        ":core",
-        ":ipo",
-        ":mc",
-        ":nvptx_asm_printer",
-        ":nvptx_desc",
-        ":nvptx_info",
-        ":scalar",
-        ":selection_dag",
-        ":support",
-        ":target",
-        ":transform_utils",
-        ":vectorize",
-    ],
-)
-
-cc_library(
-    name = "nvptx_desc",
-    srcs = glob([
-        "lib/Target/NVPTX/MCTargetDesc/*.c",
-        "lib/Target/NVPTX/MCTargetDesc/*.cpp",
-        "lib/Target/NVPTX/MCTargetDesc/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/NVPTX/MCTargetDesc/*.h",
-        "include/llvm/Target/NVPTX/MCTargetDesc/*.def",
-        "include/llvm/Target/NVPTX/MCTargetDesc/*.inc",
-        "lib/Target/NVPTX/MCTargetDesc/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/NVPTX"],
-    deps = [
-        "nvptx_target_gen",
-        ":config",
-        ":mc",
-        ":nvptx_asm_printer",
-        ":nvptx_info",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "nvptx_info",
-    srcs = glob([
-        "lib/Target/NVPTX/TargetInfo/*.c",
-        "lib/Target/NVPTX/TargetInfo/*.cpp",
-        "lib/Target/NVPTX/TargetInfo/*.inc",
-        "lib/Target/NVPTX/MCTargetDesc/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/NVPTX/TargetInfo/*.h",
-        "include/llvm/Target/NVPTX/TargetInfo/*.def",
-        "include/llvm/Target/NVPTX/TargetInfo/*.inc",
-        "lib/Target/NVPTX/NVPTX.h",
-        "lib/Target/NVPTX/TargetInfo/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/NVPTX"],
-    deps = [
-        "nvptx_target_gen",
-        ":attributes_gen",
-        ":config",
-        ":core",
-        ":support",
-        ":target",
-    ],
-)
-
-cc_library(
-    name = "object",
-    srcs = glob([
-        "lib/Object/*.c",
-        "lib/Object/*.cpp",
-        "lib/Object/*.inc",
-        "lib/Object/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Object/*.h",
-        "include/llvm/Object/*.def",
-        "include/llvm/Object/*.inc",
-    ]),
-    deps = [
-        ":binary_format",
-        ":bit_reader",
-        ":config",
-        ":core",
-        ":mc",
-        ":mc_parser",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "objc_arc",
-    srcs = glob([
-        "lib/Transforms/ObjCARC/*.c",
-        "lib/Transforms/ObjCARC/*.cpp",
-        "lib/Transforms/ObjCARC/*.inc",
-        "include/llvm/Transforms/ObjCARC.h",
-        "lib/Transforms/ObjCARC/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Transforms/ObjCARC/*.h",
-        "include/llvm/Transforms/ObjCARC/*.def",
-        "include/llvm/Transforms/ObjCARC/*.inc",
-    ]),
-    deps = [
-        ":analysis",
-        ":config",
-        ":core",
-        ":support",
-        ":transform_utils",
-    ],
-)
-
-cc_library(
-    name = "orc_jit",
-    srcs = glob([
-        "lib/ExecutionEngine/Orc/*.c",
-        "lib/ExecutionEngine/Orc/*.cpp",
-        "lib/ExecutionEngine/Orc/*.inc",
-        "lib/ExecutionEngine/Orc/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/ExecutionEngine/Orc/*.h",
-        "include/llvm/ExecutionEngine/Orc/*.def",
-        "include/llvm/ExecutionEngine/Orc/*.inc",
-    ]),
-    deps = [
-        ":config",
-        ":core",
-        ":execution_engine",
-        ":object",
-        ":runtime_dyld",
-        ":support",
-        ":transform_utils",
-    ],
-)
-
-cc_library(
-    name = "powerpc_asm_parser",
-    srcs = glob([
-        "lib/Target/PowerPC/AsmParser/*.c",
-        "lib/Target/PowerPC/AsmParser/*.cpp",
-        "lib/Target/PowerPC/AsmParser/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/PowerPC/AsmParser/*.h",
-        "include/llvm/Target/PowerPC/AsmParser/*.def",
-        "include/llvm/Target/PowerPC/AsmParser/*.inc",
-        "lib/Target/PowerPC/AsmParser/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/PowerPC"],
-    deps = [
-        ":config",
-        ":mc",
-        ":mc_parser",
-        ":powerpc_desc",
-        ":powerpc_info",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "powerpc_asm_printer",
-    srcs = glob([
-        "lib/Target/PowerPC/InstPrinter/*.c",
-        "lib/Target/PowerPC/InstPrinter/*.cpp",
-        "lib/Target/PowerPC/InstPrinter/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/PowerPC/InstPrinter/*.h",
-        "include/llvm/Target/PowerPC/InstPrinter/*.def",
-        "include/llvm/Target/PowerPC/InstPrinter/*.inc",
-        "lib/Target/PowerPC/InstPrinter/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/PowerPC"],
-    deps = [
-        ":attributes_gen",
-        ":config",
-        ":intrinsics_gen",
-        ":mc",
-        ":powerpc_info",
-        ":powerpc_target_gen",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "powerpc_code_gen",
-    srcs = glob([
-        "lib/Target/PowerPC/*.c",
-        "lib/Target/PowerPC/*.cpp",
-        "lib/Target/PowerPC/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/PowerPC/*.h",
-        "include/llvm/Target/PowerPC/*.def",
-        "include/llvm/Target/PowerPC/*.inc",
-        "lib/Target/PowerPC/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/PowerPC"],
-    deps = [
-        ":analysis",
-        ":asm_printer",
-        ":code_gen",
-        ":config",
-        ":core",
-        ":mc",
-        ":powerpc_asm_printer",
-        ":powerpc_desc",
-        ":powerpc_info",
-        ":scalar",
-        ":selection_dag",
-        ":support",
-        ":target",
-        ":transform_utils",
-    ],
-)
-
-cc_library(
-    name = "powerpc_desc",
-    srcs = glob([
-        "lib/Target/PowerPC/MCTargetDesc/*.c",
-        "lib/Target/PowerPC/MCTargetDesc/*.cpp",
-        "lib/Target/PowerPC/MCTargetDesc/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/PowerPC/MCTargetDesc/*.h",
-        "include/llvm/Target/PowerPC/MCTargetDesc/*.def",
-        "include/llvm/Target/PowerPC/MCTargetDesc/*.inc",
-        "lib/Target/PowerPC/MCTargetDesc/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/PowerPC"],
-    deps = [
-        ":attributes_gen",
-        ":config",
-        ":intrinsics_gen",
-        ":mc",
-        ":powerpc_asm_printer",
-        ":powerpc_info",
-        ":powerpc_target_gen",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "powerpc_disassembler",
-    srcs = glob([
-        "lib/Target/PowerPC/Disassembler/*.c",
-        "lib/Target/PowerPC/Disassembler/*.cpp",
-        "lib/Target/PowerPC/Disassembler/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/PowerPC/Disassembler/*.h",
-        "include/llvm/Target/PowerPC/Disassembler/*.def",
-        "include/llvm/Target/PowerPC/Disassembler/*.inc",
-        "lib/Target/PowerPC/Disassembler/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/PowerPC"],
-    deps = [
-        ":config",
-        ":mc_disassembler",
-        ":powerpc_info",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "powerpc_info",
-    srcs = glob([
-        "lib/Target/PowerPC/TargetInfo/*.c",
-        "lib/Target/PowerPC/TargetInfo/*.cpp",
-        "lib/Target/PowerPC/TargetInfo/*.inc",
-        "lib/Target/PowerPC/MCTargetDesc/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/PowerPC/TargetInfo/*.h",
-        "include/llvm/Target/PowerPC/TargetInfo/*.def",
-        "include/llvm/Target/PowerPC/TargetInfo/*.inc",
-        "lib/Target/PowerPC/PPC*.h",
-        "lib/Target/PowerPC/TargetInfo/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/PowerPC"],
-    deps = [
-        ":attributes_gen",
-        ":config",
-        ":core",
-        ":intrinsics_gen",
-        ":powerpc_target_gen",
-        ":support",
-        ":target",
-    ],
-)
-
-cc_library(
-    name = "profile_data",
-    srcs = glob([
-        "lib/ProfileData/*.c",
-        "lib/ProfileData/*.cpp",
-        "lib/ProfileData/*.inc",
-        "lib/ProfileData/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/ProfileData/*.h",
-        "include/llvm/ProfileData/*.def",
-        "include/llvm/ProfileData/*.inc",
-    ]),
-    deps = [
-        ":config",
-        ":core",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "runtime_dyld",
-    srcs = glob([
-        "lib/ExecutionEngine/RuntimeDyld/*.c",
-        "lib/ExecutionEngine/RuntimeDyld/*.cpp",
-        "lib/ExecutionEngine/RuntimeDyld/*.inc",
-        "include/llvm/ExecutionEngine/JITSymbol.h",
-        "include/llvm/ExecutionEngine/RTDyldMemoryManager.h",
-        "lib/ExecutionEngine/RuntimeDyld/*.h",
-        "lib/ExecutionEngine/RuntimeDyld/Targets/*.h",
-        "lib/ExecutionEngine/RuntimeDyld/Targets/*.cpp",
-        "lib/ExecutionEngine/RuntimeDyld/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/ExecutionEngine/RuntimeDyld/*.h",
-        "include/llvm/ExecutionEngine/RuntimeDyld/*.def",
-        "include/llvm/ExecutionEngine/RuntimeDyld/*.inc",
-        "include/llvm/DebugInfo/DIContext.h",
-        "include/llvm/ExecutionEngine/RTDyldMemoryManager.h",
-        "include/llvm/ExecutionEngine/RuntimeDyld*.h",
-    ]),
-    deps = [
-        ":config",
-        ":mc",
-        ":mc_disassembler",
-        ":object",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "scalar",
-    srcs = glob([
-        "lib/Transforms/Scalar/*.c",
-        "lib/Transforms/Scalar/*.cpp",
-        "lib/Transforms/Scalar/*.inc",
-        "include/llvm-c/Transforms/Scalar.h",
-        "include/llvm/Transforms/Scalar.h",
-        "include/llvm/Target/TargetMachine.h",
-        "lib/Transforms/Scalar/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Transforms/Scalar/*.h",
-        "include/llvm/Transforms/Scalar/*.def",
-        "include/llvm/Transforms/Scalar/*.inc",
-        "include/llvm/Transforms/IPO.h",
-        "include/llvm/Transforms/IPO/SCCP.h",
-    ]),
-    deps = [
-        ":aggressive_inst_combine",
-        ":analysis",
-        ":config",
-        ":core",
-        ":inst_combine",
-        ":support",
-        ":target",
-        ":transform_utils",
-    ],
-)
-
-cc_library(
-    name = "selection_dag",
-    srcs = glob([
-        "lib/CodeGen/SelectionDAG/*.c",
-        "lib/CodeGen/SelectionDAG/*.cpp",
-        "lib/CodeGen/SelectionDAG/*.inc",
-        "lib/CodeGen/SelectionDAG/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/CodeGen/SelectionDAG/*.h",
-        "include/llvm/CodeGen/SelectionDAG/*.def",
-        "include/llvm/CodeGen/SelectionDAG/*.inc",
-    ]),
-    deps = [
-        ":analysis",
-        ":code_gen",
-        ":config",
-        ":core",
-        ":mc",
-        ":support",
-        ":target",
-        ":transform_utils",
-    ],
-)
-
-cc_library(
-    name = "support",
-    srcs = glob([
-        "lib/Support/*.c",
-        "lib/Support/*.cpp",
-        "lib/Support/*.inc",
-        "lib/Support/Unix/*.inc",
-        "lib/Support/Unix/*.h",
-        "include/llvm-c/*.h",
-        "include/llvm/CodeGen/MachineValueType.h",
-        "include/llvm/BinaryFormat/COFF.h",
-        "include/llvm/BinaryFormat/MachO.h",
-        "lib/Support/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Support/*.h",
-        "include/llvm/Support/*.def",
-        "include/llvm/Support/*.inc",
-        "include/llvm/ADT/*.h",
-        "include/llvm/Support/ELFRelocs/*.def",
-        "include/llvm/Support/WasmRelocs/*.def",
-    ]) + [
-        "include/llvm/BinaryFormat/MachO.def",
-        "include/llvm/Support/VCSRevision.h",
-    ],
-    deps = [
-        ":config",
-        ":demangle",
-        "@zlib_archive//:zlib",
-    ],
-)
-
-cc_library(
-    name = "table_gen",
-    srcs = glob([
-        "lib/TableGen/*.c",
-        "lib/TableGen/*.cpp",
-        "lib/TableGen/*.inc",
-        "include/llvm/CodeGen/*.h",
-        "lib/TableGen/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/TableGen/*.h",
-        "include/llvm/TableGen/*.def",
-        "include/llvm/TableGen/*.inc",
-        "include/llvm/Target/*.def",
-    ]),
-    deps = [
-        ":config",
-        ":mc",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "target",
-    srcs = glob([
-        "lib/Target/*.c",
-        "lib/Target/*.cpp",
-        "lib/Target/*.inc",
-        "include/llvm/CodeGen/*.h",
-        "include/llvm-c/Initialization.h",
-        "include/llvm-c/Target.h",
-        "lib/Target/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/*.h",
-        "include/llvm/Target/*.def",
-        "include/llvm/Target/*.inc",
-        "include/llvm/CodeGen/*.def",
-        "include/llvm/CodeGen/*.inc",
-    ]),
-    deps = [
-        ":analysis",
-        ":config",
-        ":core",
-        ":mc",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "transform_utils",
-    srcs = glob([
-        "lib/Transforms/Utils/*.c",
-        "lib/Transforms/Utils/*.cpp",
-        "lib/Transforms/Utils/*.inc",
-        "include/llvm/Transforms/IPO.h",
-        "include/llvm/Transforms/Scalar.h",
-        "lib/Transforms/Utils/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Transforms/Utils/*.h",
-        "include/llvm/Transforms/Utils/*.def",
-        "include/llvm/Transforms/Utils/*.inc",
-    ]),
-    deps = [
-        ":analysis",
-        ":config",
-        ":core",
-        ":support",
-    ],
-)
-
-cc_library(
-    name = "vectorize",
-    srcs = glob([
-        "lib/Transforms/Vectorize/*.c",
-        "lib/Transforms/Vectorize/*.cpp",
-        "lib/Transforms/Vectorize/*.inc",
-        "include/llvm-c/Transforms/Vectorize.h",
-        "lib/Transforms/Vectorize/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Transforms/Vectorize/*.h",
-        "include/llvm/Transforms/Vectorize/*.def",
-        "include/llvm/Transforms/Vectorize/*.inc",
-        "include/llvm/Transforms/Vectorize.h",
-    ]),
-    deps = [
-        ":analysis",
-        ":config",
-        ":core",
-        ":scalar",
-        ":support",
-        ":transform_utils",
-    ],
-)
-
-cc_library(
-    name = "x86_asm_parser",
-    srcs = glob([
-        "lib/Target/X86/AsmParser/*.c",
-        "lib/Target/X86/AsmParser/*.cpp",
-        "lib/Target/X86/AsmParser/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/X86/AsmParser/*.h",
-        "include/llvm/Target/X86/AsmParser/*.def",
-        "include/llvm/Target/X86/AsmParser/*.inc",
-        "lib/Target/X86/AsmParser/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/X86"],
-    deps = [
-        ":config",
-        ":mc",
-        ":mc_parser",
-        ":support",
-        ":x86_asm_printer",
-        ":x86_desc",
-        ":x86_info",
-    ],
-)
-
-cc_library(
-    name = "x86_asm_printer",
-    srcs = glob([
-        "lib/Target/X86/InstPrinter/*.c",
-        "lib/Target/X86/InstPrinter/*.cpp",
-        "lib/Target/X86/InstPrinter/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/X86/InstPrinter/*.h",
-        "include/llvm/Target/X86/InstPrinter/*.def",
-        "include/llvm/Target/X86/InstPrinter/*.inc",
-        "lib/Target/X86/InstPrinter/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/X86"],
-    deps = [
-        ":config",
-        ":mc",
-        ":support",
-        ":x86_info",
-        ":x86_target_gen",
-        ":x86_utils",
-    ],
-)
-
-cc_library(
-    name = "x86_code_gen",
-    srcs = glob([
-        "lib/Target/X86/*.c",
-        "lib/Target/X86/*.cpp",
-        "lib/Target/X86/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/X86/*.h",
-        "include/llvm/Target/X86/*.def",
-        "include/llvm/Target/X86/*.inc",
-        "lib/Target/X86/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/X86"],
-    deps = [
-        ":analysis",
-        ":asm_printer",
-        ":code_gen",
-        ":config",
-        ":core",
-        ":global_i_sel",
-        ":mc",
-        ":selection_dag",
-        ":support",
-        ":target",
-        ":x86_asm_printer",
-        ":x86_defs",
-        ":x86_desc",
-        ":x86_info",
-        ":x86_utils",
-    ],
-)
-
-cc_library(
-    name = "x86_desc",
-    srcs = glob([
-        "lib/Target/X86/MCTargetDesc/*.c",
-        "lib/Target/X86/MCTargetDesc/*.cpp",
-        "lib/Target/X86/MCTargetDesc/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/X86/MCTargetDesc/*.h",
-        "include/llvm/Target/X86/MCTargetDesc/*.def",
-        "include/llvm/Target/X86/MCTargetDesc/*.inc",
-        "lib/Target/X86/MCTargetDesc/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/X86"],
-    deps = [
-        ":config",
-        ":mc",
-        ":mc_disassembler",
-        ":object",
-        ":support",
-        ":x86_asm_printer",
-        ":x86_info",
-    ],
-)
-
-cc_library(
-    name = "x86_disassembler",
-    srcs = glob([
-        "lib/Target/X86/Disassembler/*.c",
-        "lib/Target/X86/Disassembler/*.cpp",
-        "lib/Target/X86/Disassembler/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/X86/Disassembler/*.h",
-        "include/llvm/Target/X86/Disassembler/*.def",
-        "include/llvm/Target/X86/Disassembler/*.inc",
-        "lib/Target/X86/Disassembler/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/X86"],
-    deps = [
-        ":config",
-        ":mc_disassembler",
-        ":support",
-        ":x86_info",
-    ],
-)
-
-cc_library(
-    name = "x86_info",
-    srcs = glob([
-        "lib/Target/X86/TargetInfo/*.c",
-        "lib/Target/X86/TargetInfo/*.cpp",
-        "lib/Target/X86/TargetInfo/*.inc",
-        "lib/Target/X86/MCTargetDesc/*.h",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/X86/TargetInfo/*.h",
-        "include/llvm/Target/X86/TargetInfo/*.def",
-        "include/llvm/Target/X86/TargetInfo/*.inc",
-        "lib/Target/X86/TargetInfo/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/X86"],
-    deps = [
-        ":config",
-        ":mc",
-        ":support",
-        ":x86_target_gen",
-    ],
-)
-
-cc_library(
-    name = "x86_utils",
-    srcs = glob([
-        "lib/Target/X86/Utils/*.c",
-        "lib/Target/X86/Utils/*.cpp",
-        "lib/Target/X86/Utils/*.inc",
-    ]),
-    hdrs = glob([
-        "include/llvm/Target/X86/Utils/*.h",
-        "include/llvm/Target/X86/Utils/*.def",
-        "include/llvm/Target/X86/Utils/*.inc",
-        "lib/Target/X86/Utils/*.h",
-    ]),
-    copts = ["-Iexternal/llvm/lib/Target/X86"],
-    deps = [
-        ":code_gen",
-        ":config",
-        ":core",
-        ":support",
-    ],
-)
diff --git a/third_party/llvm/llvm.bzl b/third_party/llvm/llvm.bzl
deleted file mode 100644
index 0efcf31..0000000
--- a/third_party/llvm/llvm.bzl
+++ /dev/null
@@ -1,107 +0,0 @@
-"""This file contains BUILD extensions for generating source code from LLVM's table definition files using the TableGen tool.
-
-See http://llvm.org/cmds/tblgen.html for more information on the TableGen
-tool.
-TODO(chandlerc): Currently this expresses include-based dependencies as
-"sources", and has no transitive understanding due to these files not being
-correctly understood by the build system.
-"""
-
-def gentbl(name, tblgen, td_file, td_srcs, tbl_outs, library = True, **kwargs):
-  """gentbl() generates tabular code from a table definition file.
-
-  Args:
-    name: The name of the build rule for use in dependencies.
-    tblgen: The binary used to produce the output.
-    td_file: The primary table definitions file.
-    td_srcs: A list of table definition files included transitively.
-    tbl_outs: A list of tuples (opts, out), where each opts is a string of
-      options passed to tblgen, and the out is the corresponding output file
-      produced.
-    library: Whether to bundle the generated files into a library.
-    **kwargs: Keyword arguments to pass to subsidiary cc_library() rule.
-  """
-  if td_file not in td_srcs:
-    td_srcs += [td_file]
-  includes = []
-  for (opts, out) in tbl_outs:
-    outdir = out[:out.rindex("/")]
-    if outdir not in includes:
-      includes.append(outdir)
-    rule_suffix = "_".join(opts.replace("-", "_").replace("=", "_").split(" "))
-    native.genrule(
-        name="%s_%s_genrule" % (name, rule_suffix),
-        srcs=td_srcs,
-        outs=[out],
-        tools=[tblgen],
-        message="Generating code from table: %s" % td_file,
-        cmd=(("$(location %s) " + "-I external/llvm/include " +
-              "-I external/llvm/tools/clang/include " +
-              "-I $$(dirname $(location %s)) " + "%s $(location %s) -o $@") % (
-                  tblgen, td_file, opts, td_file)))
-  # For now, all generated files can be assumed to comprise public interfaces.
-  # If this is not true, you should specify library = False
-  # and list the generated '.inc' files in "srcs".
-  if library:
-    native.cc_library(name=name, textual_hdrs=[f for (_, f) in tbl_outs],
-                      includes=includes,  **kwargs)
-
-def llvm_target_cmake_vars(native_arch, target_triple):
-  return {
-      "LLVM_HOST_TRIPLE": target_triple,
-      "LLVM_DEFAULT_TARGET_TRIPLE": target_triple,
-      "LLVM_NATIVE_ARCH": native_arch,
-  }
-
-def _quote(s):
-  """Quotes the given string for use in a shell command.
-
-  This function double-quotes the given string (in case it contains spaces or
-  other special characters) and escapes any special characters (dollar signs,
-  double-quotes, and backslashes) that may be present.
-
-  Args:
-    s: The string to quote.
-  Returns:
-    An escaped and quoted version of the string that can be passed to a shell
-    command.
-  """
-  return ('"' +
-          s.replace("\\", "\\\\").replace("$", "\\$").replace('"', '\\"') +
-          '"')
-
-def cmake_var_string(cmake_vars):
-  """Converts a dictionary to an input suitable for expand_cmake_vars.
-
-  Ideally we would jist stringify in the expand_cmake_vars() rule, but select()
-  interacts badly with genrules.
-
-  TODO(phawkins): replace the genrule() with native rule and delete this rule.
-
-  Args:
-    cmake_vars: a dictionary with string keys and values that are convertable to
-      strings.
-  """
-  return " ".join([_quote("{}={}".format(k, str(v)))
-                   for (k, v) in cmake_vars.items()])
-
-def expand_cmake_vars(name, src, dst, cmake_vars):
-  """Expands #cmakedefine, #cmakedefine01, and CMake variables in a text file.
-
-  Args:
-    name: the name of the rule
-    src: the input of the rule
-    dst: the output of the rule
-    cmake_vars: a string containing the CMake variables, as generated by
-      cmake_var_string.
-  """
-  expand_cmake_vars_tool = Label("@org_tensorflow//third_party/llvm:expand_cmake_vars")
-  native.genrule(
-      name = name,
-      srcs = [src],
-      tools = [expand_cmake_vars_tool],
-      outs = [dst],
-      cmd = ("$(location {}) ".format(expand_cmake_vars_tool) + cmake_vars +
-             "< $< > $@")
-  )
-
diff --git a/third_party/lmdb.BUILD b/third_party/lmdb.BUILD
deleted file mode 100644
index 9b3e1d9..0000000
--- a/third_party/lmdb.BUILD
+++ /dev/null
@@ -1,37 +0,0 @@
-# Description:
-#   LMDB is the Lightning Memory-mapped Database.
-
-licenses(["notice"])  # OpenLDAP Public License
-
-exports_files(["LICENSE"])
-
-cc_library(
-    name = "lmdb",
-    srcs = [
-        "mdb.c",
-        "midl.c",
-    ],
-    hdrs = [
-        "lmdb.h",
-        "midl.h",
-    ],
-    copts = [
-        "-w",
-    ],
-    linkopts = select({
-        ":windows": ["-DEFAULTLIB:advapi32.lib"],  # InitializeSecurityDescriptor, SetSecurityDescriptorDacl
-        ":windows_msvc": ["-DEFAULTLIB:advapi32.lib"],
-        "//conditions:default": ["-lpthread"],
-    }),
-    visibility = ["//visibility:public"],
-)
-
-config_setting(
-    name = "windows",
-    values = {"cpu": "x64_windows"},
-)
-
-config_setting(
-    name = "windows_msvc",
-    values = {"cpu": "x64_windows_msvc"},
-)
diff --git a/third_party/mkl/BUILD b/third_party/mkl/BUILD
deleted file mode 100644
index c2adf57..0000000
--- a/third_party/mkl/BUILD
+++ /dev/null
@@ -1,58 +0,0 @@
-licenses(["notice"])  # 3-Clause BSD
-
-config_setting(
-    name = "using_mkl",
-    values = {
-        "define": "using_mkl=true",
-    },
-    visibility = ["//visibility:public"],
-)
-
-config_setting(
-    name = "using_mkl_lnx_x64",
-    values = {
-        "cpu": "k8",
-        "define": "using_mkl=true",
-    },
-    visibility = ["//visibility:public"],
-)
-
-load(
-    "//third_party/mkl:build_defs.bzl",
-    "if_mkl",
-)
-
-filegroup(
-    name = "LICENSE",
-    srcs = ["MKL_LICENSE"] + select({
-        "@org_tensorflow//tensorflow:linux_x86_64": [
-            "@mkl_linux//:LICENSE",
-        ],
-        "@org_tensorflow//tensorflow:darwin": [
-            "@mkl_darwin//:LICENSE",
-        ],
-        "@org_tensorflow//tensorflow:windows": [
-            "@mkl_windows//:LICENSE",
-        ],
-    }),
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "intel_binary_blob",
-    visibility = ["//visibility:public"],
-    deps = select({
-        "@org_tensorflow//tensorflow:linux_x86_64": [
-            "@mkl_linux//:mkl_headers",
-            "@mkl_linux//:mkl_libs_linux",
-        ],
-        "@org_tensorflow//tensorflow:darwin": [
-            "@mkl_darwin//:mkl_headers",
-            "@mkl_darwin//:mkl_libs_darwin",
-        ],
-        "@org_tensorflow//tensorflow:windows": [
-            "@mkl_windows//:mkl_headers",
-            "@mkl_windows//:mkl_libs_windows",
-        ],
-    }),
-)
diff --git a/third_party/mkl/MKL_LICENSE b/third_party/mkl/MKL_LICENSE
deleted file mode 100644
index 9c8f3ea..0000000
--- a/third_party/mkl/MKL_LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "{}"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright {yyyy} {name of copyright owner}
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
\ No newline at end of file
diff --git a/third_party/mkl/build_defs.bzl b/third_party/mkl/build_defs.bzl
deleted file mode 100644
index 53e0276..0000000
--- a/third_party/mkl/build_defs.bzl
+++ /dev/null
@@ -1,79 +0,0 @@
-# -*- Python -*-
-"""Skylark macros for MKL.
-if_mkl is a conditional to check if MKL is enabled or not.
-
-mkl_repository is a repository rule for creating MKL repository rule that can
-be pointed to either a local folder, or download it from the internet.
-mkl_repository depends on the following environment variables:
-  * `TF_MKL_ROOT`: The root folder where a copy of libmkl is located.
-"""
-
-
-_TF_MKL_ROOT = "TF_MKL_ROOT"
-
-
-def if_mkl(if_true, if_false = []):
-    """Shorthand for select()'ing on whether we're building with MKL.
-
-    Returns a select statement which evaluates to if_true if we're building
-    with MKL enabled.  Otherwise, the select statement evaluates to if_false.
-
-    """
-    return select({
-        str(Label("//third_party/mkl:using_mkl")): if_true,
-        "//conditions:default": if_false
-    })
-
-def if_mkl_lnx_x64(if_true, if_false = []):
-    """Shorthand for select()'ing on whether we're building with MKL.
-
-    Returns a select statement which evaluates to if_true if we're building
-    with MKL enabled.  Otherwise, the select statement evaluates to if_false.
-
-    """
-    return select({
-        str(Label("//third_party/mkl:using_mkl_lnx_x64")): if_true,
-        "//conditions:default": if_false
-    })
-
-
-def _enable_local_mkl(repository_ctx):
-  return _TF_MKL_ROOT in repository_ctx.os.environ
-
-
-def _mkl_autoconf_impl(repository_ctx):
-  """Implementation of the local_mkl_autoconf repository rule."""
-
-  if _enable_local_mkl(repository_ctx):
-    # Symlink lib and include local folders.
-    mkl_root = repository_ctx.os.environ[_TF_MKL_ROOT]
-    mkl_lib_path = "%s/lib" % mkl_root
-    repository_ctx.symlink(mkl_lib_path, "lib")
-    mkl_include_path = "%s/include" % mkl_root
-    repository_ctx.symlink(mkl_include_path, "include")
-    mkl_license_path = "%s/license.txt" % mkl_root
-    repository_ctx.symlink(mkl_license_path, "license.txt")
-  else:
-    # setup remote mkl repository.
-    repository_ctx.download_and_extract(
-        repository_ctx.attr.urls,
-        sha256=repository_ctx.attr.sha256,
-        stripPrefix=repository_ctx.attr.strip_prefix,
-    )
-
-  # Also setup BUILD file.
-  repository_ctx.symlink(repository_ctx.attr.build_file, "BUILD")
-
-
-mkl_repository = repository_rule(
-    implementation = _mkl_autoconf_impl,
-    environ = [
-        _TF_MKL_ROOT,
-    ],
-    attrs = {
-        "build_file": attr.label(),
-        "urls": attr.string_list(default = []),
-        "sha256": attr.string(default = ""),
-        "strip_prefix": attr.string(default = ""),
-    },
-)
diff --git a/third_party/mkl/mkl.BUILD b/third_party/mkl/mkl.BUILD
deleted file mode 100644
index c3a71e4..0000000
--- a/third_party/mkl/mkl.BUILD
+++ /dev/null
@@ -1,45 +0,0 @@
-licenses(["notice"])  # 3-Clause BSD
-
-exports_files(["license.txt"])
-
-filegroup(
-    name = "LICENSE",
-    srcs = [
-        "license.txt",
-    ],
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "mkl_headers",
-    srcs = glob(["include/*"]),
-    includes = ["include"],
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "mkl_libs_linux",
-    srcs = [
-        "lib/libiomp5.so",
-        "lib/libmklml_intel.so",
-    ],
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "mkl_libs_darwin",
-    srcs = [
-        "lib/libiomp5.dylib",
-        "lib/libmklml.dylib",
-    ],
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "mkl_libs_windows",
-    srcs = [
-        "lib/libiomp5md.lib",
-        "lib/mklml.lib",
-    ],
-    visibility = ["//visibility:public"],
-)
diff --git a/third_party/mkl_dnn/BUILD b/third_party/mkl_dnn/BUILD
deleted file mode 100644
index 5b01f6e..0000000
--- a/third_party/mkl_dnn/BUILD
+++ /dev/null
@@ -1 +0,0 @@
-licenses(["notice"])
diff --git a/third_party/mkl_dnn/mkldnn.BUILD b/third_party/mkl_dnn/mkldnn.BUILD
deleted file mode 100644
index 68f24aa..0000000
--- a/third_party/mkl_dnn/mkldnn.BUILD
+++ /dev/null
@@ -1,36 +0,0 @@
-exports_files(["LICENSE"])
-
-config_setting(
-    name = "clang_linux_x86_64",
-    values = {
-        "cpu": "k8",
-        "define": "using_clang=true",
-    },
-)
-
-cc_library(
-    name = "mkl_dnn",
-    srcs = glob([
-        "src/common/*.cpp",
-        "src/cpu/*.cpp",
-    ]),
-    hdrs = glob(["include/*"]),
-    copts = ["-fexceptions"] + select({
-        "@org_tensorflow//tensorflow:linux_x86_64": [
-            "-fopenmp",  # only works with gcc
-        ],
-        # TODO(ibiryukov): enable openmp with clang by including libomp as a
-        # dependency.
-        ":clang_linux_x86_64": [],
-        "//conditions:default": [],
-    }),
-    includes = [
-        "include",
-        "src",
-        "src/common",
-        "src/cpu",
-        "src/cpu/xbyak",
-    ],
-    nocopts = "-fno-exceptions",
-    visibility = ["//visibility:public"],
-)
diff --git a/third_party/mpi/.gitignore b/third_party/mpi/.gitignore
deleted file mode 100644
index ab01161..0000000
--- a/third_party/mpi/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*.h
-*.dylib
-*.so
diff --git a/third_party/mpi/BUILD b/third_party/mpi/BUILD
deleted file mode 100644
index 1d6ac2f..0000000
--- a/third_party/mpi/BUILD
+++ /dev/null
@@ -1,13 +0,0 @@
-licenses(["restricted"])
-
-load("//third_party/mpi:mpi.bzl", "mpi_hdr")
-load("//third_party/mpi:mpi.bzl", "if_mpi")
-
-cc_library(
-    name = "mpi",
-    srcs = if_mpi([
-        "libmpi.so",
-    ]),
-    hdrs = if_mpi(mpi_hdr()),
-    visibility = ["//visibility:public"],
-)
diff --git a/third_party/mpi/mpi.bzl b/third_party/mpi/mpi.bzl
deleted file mode 100644
index 38ce91c..0000000
--- a/third_party/mpi/mpi.bzl
+++ /dev/null
@@ -1,17 +0,0 @@
-#OpenMPI and Mvapich/mpich require different headers
-#based on the configuration options return one or the other
-
-def mpi_hdr():
-    MPI_LIB_IS_OPENMPI=True
-    hdrs = []    
-    if MPI_LIB_IS_OPENMPI:
-        hdrs = ["mpi.h", "mpi_portable_platform.h"]   #When using OpenMPI
-    else:
-        hdrs = ["mpi.h",  "mpio.h", "mpicxx.h"]        #When using MVAPICH
-    return hdrs
-
-def if_mpi(if_true, if_false = []):
-    return select({
-        "//tensorflow:with_mpi_support": if_true,
-        "//conditions:default": if_false
-    })
diff --git a/third_party/mpi_collectives/BUILD b/third_party/mpi_collectives/BUILD
deleted file mode 100644
index d5f9edb..0000000
--- a/third_party/mpi_collectives/BUILD
+++ /dev/null
@@ -1,29 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"])  # Apache 2.0
-
-exports_files(["LICENSE.txt"])
-
-filegroup(
-    name = "all_files",
-    srcs = glob(
-        ["**/*"],
-        exclude = [
-            "**/METADATA",
-            "**/OWNERS",
-        ],
-    ),
-    visibility = ["//tensorflow:__subpackages__"],
-)
-
-cc_library(
-    name = "mpi",
-    srcs = select({
-        "//tensorflow:darwin": ["libmpi.dylib"],
-        "//conditions:default": ["libmpi.so"],
-    }),
-    hdrs = [
-        "mpi.h",
-        "mpi_portable_platform",
-    ],
-)
diff --git a/third_party/nasm.BUILD b/third_party/nasm.BUILD
deleted file mode 100644
index 341d580..0000000
--- a/third_party/nasm.BUILD
+++ /dev/null
@@ -1,130 +0,0 @@
-# Description:
-#   NASM is a portable assembler in the Intel/Microsoft tradition.
-
-licenses(["notice"])  # BSD 2-clause
-
-exports_files(["LICENSE"])
-
-cc_binary(
-    name = "nasm",
-    srcs = [
-        "assemble.c",
-        "assemble.h",
-        "compiler.h",
-        "crc64.c",
-        "directiv.c",
-        "directiv.h",
-        "disp8.c",
-        "disp8.h",
-        "eval.c",
-        "eval.h",
-        "exprlib.c",
-        "float.c",
-        "float.h",
-        "hashtbl.c",
-        "hashtbl.h",
-        "iflag.c",
-        "iflag.h",
-        "iflaggen.h",
-        "ilog2.c",
-        "insns.h",
-        "insnsa.c",
-        "insnsb.c",
-        "insnsi.h",
-        "labels.c",
-        "labels.h",
-        "lib/strlcpy.c",
-        "listing.c",
-        "listing.h",
-        "macros.c",
-        "md5.h",
-        "md5c.c",
-        "nasm.c",
-        "nasm.h",
-        "nasmlib.c",
-        "nasmlib.h",
-        "opflags.h",
-        "output/codeview.c",
-        "output/dwarf.h",
-        "output/elf.h",
-        "output/nulldbg.c",
-        "output/nullout.c",
-        "output/outaout.c",
-        "output/outas86.c",
-        "output/outbin.c",
-        "output/outcoff.c",
-        "output/outdbg.c",
-        "output/outelf.c",
-        "output/outelf.h",
-        "output/outelf32.c",
-        "output/outelf64.c",
-        "output/outelfx32.c",
-        "output/outform.c",
-        "output/outform.h",
-        "output/outieee.c",
-        "output/outlib.c",
-        "output/outlib.h",
-        "output/outmacho.c",
-        "output/outobj.c",
-        "output/outrdf2.c",
-        "output/pecoff.h",
-        "output/stabs.h",
-        "parser.c",
-        "parser.h",
-        "pptok.c",
-        "pptok.h",
-        "preproc.c",
-        "preproc.h",
-        "preproc-nop.c",
-        "quote.c",
-        "quote.h",
-        "raa.c",
-        "raa.h",
-        "rbtree.c",
-        "rbtree.h",
-        "rdoff/rdoff.h",
-        "realpath.c",
-        "regflags.c",
-        "regs.h",
-        "regvals.c",
-        "saa.c",
-        "saa.h",
-        "srcfile.c",
-        "stdscan.c",
-        "stdscan.h",
-        "strfunc.c",
-        "tables.h",
-        "tokens.h",
-        "tokhash.c",
-        "ver.c",
-        "version.h",
-    ],
-    copts = select({
-        ":windows": [],
-        ":windows_msvc": [],
-        "//conditions:default": [
-            "-w",
-            "-std=c99",
-        ],
-    }),
-    defines = select({
-        ":windows": [],
-        ":windows_msvc": [],
-        "//conditions:default": ["HAVE_SNPRINTF"],
-    }),
-    visibility = ["@jpeg//:__pkg__"],
-)
-
-config_setting(
-    name = "windows_msvc",
-    values = {
-        "cpu": "x64_windows_msvc",
-    },
-)
-
-config_setting(
-    name = "windows",
-    values = {
-        "cpu": "x64_windows",
-    },
-)
diff --git a/third_party/nccl/nccl_archive.BUILD b/third_party/nccl/nccl_archive.BUILD
deleted file mode 100644
index a05899e..0000000
--- a/third_party/nccl/nccl_archive.BUILD
+++ /dev/null
@@ -1,68 +0,0 @@
-# NVIDIA nccl
-# A package of optimized primitives for collective multi-GPU communication.
-
-licenses(["notice"])  # BSD
-
-exports_files(["LICENSE.txt"])
-
-load("@local_config_cuda//cuda:build_defs.bzl", "cuda_default_copts", "if_cuda")
-
-SRCS = [
-    "src/all_gather.cu",
-    "src/all_reduce.cu",
-    "src/broadcast.cu",
-    "src/core.cu",
-    "src/libwrap.cu",
-    "src/reduce.cu",
-    "src/reduce_scatter.cu",
-]
-
-# Copy .cu to .cu.cc so they can be in srcs of cc_library.
-[
-    genrule(
-        name = "gen_" + src,
-        srcs = [src],
-        outs = [src + ".cc"],
-        cmd = "cp $(location " + src + ") $(location " + src + ".cc)",
-    )
-    for src in SRCS
-]
-
-SRCS_CU_CC = [src + ".cc" for src in SRCS]
-
-cc_library(
-    name = "nccl",
-    srcs = if_cuda(SRCS_CU_CC + glob(["src/*.h"])),
-    hdrs = if_cuda(["src/nccl.h"]),
-    copts = [
-        "-DCUDA_MAJOR=0",
-        "-DCUDA_MINOR=0",
-        "-DNCCL_MAJOR=0",
-        "-DNCCL_MINOR=0",
-        "-DNCCL_PATCH=0",
-        "-Iexternal/nccl_archive/src",
-        "-O3",
-    ] + cuda_default_copts(),
-    include_prefix = "third_party/nccl",
-    linkopts = select({
-        "@org_tensorflow//tensorflow:android": [
-            "-pie",
-        ],
-        "@org_tensorflow//tensorflow:darwin": [
-            "-Wl,-framework",
-            "-Wl,CoreFoundation",
-            "-Wl,-framework",
-            "-Wl,Security",
-        ],
-        "@org_tensorflow//tensorflow:ios": [],
-        "@org_tensorflow//tensorflow:windows": [
-            "-DEFAULTLIB:ws2_32.lib",
-        ],
-        "//conditions:default": [
-            "-lrt",
-        ],
-    }),
-    strip_include_prefix = "src",
-    visibility = ["//visibility:public"],
-    deps = ["@local_config_cuda//cuda:cuda_headers"],
-)
diff --git a/third_party/nccl/nccl_configure.bzl b/third_party/nccl/nccl_configure.bzl
deleted file mode 100644
index 9dfcb18..0000000
--- a/third_party/nccl/nccl_configure.bzl
+++ /dev/null
@@ -1,172 +0,0 @@
-# -*- Python -*-
-"""Repository rule for NCCL configuration.
-
-`nccl_configure` depends on the following environment variables:
-
-  * `TF_NCCL_VERSION`: The NCCL version.
-  * `NCCL_INSTALL_PATH`: The installation path of the NCCL library.
-"""
-
-load(
-    "//third_party/gpus:cuda_configure.bzl",
-    "auto_configure_fail",
-    "find_cuda_define",
-    "matches_version",
-)
-
-_NCCL_INSTALL_PATH = "NCCL_INSTALL_PATH"
-_TF_NCCL_VERSION = "TF_NCCL_VERSION"
-
-_DEFINE_NCCL_MAJOR = "#define NCCL_MAJOR"
-_DEFINE_NCCL_MINOR = "#define NCCL_MINOR"
-_DEFINE_NCCL_PATCH = "#define NCCL_PATCH"
-
-_NCCL_DUMMY_BUILD_CONTENT = """
-filegroup(
-  name = "LICENSE",
-  visibility = ["//visibility:public"],
-)
-
-cc_library(
-  name = "nccl",
-  visibility = ["//visibility:public"],
-)
-"""
-
-_NCCL_ARCHIVE_BUILD_CONTENT = """
-filegroup(
-  name = "LICENSE",
-  data = ["@nccl_archive//:LICENSE.txt"],
-  visibility = ["//visibility:public"],
-)
-
-alias(
-  name = "nccl",
-  actual = "@nccl_archive//:nccl",
-  visibility = ["//visibility:public"],
-)
-"""
-
-_NCCL_LOCAL_BUILD_TEMPLATE = """
-filegroup(
-  name = "LICENSE",
-  data = ["nccl/NCCL-SLA.txt"],
-  visibility = ["//visibility:public"],
-)
-
-cc_library(
-  name = "nccl",
-  srcs = ["nccl/lib/libnccl.so.%s"],
-  hdrs = ["nccl/include/nccl.h"],
-  include_prefix = "third_party/nccl",
-  strip_include_prefix = "nccl/include",
-  deps = [
-      "@local_config_cuda//cuda:cuda_headers",
-  ],
-  visibility = ["//visibility:public"],
-)
-"""
-
-
-def _find_nccl_header(repository_ctx, nccl_install_path):
-  """Finds the NCCL header on the system.
-
-  Args:
-    repository_ctx: The repository context.
-    nccl_install_path: The NCCL library install directory.
-
-  Returns:
-    The path to the NCCL header.
-  """
-  header_path = repository_ctx.path("%s/include/nccl.h" % nccl_install_path)
-  if not header_path.exists:
-    auto_configure_fail("Cannot find %s" % str(header_path))
-  return header_path
-
-
-def _check_nccl_version(repository_ctx, nccl_install_path, nccl_version):
-  """Checks whether the header file matches the specified version of NCCL.
-
-  Args:
-    repository_ctx: The repository context.
-    nccl_install_path: The NCCL library install directory.
-    nccl_version: The expected NCCL version.
-
-  Returns:
-    A string containing the library version of NCCL.
-  """
-  header_path = _find_nccl_header(repository_ctx, nccl_install_path)
-  header_dir = str(header_path.realpath.dirname)
-  major_version = find_cuda_define(repository_ctx, header_dir, "nccl.h",
-                                   _DEFINE_NCCL_MAJOR)
-  minor_version = find_cuda_define(repository_ctx, header_dir, "nccl.h",
-                                   _DEFINE_NCCL_MINOR)
-  patch_version = find_cuda_define(repository_ctx, header_dir, "nccl.h",
-                                   _DEFINE_NCCL_PATCH)
-  header_version = "%s.%s.%s" % (major_version, minor_version, patch_version)
-  if not matches_version(nccl_version, header_version):
-    auto_configure_fail(
-        ("NCCL library version detected from %s/nccl.h (%s) does not match " +
-         "TF_NCCL_VERSION (%s). To fix this rerun configure again.") %
-        (header_dir, header_version, nccl_version))
-
-
-def _find_nccl_lib(repository_ctx, nccl_install_path, nccl_version):
-  """Finds the given NCCL library on the system.
-
-  Args:
-    repository_ctx: The repository context.
-    nccl_install_path: The NCCL library installation directory.
-    nccl_version: The version of NCCL library files as returned
-      by _nccl_version.
-
-  Returns:
-    The path to the NCCL library.
-  """
-  lib_path = repository_ctx.path("%s/lib/libnccl.so.%s" % (nccl_install_path,
-                                                           nccl_version))
-  if not lib_path.exists:
-    auto_configure_fail("Cannot find NCCL library %s" % str(lib_path))
-  return lib_path
-
-
-def _nccl_configure_impl(repository_ctx):
-  """Implementation of the nccl_configure repository rule."""
-  if _TF_NCCL_VERSION not in repository_ctx.os.environ:
-    # Add a dummy build file to make bazel query happy.
-    repository_ctx.file("BUILD", _NCCL_DUMMY_BUILD_CONTENT)
-    return
-
-  nccl_version = repository_ctx.os.environ[_TF_NCCL_VERSION].strip()
-  if matches_version("1", nccl_version):
-    # Alias to GitHub target from @nccl_archive.
-    if not matches_version(nccl_version, "1.3"):
-      auto_configure_fail(
-          "NCCL from GitHub must use version 1.3 (got %s)" % nccl_version)
-    repository_ctx.file("BUILD", _NCCL_ARCHIVE_BUILD_CONTENT)
-  else:
-    # Create target for locally installed NCCL.
-    nccl_install_path = repository_ctx.os.environ[_NCCL_INSTALL_PATH].strip()
-    _check_nccl_version(repository_ctx, nccl_install_path, nccl_version)
-    repository_ctx.symlink(nccl_install_path, "nccl")
-    repository_ctx.file("BUILD", _NCCL_LOCAL_BUILD_TEMPLATE % nccl_version)
-
-
-nccl_configure = repository_rule(
-    implementation=_nccl_configure_impl,
-    environ=[
-        _NCCL_INSTALL_PATH,
-        _TF_NCCL_VERSION,
-    ],
-)
-"""Detects and configures the NCCL configuration.
-
-Add the following to your WORKSPACE FILE:
-
-```python
-nccl_configure(name = "local_config_nccl")
-```
-
-Args:
-  name: A unique name for this workspace rule.
-"""
diff --git a/third_party/ortools.BUILD b/third_party/ortools.BUILD
deleted file mode 100644
index 61191e3..0000000
--- a/third_party/ortools.BUILD
+++ /dev/null
@@ -1,13 +0,0 @@
-# Google's software suite for combinatorial optimization
-
-licenses(["notice"])  # Apache2 license
-
-exports_files(["LICENSE-2.0.txt"])
-
-native.cc_library(
-    name = "linear_solver_glop",
-    deps = [
-        "@ortools_archive//linear_solver:linear_solver_glop",
-    ],
-    visibility = ["//visibility:public"],
-)
diff --git a/third_party/pcre.BUILD b/third_party/pcre.BUILD
deleted file mode 100644
index 3a8e7a1..0000000
--- a/third_party/pcre.BUILD
+++ /dev/null
@@ -1,80 +0,0 @@
-licenses(["notice"])  # BSD
-
-exports_files(["LICENCE"])
-
-cc_library(
-    name = "pcre",
-    srcs = [
-        "pcre_byte_order.c",
-        "pcre_chartables.c",
-        "pcre_compile.c",
-        "pcre_config.c",
-        "pcre_dfa_exec.c",
-        "pcre_exec.c",
-        "pcre_fullinfo.c",
-        "pcre_get.c",
-        "pcre_globals.c",
-        "pcre_internal.h",
-        "pcre_jit_compile.c",
-        "pcre_maketables.c",
-        "pcre_newline.c",
-        "pcre_ord2utf8.c",
-        "pcre_refcount.c",
-        "pcre_string_utils.c",
-        "pcre_study.c",
-        "pcre_tables.c",
-        "pcre_ucd.c",
-        "pcre_valid_utf8.c",
-        "pcre_version.c",
-        "pcre_xclass.c",
-        "ucp.h",
-    ],
-    hdrs = [
-        "pcre.h",
-        "pcreposix.h",
-    ],
-    copts = [
-        "-DHAVE_BCOPY=1",
-        "-DHAVE_INTTYPES_H=1",
-        "-DHAVE_MEMMOVE=1",
-        "-DHAVE_STDINT_H=1",
-        "-DHAVE_STRERROR=1",
-        "-DHAVE_SYS_STAT_H=1",
-        "-DHAVE_SYS_TYPES_H=1",
-        "-DHAVE_UNISTD_H=1",
-        "-DLINK_SIZE=2",
-        "-DMATCH_LIMIT=10000000",
-        "-DMATCH_LIMIT_RECURSION=1000",
-        "-DMAX_NAME_COUNT=10000",
-        "-DMAX_NAME_SIZE=32",
-        "-DNEWLINE=10",
-        "-DNO_RECURSE",
-        "-DPARENS_NEST_LIMIT=50",
-        "-DPOSIX_MALLOC_THRESHOLD=10",
-        "-DSTDC_HEADERS=1",
-        "-DSUPPORT_UCP",
-        "-DSUPPORT_UTF",
-    ],
-    defines = ["PCRE_STATIC=1"],
-    includes = ["."],
-    visibility = ["@swig//:__pkg__"],  # Please use RE2
-    alwayslink = 1,
-)
-
-genrule(
-    name = "pcre_h",
-    srcs = ["pcre.h.in"],
-    outs = ["pcre.h"],
-    cmd = "sed -e s/@PCRE_MAJOR@/8/" +
-          "    -e s/@PCRE_MINOR@/39/" +
-          "    -e s/@PCRE_PRERELEASE@//" +
-          "    -e s/@PCRE_DATE@/redacted/" +
-          "    $< >$@",
-)
-
-genrule(
-    name = "pcre_chartables_c",
-    srcs = ["pcre_chartables.c.dist"],
-    outs = ["pcre_chartables.c"],
-    cmd = "cp $< $@",
-)
diff --git a/third_party/png.BUILD b/third_party/png.BUILD
deleted file mode 100644
index 76ab32d..0000000
--- a/third_party/png.BUILD
+++ /dev/null
@@ -1,47 +0,0 @@
-# Description:
-#   libpng is the official PNG reference library.
-
-licenses(["notice"])  # BSD/MIT-like license
-
-exports_files(["LICENSE"])
-
-cc_library(
-    name = "png",
-    srcs = [
-        "png.c",
-        "pngdebug.h",
-        "pngerror.c",
-        "pngget.c",
-        "pnginfo.h",
-        "pnglibconf.h",
-        "pngmem.c",
-        "pngpread.c",
-        "pngpriv.h",
-        "pngread.c",
-        "pngrio.c",
-        "pngrtran.c",
-        "pngrutil.c",
-        "pngset.c",
-        "pngstruct.h",
-        "pngtrans.c",
-        "pngwio.c",
-        "pngwrite.c",
-        "pngwtran.c",
-        "pngwutil.c",
-    ],
-    hdrs = [
-        "png.h",
-        "pngconf.h",
-    ],
-    includes = ["."],
-    linkopts = ["-lm"],
-    visibility = ["//visibility:public"],
-    deps = ["@zlib_archive//:zlib"],
-)
-
-genrule(
-    name = "snappy_stubs_public_h",
-    srcs = ["scripts/pnglibconf.h.prebuilt"],
-    outs = ["pnglibconf.h"],
-    cmd = "sed -e 's/PNG_ZLIB_VERNUM 0/PNG_ZLIB_VERNUM 0x12b0/' $< >$@",
-)
diff --git a/third_party/pprof.BUILD b/third_party/pprof.BUILD
deleted file mode 100644
index 8bd5bac..0000000
--- a/third_party/pprof.BUILD
+++ /dev/null
@@ -1,18 +0,0 @@
-package(
-    default_visibility = ["//visibility:public"],
-)
-
-licenses(["notice"])  # MIT
-
-load("@protobuf_archive//:protobuf.bzl", "py_proto_library")
-
-exports_files(["pprof/LICENSE"])
-
-py_proto_library(
-    name = "pprof_proto_py",
-    srcs = ["proto/profile.proto"],
-    default_runtime = "@protobuf_archive//:protobuf_python",
-    protoc = "@protobuf_archive//:protoc",
-    srcs_version = "PY2AND3",
-    deps = ["@protobuf_archive//:protobuf_python"],
-)
diff --git a/third_party/protobuf/BUILD b/third_party/protobuf/BUILD
deleted file mode 100644
index e69de29..0000000
--- a/third_party/protobuf/BUILD
+++ /dev/null
diff --git a/third_party/py/BUILD b/third_party/py/BUILD
deleted file mode 100644
index e69de29..0000000
--- a/third_party/py/BUILD
+++ /dev/null
diff --git a/third_party/py/BUILD.tpl b/third_party/py/BUILD.tpl
deleted file mode 100644
index 1dd8ab4..0000000
--- a/third_party/py/BUILD.tpl
+++ /dev/null
@@ -1,41 +0,0 @@
-licenses(["restricted"])
-
-package(default_visibility = ["//visibility:public"])
-
-# To build Python C/C++ extension on Windows, we need to link to python import library pythonXY.lib
-# See https://docs.python.org/3/extending/windows.html
-cc_import(
-    name = "python_lib",
-    interface_library = select({
-        ":windows": ":python_import_lib",
-        # A placeholder for Unix platforms which makes --no_build happy.
-        "//conditions:default": "not-existing.lib",
-    }),
-    system_provided = 1,
-)
-
-cc_library(
-    name = "python_headers",
-    hdrs = [":python_include"],
-    deps = select({
-        ":windows": [":python_lib"],
-        "//conditions:default": [],
-    }),
-    includes = ["python_include"],
-)
-
-cc_library(
-    name = "numpy_headers",
-    hdrs = [":numpy_include"],
-    includes = ["numpy_include"],
-)
-
-config_setting(
-    name = "windows",
-    values = {"cpu": "x64_windows"},
-    visibility = ["//visibility:public"],
-)
-
-%{PYTHON_INCLUDE_GENRULE}
-%{NUMPY_INCLUDE_GENRULE}
-%{PYTHON_IMPORT_LIB_GENRULE}
diff --git a/third_party/py/numpy/BUILD b/third_party/py/numpy/BUILD
deleted file mode 100644
index be83325..0000000
--- a/third_party/py/numpy/BUILD
+++ /dev/null
@@ -1,21 +0,0 @@
-licenses(["restricted"])
-
-package(default_visibility = ["//visibility:public"])
-
-py_library(
-    name = "numpy",
-    srcs = ["tf_numpy_dummy.py"],
-    srcs_version = "PY2AND3",
-)
-
-alias(
-    name = "headers",
-    actual = "@local_config_python//:numpy_headers",
-)
-
-genrule(
-    name = "dummy",
-    outs = ["tf_numpy_dummy.py"],
-    cmd = "touch $@",
-    visibility = ["//visibility:private"],
-)
diff --git a/third_party/py/python_configure.bzl b/third_party/py/python_configure.bzl
deleted file mode 100644
index 954f21f..0000000
--- a/third_party/py/python_configure.bzl
+++ /dev/null
@@ -1,312 +0,0 @@
-"""Repository rule for Python autoconfiguration.
-
-`python_configure` depends on the following environment variables:
-
-  * `PYTHON_BIN_PATH`: location of python binary.
-  * `PYTHON_LIB_PATH`: Location of python libraries.
-"""
-
-_PYTHON_BIN_PATH = "PYTHON_BIN_PATH"
-_PYTHON_LIB_PATH = "PYTHON_LIB_PATH"
-_TF_PYTHON_CONFIG_REPO = "TF_PYTHON_CONFIG_REPO"
-
-
-def _tpl(repository_ctx, tpl, substitutions={}, out=None):
-  if not out:
-    out = tpl
-  repository_ctx.template(
-      out,
-      Label("//third_party/py:%s.tpl" % tpl),
-      substitutions)
-
-
-def _fail(msg):
-  """Output failure message when auto configuration fails."""
-  red = "\033[0;31m"
-  no_color = "\033[0m"
-  fail("%sPython Configuration Error:%s %s\n" % (red, no_color, msg))
-
-
-def _is_windows(repository_ctx):
-  """Returns true if the host operating system is windows."""
-  os_name = repository_ctx.os.name.lower()
-  if os_name.find("windows") != -1:
-    return True
-  return False
-
-
-def _execute(repository_ctx, cmdline, error_msg=None, error_details=None,
-             empty_stdout_fine=False):
-  """Executes an arbitrary shell command.
-
-  Args:
-    repository_ctx: the repository_ctx object
-    cmdline: list of strings, the command to execute
-    error_msg: string, a summary of the error if the command fails
-    error_details: string, details about the error or steps to fix it
-    empty_stdout_fine: bool, if True, an empty stdout result is fine, otherwise
-      it's an error
-  Return:
-    the result of repository_ctx.execute(cmdline)
-  """
-  result = repository_ctx.execute(cmdline)
-  if result.stderr or not (empty_stdout_fine or result.stdout):
-    _fail("\n".join([
-        error_msg.strip() if error_msg else "Repository command failed",
-        result.stderr.strip(),
-        error_details if error_details else ""]))
-  return result
-
-
-def _read_dir(repository_ctx, src_dir):
-  """Returns a string with all files in a directory.
-
-  Finds all files inside a directory, traversing subfolders and following
-  symlinks. The returned string contains the full path of all files
-  separated by line breaks.
-  """
-  if _is_windows(repository_ctx):
-    src_dir = src_dir.replace("/", "\\")
-    find_result = _execute(
-        repository_ctx, ["cmd.exe", "/c", "dir", src_dir, "/b", "/s", "/a-d"],
-        empty_stdout_fine=True)
-    # src_files will be used in genrule.outs where the paths must
-    # use forward slashes.
-    result = find_result.stdout.replace("\\", "/")
-  else:
-    find_result = _execute(
-        repository_ctx, ["find", src_dir, "-follow", "-type", "f"],
-        empty_stdout_fine=True)
-    result = find_result.stdout
-  return result
-
-
-def _genrule(src_dir, genrule_name, command, outs):
-  """Returns a string with a genrule.
-
-  Genrule executes the given command and produces the given outputs.
-  """
-  return (
-      'genrule(\n' +
-      '    name = "' +
-      genrule_name + '",\n' +
-      '    outs = [\n' +
-      outs +
-      '\n    ],\n' +
-      '    cmd = """\n' +
-      command +
-      '\n   """,\n' +
-      ')\n'
-  )
-
-
-def _norm_path(path):
-  """Returns a path with '/' and remove the trailing slash."""
-  path = path.replace("\\", "/")
-  if path[-1] == "/":
-    path = path[:-1]
-  return path
-
-
-def _symlink_genrule_for_dir(repository_ctx, src_dir, dest_dir, genrule_name,
-    src_files = [], dest_files = []):
-  """Returns a genrule to symlink(or copy if on Windows) a set of files.
-
-  If src_dir is passed, files will be read from the given directory; otherwise
-  we assume files are in src_files and dest_files
-  """
-  if src_dir != None:
-    src_dir = _norm_path(src_dir)
-    dest_dir = _norm_path(dest_dir)
-    files = '\n'.join(sorted(_read_dir(repository_ctx, src_dir).splitlines()))
-    # Create a list with the src_dir stripped to use for outputs.
-    dest_files = files.replace(src_dir, '').splitlines()
-    src_files = files.splitlines()
-  command = []
-  outs = []
-  for i in range(len(dest_files)):
-    if dest_files[i] != "":
-      # If we have only one file to link we do not want to use the dest_dir, as
-      # $(@D) will include the full path to the file.
-      dest = '$(@D)/' + dest_dir + dest_files[i] if len(dest_files) != 1 else '$(@D)/' + dest_files[i]
-      # On Windows, symlink is not supported, so we just copy all the files.
-      cmd = 'cp -f' if _is_windows(repository_ctx) else 'ln -s'
-      command.append(cmd + ' "%s" "%s"' % (src_files[i] , dest))
-      outs.append('        "' + dest_dir + dest_files[i] + '",')
-  genrule = _genrule(src_dir, genrule_name, " && ".join(command),
-                     "\n".join(outs))
-  return genrule
-
-
-def _get_python_bin(repository_ctx):
-  """Gets the python bin path."""
-  python_bin = repository_ctx.os.environ.get(_PYTHON_BIN_PATH)
-  if python_bin != None:
-    return python_bin
-  python_bin_path = repository_ctx.which("python")
-  if python_bin_path != None:
-    return str(python_bin_path)
-  _fail("Cannot find python in PATH, please make sure " +
-        "python is installed and add its directory in PATH, or --define " +
-        "%s='/something/else'.\nPATH=%s" % (
-            _PYTHON_BIN_PATH, repository_ctx.os.environ.get("PATH", "")))
-
-
-def _get_python_lib(repository_ctx, python_bin):
-  """Gets the python lib path."""
-  python_lib = repository_ctx.os.environ.get(_PYTHON_LIB_PATH)
-  if python_lib != None:
-    return python_lib
-  print_lib = ("<<END\n" +
-      "from __future__ import print_function\n" +
-      "import site\n" +
-      "import os\n" +
-      "\n" +
-      "try:\n" +
-      "  input = raw_input\n" +
-      "except NameError:\n" +
-      "  pass\n" +
-      "\n" +
-      "python_paths = []\n" +
-      "if os.getenv('PYTHONPATH') is not None:\n" +
-      "  python_paths = os.getenv('PYTHONPATH').split(':')\n" +
-      "try:\n" +
-      "  library_paths = site.getsitepackages()\n" +
-      "except AttributeError:\n" +
-      " from distutils.sysconfig import get_python_lib\n" +
-      " library_paths = [get_python_lib()]\n" +
-      "all_paths = set(python_paths + library_paths)\n" +
-      "paths = []\n" +
-      "for path in all_paths:\n" +
-      "  if os.path.isdir(path):\n" +
-      "    paths.append(path)\n" +
-      "if len(paths) >=1:\n" +
-      "  print(paths[0])\n" +
-      "END")
-  cmd = '%s - %s' % (python_bin, print_lib)
-  result = repository_ctx.execute(["bash", "-c", cmd])
-  return result.stdout.strip('\n')
-
-
-def _check_python_lib(repository_ctx, python_lib):
-  """Checks the python lib path."""
-  cmd = 'test -d "%s" -a -x "%s"' % (python_lib, python_lib)
-  result = repository_ctx.execute(["bash", "-c", cmd])
-  if result.return_code == 1:
-    _fail("Invalid python library path: %s" % python_lib)
-
-
-def _check_python_bin(repository_ctx, python_bin):
-  """Checks the python bin path."""
-  cmd =  '[[ -x "%s" ]] && [[ ! -d "%s" ]]' % (python_bin, python_bin)
-  result = repository_ctx.execute(["bash", "-c", cmd])
-  if result.return_code == 1:
-    _fail("--define %s='%s' is not executable. Is it the python binary?" % (
-        _PYTHON_BIN_PATH, python_bin))
-
-
-def _get_python_include(repository_ctx, python_bin):
-  """Gets the python include path."""
-  result = _execute(
-      repository_ctx,
-      [python_bin, "-c",
-       'from __future__ import print_function;' +
-       'from distutils import sysconfig;' +
-       'print(sysconfig.get_python_inc())'],
-      error_msg="Problem getting python include path.",
-      error_details=("Is the Python binary path set up right? " +
-                     "(See ./configure or " + _PYTHON_BIN_PATH + ".) " +
-                     "Is distutils installed?"))
-  return result.stdout.splitlines()[0]
-
-
-def _get_python_import_lib_name(repository_ctx, python_bin):
-  """Get Python import library name (pythonXY.lib) on Windows."""
-  result = _execute(
-      repository_ctx,
-      [python_bin, "-c",
-       'import sys;' +
-       'print("python" + str(sys.version_info[0]) + ' +
-       '      str(sys.version_info[1]) + ".lib")'],
-      error_msg="Problem getting python import library.",
-      error_details=("Is the Python binary path set up right? " +
-                     "(See ./configure or " + _PYTHON_BIN_PATH + ".) "))
-  return result.stdout.splitlines()[0]
-
-
-def _get_numpy_include(repository_ctx, python_bin):
-  """Gets the numpy include path."""
-  return _execute(repository_ctx,
-                  [python_bin, "-c",
-                   'from __future__ import print_function;' +
-                   'import numpy;' +
-                   ' print(numpy.get_include());'],
-                  error_msg="Problem getting numpy include path.",
-                  error_details="Is numpy installed?").stdout.splitlines()[0]
-
-
-def _create_local_python_repository(repository_ctx):
-  """Creates the repository containing files set up to build with Python."""
-  python_bin = _get_python_bin(repository_ctx)
-  _check_python_bin(repository_ctx, python_bin)
-  python_lib = _get_python_lib(repository_ctx, python_bin)
-  _check_python_lib(repository_ctx, python_lib)
-  python_include = _get_python_include(repository_ctx, python_bin)
-  numpy_include = _get_numpy_include(repository_ctx, python_bin) + '/numpy'
-  python_include_rule = _symlink_genrule_for_dir(
-      repository_ctx, python_include, 'python_include', 'python_include')
-  python_import_lib_genrule = ""
-  # To build Python C/C++ extension on Windows, we need to link to python import library pythonXY.lib
-  # See https://docs.python.org/3/extending/windows.html
-  if _is_windows(repository_ctx):
-    python_include = _norm_path(python_include)
-    python_import_lib_name = _get_python_import_lib_name(repository_ctx, python_bin)
-    python_import_lib_src = python_include.rsplit('/', 1)[0] + "/libs/" + python_import_lib_name
-    python_import_lib_genrule = _symlink_genrule_for_dir(
-      repository_ctx, None, '', 'python_import_lib',
-      [python_import_lib_src], [python_import_lib_name])
-  numpy_include_rule = _symlink_genrule_for_dir(
-      repository_ctx, numpy_include, 'numpy_include/numpy', 'numpy_include')
-  _tpl(repository_ctx, "BUILD", {
-      "%{PYTHON_INCLUDE_GENRULE}": python_include_rule,
-      "%{PYTHON_IMPORT_LIB_GENRULE}": python_import_lib_genrule,
-      "%{NUMPY_INCLUDE_GENRULE}": numpy_include_rule,
-  })
-
-
-def _create_remote_python_repository(repository_ctx, remote_config_repo):
-  """Creates pointers to a remotely configured repo set up to build with Python.
-  """
-  _tpl(repository_ctx, "remote.BUILD", {
-      "%{REMOTE_PYTHON_REPO}": remote_config_repo,
-  }, "BUILD")
-
-
-def _python_autoconf_impl(repository_ctx):
-  """Implementation of the python_autoconf repository rule."""
-  if _TF_PYTHON_CONFIG_REPO in repository_ctx.os.environ:
-      _create_remote_python_repository(repository_ctx,
-          repository_ctx.os.environ[_TF_PYTHON_CONFIG_REPO])
-  else:
-    _create_local_python_repository(repository_ctx)
-
-
-python_configure = repository_rule(
-    implementation = _python_autoconf_impl,
-    environ = [
-        _PYTHON_BIN_PATH,
-        _PYTHON_LIB_PATH,
-        _TF_PYTHON_CONFIG_REPO,
-    ],
-)
-"""Detects and configures the local Python.
-
-Add the following to your WORKSPACE FILE:
-
-```python
-python_configure(name = "local_config_python")
-```
-
-Args:
-  name: A unique name for this workspace rule.
-"""
diff --git a/third_party/py/remote.BUILD.tpl b/third_party/py/remote.BUILD.tpl
deleted file mode 100644
index edcac41..0000000
--- a/third_party/py/remote.BUILD.tpl
+++ /dev/null
@@ -1,13 +0,0 @@
-licenses(["restricted"])
-
-package(default_visibility = ["//visibility:public"])
-
-alias(
-    name = "python_headers",
-    actual = "%{REMOTE_PYTHON_REPO}:python_headers",
-)
-
-alias(
-    name = "numpy_headers",
-    actual = "%{REMOTE_PYTHON_REPO}:numpy_headers",
-)
diff --git a/third_party/repo.bzl b/third_party/repo.bzl
deleted file mode 100644
index 36f5aa5..0000000
--- a/third_party/repo.bzl
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright 2017 The TensorFlow Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Utilities for defining TensorFlow Bazel dependencies."""
-
-_SINGLE_URL_WHITELIST = depset([
-    "arm_compiler",
-    "ortools_archive",
-    "gemmlowp",
-])
-
-def _is_windows(ctx):
-  return ctx.os.name.lower().find("windows") != -1
-
-def _wrap_bash_cmd(ctx, cmd):
-  if _is_windows(ctx):
-    bazel_sh = _get_env_var(ctx, "BAZEL_SH")
-    if not bazel_sh:
-      fail("BAZEL_SH environment variable is not set")
-    cmd = [bazel_sh, "-l", "-c", " ".join(cmd)]
-  return cmd
-
-def _get_env_var(ctx, name):
-  if name in ctx.os.environ:
-    return ctx.os.environ[name]
-  else:
-    return None
-
-# Executes specified command with arguments and calls 'fail' if it exited with
-# non-zero code
-def _execute_and_check_ret_code(repo_ctx, cmd_and_args):
-  result = repo_ctx.execute(cmd_and_args, timeout=10)
-  if result.return_code != 0:
-    fail(("Non-zero return code({1}) when executing '{0}':\n" + "Stdout: {2}\n"
-          + "Stderr: {3}").format(" ".join(cmd_and_args), result.return_code,
-                                  result.stdout, result.stderr))
-
-def _repos_are_siblings():
-  return Label("@foo//bar").workspace_root.startswith("../")
-
-# Apply a patch_file to the repository root directory
-# Runs 'patch -p1'
-def _apply_patch(ctx, patch_file):
-  # Don't check patch on Windows, because patch is only available under bash.
-  if not _is_windows(ctx) and not ctx.which("patch"):
-    fail("patch command is not found, please install it")
-  cmd = _wrap_bash_cmd(
-    ctx, ["patch", "-p1", "-d", ctx.path("."), "-i", ctx.path(patch_file)])
-  _execute_and_check_ret_code(ctx, cmd)
-
-def _apply_delete(ctx, paths):
-  for path in paths:
-    if path.startswith("/"):
-      fail("refusing to rm -rf path starting with '/': " + path)
-    if ".." in path:
-      fail("refusing to rm -rf path containing '..': " + path)
-  cmd = _wrap_bash_cmd(ctx, ["rm", "-rf"] + [ctx.path(path) for path in paths])
-  _execute_and_check_ret_code(ctx, cmd)
-
-def _tf_http_archive(ctx):
-  if ("mirror.bazel.build" not in ctx.attr.urls[0] and
-      (len(ctx.attr.urls) < 2 and
-       ctx.attr.name not in _SINGLE_URL_WHITELIST)):
-    fail("tf_http_archive(urls) must have redundant URLs. The " +
-         "mirror.bazel.build URL must be present and it must come first. " +
-         "Even if you don't have permission to mirror the file, please " +
-         "put the correctly formatted mirror URL there anyway, because " +
-         "someone will come along shortly thereafter and mirror the file.")
-  ctx.download_and_extract(
-      ctx.attr.urls,
-      "",
-      ctx.attr.sha256,
-      ctx.attr.type,
-      ctx.attr.strip_prefix)
-  if ctx.attr.delete:
-    _apply_delete(ctx, ctx.attr.delete)
-  if ctx.attr.patch_file != None:
-    _apply_patch(ctx, ctx.attr.patch_file)
-  if ctx.attr.build_file != None:
-    ctx.template("BUILD", ctx.attr.build_file, {
-        "%prefix%": ".." if _repos_are_siblings() else "external",
-    }, False)
-
-tf_http_archive = repository_rule(
-    implementation=_tf_http_archive,
-    attrs={
-        "sha256": attr.string(mandatory=True),
-        "urls": attr.string_list(mandatory=True, allow_empty=False),
-        "strip_prefix": attr.string(),
-        "type": attr.string(),
-        "delete": attr.string_list(),
-        "patch_file": attr.label(),
-        "build_file": attr.label(),
-    })
-"""Downloads and creates Bazel repos for dependencies.
-
-This is a swappable replacement for both http_archive() and
-new_http_archive() that offers some additional features. It also helps
-ensure best practices are followed.
-"""
diff --git a/third_party/six.BUILD b/third_party/six.BUILD
deleted file mode 100644
index a1b2f7b..0000000
--- a/third_party/six.BUILD
+++ /dev/null
@@ -1,14 +0,0 @@
-# Description:
-#   Six provides simple utilities for wrapping over differences between Python 2
-#   and Python 3.
-
-licenses(["notice"])  # MIT
-
-exports_files(["LICENSE"])
-
-py_library(
-    name = "six",
-    srcs = ["six.py"],
-    srcs_version = "PY2AND3",
-    visibility = ["//visibility:public"],
-)
diff --git a/third_party/snappy.BUILD b/third_party/snappy.BUILD
deleted file mode 100644
index cc11f52..0000000
--- a/third_party/snappy.BUILD
+++ /dev/null
@@ -1,103 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"])  # BSD 3-Clause
-
-exports_files(["COPYING"])
-
-cc_library(
-    name = "snappy",
-    srcs = [
-        "config.h",
-        "snappy.cc",
-        "snappy.h",
-        "snappy-internal.h",
-        "snappy-sinksource.cc",
-        "snappy-sinksource.h",
-        "snappy-stubs-internal.cc",
-        "snappy-stubs-internal.h",
-        "snappy-stubs-public.h",
-    ],
-    hdrs = ["snappy.h"],
-    copts = select({
-        "@org_tensorflow//tensorflow:windows": [
-            "/DHAVE_CONFIG_H",
-            "/EHsc",
-        ],
-        "@org_tensorflow//tensorflow:windows_msvc": [
-            "/DHAVE_CONFIG_H",
-            "/EHsc",
-        ],
-        "//conditions:default": [
-            "-DHAVE_CONFIG_H",
-            "-fno-exceptions",
-            "-Wno-sign-compare",
-            "-Wno-shift-negative-value",
-            "-Wno-implicit-function-declaration",
-        ],
-    }),
-)
-
-genrule(
-    name = "config_h",
-    outs = ["config.h"],
-    cmd = "\n".join([
-        "cat <<'EOF' >$@",
-        "#define HAVE_STDDEF_H 1",
-        "#define HAVE_STDINT_H 1",
-        "",
-        "#ifdef __has_builtin",
-        "#  if !defined(HAVE_BUILTIN_EXPECT) && __has_builtin(__builtin_expect)",
-        "#    define HAVE_BUILTIN_EXPECT 1",
-        "#  endif",
-        "#  if !defined(HAVE_BUILTIN_CTZ) && __has_builtin(__builtin_ctzll)",
-        "#    define HAVE_BUILTIN_CTZ 1",
-        "#  endif",
-        "#elif defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 4)",
-        "#  ifndef HAVE_BUILTIN_EXPECT",
-        "#    define HAVE_BUILTIN_EXPECT 1",
-        "#  endif",
-        "#  ifndef HAVE_BUILTIN_CTZ",
-        "#    define HAVE_BUILTIN_CTZ 1",
-        "#  endif",
-        "#endif",
-        "",
-        "#ifdef __has_include",
-        "#  if !defined(HAVE_BYTESWAP_H) && __has_include(<byteswap.h>)",
-        "#    define HAVE_BYTESWAP_H 1",
-        "#  endif",
-        "#  if !defined(HAVE_UNISTD_H) && __has_include(<unistd.h>)",
-        "#    define HAVE_UNISTD_H 1",
-        "#  endif",
-        "#  if !defined(HAVE_SYS_ENDIAN_H) && __has_include(<sys/endian.h>)",
-        "#    define HAVE_SYS_ENDIAN_H 1",
-        "#  endif",
-        "#  if !defined(HAVE_SYS_MMAN_H) && __has_include(<sys/mman.h>)",
-        "#    define HAVE_SYS_MMAN_H 1",
-        "#  endif",
-        "#  if !defined(HAVE_SYS_UIO_H) && __has_include(<sys/uio.h>)",
-        "#    define HAVE_SYS_UIO_H 1",
-        "#  endif",
-        "#endif",
-        "",
-        "#ifndef SNAPPY_IS_BIG_ENDIAN",
-        "#  ifdef __s390x__",
-        "#    define SNAPPY_IS_BIG_ENDIAN 1",
-        "#  elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__",
-        "#    define SNAPPY_IS_BIG_ENDIAN 1",
-        "#  endif",
-        "#endif",
-        "EOF",
-    ]),
-)
-
-genrule(
-    name = "snappy_stubs_public_h",
-    srcs = ["snappy-stubs-public.h.in"],
-    outs = ["snappy-stubs-public.h"],
-    cmd = ("sed " +
-           "-e 's/$${\\(.*\\)_01}/\\1/g' " +
-           "-e 's/$${SNAPPY_MAJOR}/1/g' " +
-           "-e 's/$${SNAPPY_MINOR}/1/g' " +
-           "-e 's/$${SNAPPY_PATCHLEVEL}/4/g' " +
-           "$< >$@"),
-)
diff --git a/third_party/sqlite.BUILD b/third_party/sqlite.BUILD
deleted file mode 100644
index 6da7953..0000000
--- a/third_party/sqlite.BUILD
+++ /dev/null
@@ -1,64 +0,0 @@
-# Description:
-#   sqlite3 is a serverless SQL RDBMS.
-
-licenses(["unencumbered"])  # Public Domain
-
-SQLITE_COPTS = [
-    "-Os",
-    "-DHAVE_DECL_STRERROR_R=1",
-    "-DHAVE_STDINT_H=1",
-    "-DHAVE_INTTYPES_H=1",
-    "-D_FILE_OFFSET_BITS=64",
-    "-D_REENTRANT=1",
-] + select({
-    "@org_tensorflow//tensorflow:windows": [
-        "-DSQLITE_MAX_TRIGGER_DEPTH=100",
-    ],
-    "@org_tensorflow//tensorflow:windows_msvc": [
-        "-DSQLITE_MAX_TRIGGER_DEPTH=100",
-    ],
-    "@org_tensorflow//tensorflow:darwin": [
-        "-DHAVE_GMTIME_R=1",
-        "-DHAVE_LOCALTIME_R=1",
-        "-DHAVE_USLEEP=1",
-    ],
-    "//conditions:default": [
-        "-DHAVE_FDATASYNC=1",
-        "-DHAVE_GMTIME_R=1",
-        "-DHAVE_LOCALTIME_R=1",
-        "-DHAVE_POSIX_FALLOCATE=1",
-        "-DHAVE_USLEEP=1",
-    ],
-})
-
-# Production build of SQLite library that's baked into TensorFlow.
-cc_library(
-    name = "org_sqlite",
-    srcs = ["sqlite3.c"],
-    hdrs = [
-        "sqlite3.h",
-        "sqlite3ext.h",
-    ],
-    copts = SQLITE_COPTS,
-    defines = [
-        # This gets rid of the bloat of deprecated functionality. It
-        # needs to be listed here instead of copts because it's actually
-        # referenced in the sqlite3.h file.
-        "SQLITE_OMIT_DEPRECATED",
-    ],
-    linkopts = select({
-        "@org_tensorflow//tensorflow:windows_msvc": [],
-        "//conditions:default": [
-            "-ldl",
-            "-lpthread",
-        ],
-    }),
-    visibility = ["//visibility:public"],
-)
-
-# This is a Copybara sync helper for Google.
-py_library(
-    name = "python",
-    srcs_version = "PY2AND3",
-    visibility = ["//visibility:public"],
-)
diff --git a/third_party/swig.BUILD b/third_party/swig.BUILD
deleted file mode 100644
index f2f6474..0000000
--- a/third_party/swig.BUILD
+++ /dev/null
@@ -1,342 +0,0 @@
-licenses(["restricted"])  # GPLv3
-
-exports_files(["LICENSE"])
-
-cc_binary(
-    name = "swig",
-    srcs = [
-        "Source/CParse/cparse.h",
-        "Source/CParse/cscanner.c",
-        "Source/CParse/parser.c",
-        "Source/CParse/parser.h",
-        "Source/CParse/templ.c",
-        "Source/CParse/util.c",
-        "Source/DOH/base.c",
-        "Source/DOH/doh.h",
-        "Source/DOH/dohint.h",
-        "Source/DOH/file.c",
-        "Source/DOH/fio.c",
-        "Source/DOH/hash.c",
-        "Source/DOH/list.c",
-        "Source/DOH/memory.c",
-        "Source/DOH/string.c",
-        "Source/DOH/void.c",
-        "Source/Include/swigconfig.h",
-        "Source/Include/swigwarn.h",
-        "Source/Modules/allocate.cxx",
-        "Source/Modules/browser.cxx",
-        "Source/Modules/contract.cxx",
-        "Source/Modules/directors.cxx",
-        "Source/Modules/emit.cxx",
-        "Source/Modules/lang.cxx",
-        "Source/Modules/main.cxx",
-        "Source/Modules/module.cxx",
-        "Source/Modules/nested.cxx",
-        "Source/Modules/overload.cxx",
-        "Source/Modules/python.cxx",
-        "Source/Modules/swigmain-lite.cxx",
-        "Source/Modules/swigmod.h",
-        "Source/Modules/typepass.cxx",
-        "Source/Modules/uffi.cxx",
-        "Source/Modules/utils.cxx",
-        "Source/Modules/xml.cxx",
-        "Source/Preprocessor/cpp.c",
-        "Source/Preprocessor/expr.c",
-        "Source/Preprocessor/preprocessor.h",
-        "Source/Swig/cwrap.c",
-        "Source/Swig/deprecate.c",
-        "Source/Swig/error.c",
-        "Source/Swig/extend.c",
-        "Source/Swig/fragment.c",
-        "Source/Swig/getopt.c",
-        "Source/Swig/include.c",
-        "Source/Swig/misc.c",
-        "Source/Swig/naming.c",
-        "Source/Swig/parms.c",
-        "Source/Swig/scanner.c",
-        "Source/Swig/stype.c",
-        "Source/Swig/swig.h",
-        "Source/Swig/swigfile.h",
-        "Source/Swig/swigopt.h",
-        "Source/Swig/swigparm.h",
-        "Source/Swig/swigscan.h",
-        "Source/Swig/swigtree.h",
-        "Source/Swig/swigwrap.h",
-        "Source/Swig/symbol.c",
-        "Source/Swig/tree.c",
-        "Source/Swig/typemap.c",
-        "Source/Swig/typeobj.c",
-        "Source/Swig/typesys.c",
-        "Source/Swig/wrapfunc.c",
-    ],
-    copts = ["$(STACK_FRAME_UNLIMITED)"] + select({
-        ":windows": [],
-        ":windows_msvc": [],
-        "//conditions:default": [
-            "-Wno-parentheses",
-            "-Wno-unused-variable",
-            "-fexceptions",
-        ],
-    }),
-    data = [":templates"],
-    includes = [
-        "Source/CParse",
-        "Source/DOH",
-        "Source/Include",
-        "Source/Modules",
-        "Source/Preprocessor",
-        "Source/Swig",
-    ],
-    output_licenses = ["unencumbered"],
-    visibility = ["//visibility:public"],
-    deps = ["@pcre"],
-)
-
-filegroup(
-    name = "templates",
-    srcs = [
-        "Lib/allkw.swg",
-        "Lib/attribute.i",
-        "Lib/carrays.i",
-        "Lib/cdata.i",
-        "Lib/cffi/cffi.swg",
-        "Lib/cmalloc.i",
-        "Lib/constraints.i",
-        "Lib/cpointer.i",
-        "Lib/cstring.i",
-        "Lib/cwstring.i",
-        "Lib/exception.i",
-        "Lib/intrusive_ptr.i",
-        "Lib/inttypes.i",
-        "Lib/linkruntime.c",
-        "Lib/math.i",
-        "Lib/pointer.i",
-        "Lib/python/argcargv.i",
-        "Lib/python/attribute.i",
-        "Lib/python/boost_shared_ptr.i",
-        "Lib/python/builtin.swg",
-        "Lib/python/carrays.i",
-        "Lib/python/ccomplex.i",
-        "Lib/python/cdata.i",
-        "Lib/python/cmalloc.i",
-        "Lib/python/cni.i",
-        "Lib/python/complex.i",
-        "Lib/python/cpointer.i",
-        "Lib/python/cstring.i",
-        "Lib/python/cwstring.i",
-        "Lib/python/defarg.swg",
-        "Lib/python/director.swg",
-        "Lib/python/embed.i",
-        "Lib/python/embed15.i",
-        "Lib/python/exception.i",
-        "Lib/python/factory.i",
-        "Lib/python/file.i",
-        "Lib/python/implicit.i",
-        "Lib/python/jstring.i",
-        "Lib/python/pyabc.i",
-        "Lib/python/pyapi.swg",
-        "Lib/python/pybackward.swg",
-        "Lib/python/pybuffer.i",
-        "Lib/python/pyclasses.swg",
-        "Lib/python/pycomplex.swg",
-        "Lib/python/pycontainer.swg",
-        "Lib/python/pydocs.swg",
-        "Lib/python/pyerrors.swg",
-        "Lib/python/pyfragments.swg",
-        "Lib/python/pyhead.swg",
-        "Lib/python/pyinit.swg",
-        "Lib/python/pyiterators.swg",
-        "Lib/python/pymacros.swg",
-        "Lib/python/pyname_compat.i",
-        "Lib/python/pyopers.swg",
-        "Lib/python/pyprimtypes.swg",
-        "Lib/python/pyrun.swg",
-        "Lib/python/pyruntime.swg",
-        "Lib/python/pystdcommon.swg",
-        "Lib/python/pystrings.swg",
-        "Lib/python/python.swg",
-        "Lib/python/pythonkw.swg",
-        "Lib/python/pythreads.swg",
-        "Lib/python/pytuplehlp.swg",
-        "Lib/python/pytypemaps.swg",
-        "Lib/python/pyuserdir.swg",
-        "Lib/python/pywstrings.swg",
-        "Lib/python/std_alloc.i",
-        "Lib/python/std_auto_ptr.i",
-        "Lib/python/std_basic_string.i",
-        "Lib/python/std_carray.i",
-        "Lib/python/std_char_traits.i",
-        "Lib/python/std_common.i",
-        "Lib/python/std_complex.i",
-        "Lib/python/std_container.i",
-        "Lib/python/std_deque.i",
-        "Lib/python/std_except.i",
-        "Lib/python/std_ios.i",
-        "Lib/python/std_iostream.i",
-        "Lib/python/std_list.i",
-        "Lib/python/std_map.i",
-        "Lib/python/std_multimap.i",
-        "Lib/python/std_multiset.i",
-        "Lib/python/std_pair.i",
-        "Lib/python/std_set.i",
-        "Lib/python/std_shared_ptr.i",
-        "Lib/python/std_sstream.i",
-        "Lib/python/std_streambuf.i",
-        "Lib/python/std_string.i",
-        "Lib/python/std_unordered_map.i",
-        "Lib/python/std_unordered_multimap.i",
-        "Lib/python/std_unordered_multiset.i",
-        "Lib/python/std_unordered_set.i",
-        "Lib/python/std_vector.i",
-        "Lib/python/std_vectora.i",
-        "Lib/python/std_wios.i",
-        "Lib/python/std_wiostream.i",
-        "Lib/python/std_wsstream.i",
-        "Lib/python/std_wstreambuf.i",
-        "Lib/python/std_wstring.i",
-        "Lib/python/stl.i",
-        "Lib/python/typemaps.i",
-        "Lib/python/wchar.i",
-        "Lib/runtime.swg",
-        "Lib/shared_ptr.i",
-        "Lib/std/_std_deque.i",
-        "Lib/std/std_alloc.i",
-        "Lib/std/std_basic_string.i",
-        "Lib/std/std_carray.swg",
-        "Lib/std/std_char_traits.i",
-        "Lib/std/std_common.i",
-        "Lib/std/std_container.i",
-        "Lib/std/std_deque.i",
-        "Lib/std/std_except.i",
-        "Lib/std/std_ios.i",
-        "Lib/std/std_iostream.i",
-        "Lib/std/std_list.i",
-        "Lib/std/std_map.i",
-        "Lib/std/std_multimap.i",
-        "Lib/std/std_multiset.i",
-        "Lib/std/std_pair.i",
-        "Lib/std/std_queue.i",
-        "Lib/std/std_set.i",
-        "Lib/std/std_sstream.i",
-        "Lib/std/std_stack.i",
-        "Lib/std/std_streambuf.i",
-        "Lib/std/std_string.i",
-        "Lib/std/std_unordered_map.i",
-        "Lib/std/std_unordered_multimap.i",
-        "Lib/std/std_unordered_multiset.i",
-        "Lib/std/std_unordered_set.i",
-        "Lib/std/std_vector.i",
-        "Lib/std/std_vectora.i",
-        "Lib/std/std_wios.i",
-        "Lib/std/std_wiostream.i",
-        "Lib/std/std_wsstream.i",
-        "Lib/std/std_wstreambuf.i",
-        "Lib/std/std_wstring.i",
-        "Lib/std_except.i",
-        "Lib/stdint.i",
-        "Lib/stl.i",
-        "Lib/swig.swg",
-        "Lib/swigarch.i",
-        "Lib/swigerrors.swg",
-        "Lib/swiginit.swg",
-        "Lib/swiglabels.swg",
-        "Lib/swigrun.i",
-        "Lib/swigrun.swg",
-        "Lib/swigwarn.swg",
-        "Lib/swigwarnings.swg",
-        "Lib/typemaps/attribute.swg",
-        "Lib/typemaps/carrays.swg",
-        "Lib/typemaps/cdata.swg",
-        "Lib/typemaps/cmalloc.swg",
-        "Lib/typemaps/cpointer.swg",
-        "Lib/typemaps/cstring.swg",
-        "Lib/typemaps/cstrings.swg",
-        "Lib/typemaps/cwstring.swg",
-        "Lib/typemaps/enumint.swg",
-        "Lib/typemaps/exception.swg",
-        "Lib/typemaps/factory.swg",
-        "Lib/typemaps/fragments.swg",
-        "Lib/typemaps/implicit.swg",
-        "Lib/typemaps/inoutlist.swg",
-        "Lib/typemaps/misctypes.swg",
-        "Lib/typemaps/primtypes.swg",
-        "Lib/typemaps/ptrtypes.swg",
-        "Lib/typemaps/std_except.swg",
-        "Lib/typemaps/std_string.swg",
-        "Lib/typemaps/std_strings.swg",
-        "Lib/typemaps/std_wstring.swg",
-        "Lib/typemaps/string.swg",
-        "Lib/typemaps/strings.swg",
-        "Lib/typemaps/swigmacros.swg",
-        "Lib/typemaps/swigobject.swg",
-        "Lib/typemaps/swigtype.swg",
-        "Lib/typemaps/swigtypemaps.swg",
-        "Lib/typemaps/traits.swg",
-        "Lib/typemaps/typemaps.swg",
-        "Lib/typemaps/valtypes.swg",
-        "Lib/typemaps/void.swg",
-        "Lib/typemaps/wstring.swg",
-        "Lib/wchar.i",
-        "Lib/windows.i",
-    ],
-    licenses = ["notice"],  # simple notice license for Lib/
-    path = "Lib",
-    visibility = ["//visibility:public"],
-)
-
-genrule(
-    name = "swigconfig",
-    outs = ["Source/Include/swigconfig.h"],
-    cmd = "cat <<EOF >$@\n" +
-          "#define HAVE_BOOL\n" +
-          "#define HAVE_PCRE\n" +
-          "#define HAVE_POPEN\n" +
-          "#define PACKAGE_BUGREPORT \"http://www.swig.org\"\n" +
-          "#define PACKAGE_VERSION \"3.0.8\"\n" +
-          "#define STDC_HEADERS\n" +
-          "#define SWIG_CXX \"bazel4lyfe\"\n" +
-          "#define SWIG_LIB \"external/swig/Lib\"\n" +
-          "#define SWIG_LIB_WIN_UNIX \"\"\n" +
-          "#define SWIG_PLATFORM \"bazel4lyfe\"\n" +
-          "EOF",
-)
-
-genrule(
-    name = "get_rid_of_stuff_we_dont_need_yet",
-    srcs = ["Source/Modules/swigmain.cxx"],
-    outs = ["Source/Modules/swigmain-lite.cxx"],
-    cmd = "sed -e '/swig_allegrocl/d'" +
-          "    -e '/swig_cffi/d'" +
-          "    -e '/swig_chicken/d'" +
-          "    -e '/swig_clisp/d'" +
-          "    -e '/swig_csharp/d'" +
-          "    -e '/swig_d/d'" +
-          "    -e '/swig_go/d'" +
-          "    -e '/swig_guile/d'" +
-          "    -e '/swig_java/d'" +
-          "    -e '/swig_lua/d'" +
-          "    -e '/swig_modula3/d'" +
-          "    -e '/swig_mzscheme/d'" +
-          "    -e '/swig_ocaml/d'" +
-          "    -e '/swig_octave/d'" +
-          "    -e '/swig_perl/d'" +
-          "    -e '/swig_php/d'" +
-          "    -e '/swig_pike/d'" +
-          "    -e '/swig_r/d'" +
-          "    -e '/swig_ruby/d'" +
-          "    -e '/swig_scilab/d'" +
-          "    -e '/swig_sexp/d'" +
-          "    -e '/swig_tcl/d'" +
-          "    -e '/swig_uffi/d'" +
-          "    $< >$@",
-)
-
-config_setting(
-    name = "windows_msvc",
-    values = {"cpu": "x64_windows_msvc"},
-)
-
-config_setting(
-    name = "windows",
-    values = {"cpu": "x64_windows"},
-)
diff --git a/third_party/sycl/BUILD b/third_party/sycl/BUILD
deleted file mode 100644
index f631b6d..0000000
--- a/third_party/sycl/BUILD
+++ /dev/null
@@ -1,3 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"])  # Apache 2.0
diff --git a/third_party/sycl/crosstool/BUILD b/third_party/sycl/crosstool/BUILD
deleted file mode 100644
index e69de29..0000000
--- a/third_party/sycl/crosstool/BUILD
+++ /dev/null
diff --git a/third_party/sycl/crosstool/BUILD.tpl b/third_party/sycl/crosstool/BUILD.tpl
deleted file mode 100755
index cd8df93..0000000
--- a/third_party/sycl/crosstool/BUILD.tpl
+++ /dev/null
@@ -1,29 +0,0 @@
-licenses(["notice"])  # Apache 2.0
-
-package(default_visibility = ["//visibility:public"])
-
-cc_toolchain_suite(
-    name = "toolchain",
-    toolchains = {
-        "local|compiler": ":cc-compiler-local",
-    },
-)
-
-cc_toolchain(
-    name = "cc-compiler-local",
-    all_files = ":empty",
-    compiler_files = ":empty",
-    cpu = "local",
-    dwp_files = ":empty",
-    dynamic_runtime_libs = [":empty"],
-    linker_files = ":empty",
-    objcopy_files = ":empty",
-    static_runtime_libs = [":empty"],
-    strip_files = ":empty",
-    supports_param_files = 1,
-)
-
-filegroup(
-    name = "empty",
-    srcs = [],
-)
diff --git a/third_party/sycl/crosstool/CROSSTOOL.tpl b/third_party/sycl/crosstool/CROSSTOOL.tpl
deleted file mode 100755
index f8e50ef..0000000
--- a/third_party/sycl/crosstool/CROSSTOOL.tpl
+++ /dev/null
@@ -1,217 +0,0 @@
-major_version: "local"
-minor_version: ""
-default_target_cpu: "same_as_host"
-
-default_toolchain {
-  cpu: "k8"
-  toolchain_identifier: "local_linux"
-}
-
-default_toolchain {
-  cpu: "arm"
-  toolchain_identifier: "local_arm"
-}
-
-toolchain {
-  abi_version: "local"
-  abi_libc_version: "local"
-  builtin_sysroot: ""
-  compiler: "compiler"
-  host_system_name: "local"
-  needsPic: true
-  supports_gold_linker: false
-  supports_incremental_linker: false
-  supports_fission: false
-  supports_interface_shared_objects: false
-  supports_normalizing_ar: false
-  supports_start_end_lib: false
-  supports_thin_archives: false
-  target_libc: "local"
-  target_cpu: "local"
-  target_system_name: "local"
-  toolchain_identifier: "local_linux"
-
-  tool_path { name: "ar" path: "/usr/bin/ar" }
-  tool_path { name: "compat-ld" path: "/usr/bin/ld" }
-  tool_path { name: "cpp" path: "/usr/bin/cpp" }
-  tool_path { name: "dwp" path: "/usr/bin/dwp" }
-  tool_path { name: "gcc" path: "%{sycl_impl}" }
-  # Use "-std=c++11" for nvcc. For consistency, force both the host compiler
-  # and the device compiler to use "-std=c++11".
-  cxx_flag: "%{c++_std}"
-  linker_flag: "-Wl,-no-as-needed"
-  linker_flag: "-lstdc++"
-  linker_flag: "-B/usr/bin/"
-
-  # TODO(bazel-team): In theory, the path here ought to exactly match the path
-  # used by gcc. That works because bazel currently doesn't track files at
-  # absolute locations and has no remote execution, yet. However, this will need
-  # to be fixed, maybe with auto-detection?
-  cxx_builtin_include_directory: "/usr/lib/gcc/"
-  cxx_builtin_include_directory: "/usr/lib"
-  cxx_builtin_include_directory: "/usr/lib64"
-  cxx_builtin_include_directory: "/usr/local/include"
-  cxx_builtin_include_directory: "/usr/include"
-
-  cxx_builtin_include_directory: "%{sycl_include_dir}"
-  cxx_builtin_include_directory: "%{python_lib_path}"
-
-  tool_path { name: "gcov" path: "/usr/bin/gcov" }
-
-  # C(++) compiles invoke the compiler (as that is the one knowing where
-  # to find libraries), but we provide LD so other rules can invoke the linker.
-  tool_path { name: "ld" path: "/usr/bin/ld" }
-
-  tool_path { name: "nm" path: "/usr/bin/nm" }
-  tool_path { name: "objcopy" path: "/usr/bin/objcopy" }
-  objcopy_embed_flag: "-I"
-  objcopy_embed_flag: "binary"
-  tool_path { name: "objdump" path: "/usr/bin/objdump" }
-  tool_path { name: "strip" path: "/usr/bin/strip" }
-
-  # Make C++ compilation deterministic. Use linkstamping instead of these
-  # compiler symbols.
-  unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
-  unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
-
-  compiler_flag: "-fPIE"
-
-  # Keep stack frames for debugging, even in opt mode.
-  compiler_flag: "-fno-omit-frame-pointer"
-
-  # Anticipated future default.
-  linker_flag: "-no-canonical-prefixes"
-  unfiltered_cxx_flag: "-fno-canonical-system-headers"
-
-  # Have gcc return the exit code from ld.
-  linker_flag: "-pass-exit-codes"
-
-  # All warnings are enabled. Maybe enable -Werror as well?
-  compiler_flag: "-Wall"
-
-  # Enable SSE instructions by default
-  compiler_flag: "-msse3"
-
-  # Anticipated future default.
-  linker_flag: "-Wl,-no-as-needed"
-  # Stamp the binary with a unique identifier.
-  linker_flag: "-Wl,--build-id=md5"
-  linker_flag: "-Wl,--hash-style=gnu"
-
-  linking_mode_flags { mode: DYNAMIC }
-
-  compilation_mode_flags {
-    mode: FASTBUILD
-    compiler_flag: "-O0"
-  }
-
-  compilation_mode_flags {
-    mode: DBG
-    compiler_flag: "-g"
-  }
-
-  compilation_mode_flags {
-    mode: OPT
-    compiler_flag: "-g0"
-    compiler_flag: "-O2"
-    compiler_flag: "-DNDEBUG"
-    compiler_flag: "-ffunction-sections"
-    compiler_flag: "-fdata-sections"
-    linker_flag: "-Wl,--gc-sections"
-  }
-}
-
-toolchain {
-  abi_version: "local"
-  abi_libc_version: "local"
-  builtin_sysroot: ""
-  compiler: "compiler"
-  host_system_name: "local"
-  needsPic: true
-  supports_gold_linker: false
-  supports_incremental_linker: false
-  supports_fission: false
-  supports_interface_shared_objects: false
-  supports_normalizing_ar: false
-  supports_start_end_lib: false
-  supports_thin_archives: false
-  target_libc: "local"
-  target_cpu: "local"
-  target_system_name: "local"
-  toolchain_identifier: "local_arm"
-
-  tool_path { name: "ar" path: "/usr/bin/ar" }
-  tool_path { name: "compat-ld" path: "/usr/bin/ld" }
-  tool_path { name: "cpp" path: "/usr/bin/cpp" }
-  tool_path { name: "dwp" path: "/usr/bin/dwp" }
-  tool_path { name: "gcc" path: "computecpp" }
-  # Use "-std=c++11" for nvcc. For consistency, force both the host compiler
-  # and the device compiler to use "-std=c++11".
-  cxx_flag: "-std=c++11"
-  linker_flag: "-Wl,-no-as-needed"
-  linker_flag: "-lstdc++"
-  linker_flag: "-B/usr/bin/"
-
-  # TODO(bazel-team): In theory, the path here ought to exactly match the path
-  # used by gcc. That works because bazel currently doesn't track files at
-  # absolute locations and has no remote execution, yet. However, this will need
-  # to be fixed, maybe with auto-detection?
-  cxx_builtin_include_directory: "/usr/lib/gcc/"
-  cxx_builtin_include_directory: "/usr/lib"
-  cxx_builtin_include_directory: "/usr/lib64"
-  cxx_builtin_include_directory: "/usr/local/include"
-  cxx_builtin_include_directory: "/usr/include"
-
-  cxx_builtin_include_directory: "%{computecpp_toolkit_path}"
-  cxx_builtin_include_directory: "%{python_lib_path}"
-
-  tool_path { name: "gcov" path: "/usr/bin/gcov" }
-
-  # C(++) compiles invoke the compiler (as that is the one knowing where
-  # to find libraries), but we provide LD so other rules can invoke the linker.
-  tool_path { name: "ld" path: "/usr/bin/ld" }
-
-  tool_path { name: "nm" path: "/usr/bin/nm" }
-  tool_path { name: "objcopy" path: "/usr/bin/objcopy" }
-  objcopy_embed_flag: "-I"
-  objcopy_embed_flag: "binary"
-  tool_path { name: "objdump" path: "/usr/bin/objdump" }
-  tool_path { name: "strip" path: "/usr/bin/strip" }
-
-  # Make C++ compilation deterministic. Use linkstamping instead of these
-  # compiler symbols.
-  unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
-  unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
-
-  # All warnings are enabled. Maybe enable -Werror as well?
-  compiler_flag: "-Wall"
-
-  # Anticipated future default.
-  linker_flag: "-Wl,-no-as-needed"
-  # Stamp the binary with a unique identifier.
-  linker_flag: "-Wl,--build-id=md5"
-  linker_flag: "-Wl,--hash-style=gnu"
-
-  linking_mode_flags { mode: DYNAMIC }
-
-  compilation_mode_flags {
-    mode: FASTBUILD
-    compiler_flag: "-O0"
-  }
-
-  compilation_mode_flags {
-    mode: DBG
-    compiler_flag: "-g"
-  }
-
-  compilation_mode_flags {
-    mode: OPT
-    compiler_flag: "-g0"
-    compiler_flag: "-O2"
-    compiler_flag: "-DNDEBUG"
-  }
-}
\ No newline at end of file
diff --git a/third_party/sycl/crosstool/computecpp.tpl b/third_party/sycl/crosstool/computecpp.tpl
deleted file mode 100755
index c699eab..0000000
--- a/third_party/sycl/crosstool/computecpp.tpl
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import sys
-import tempfile
-from subprocess import call, Popen, PIPE
-
-CPU_CXX_COMPILER = ('%{host_cxx_compiler}')
-CPU_C_COMPILER = ('%{host_c_compiler}')
-
-CURRENT_DIR = os.path.dirname(sys.argv[0])
-COMPUTECPP_ROOT = CURRENT_DIR + '/../sycl/'
-COMPUTECPP_DRIVER= COMPUTECPP_ROOT + 'bin/compute++'
-COMPUTECPP_INCLUDE = COMPUTECPP_ROOT + 'include'
-
-def main():
-  remove_flags = ('-Wl,--no-undefined', '-Wno-unused-but-set-variable', '-Wignored-attributes')
-  # remove -fsanitize-coverage from string with g++
-  if 'g++' in CPU_CXX_COMPILER:
-    remove_flags += ('-fsanitize-coverage',)
-  compiler_flags = [flag for flag in sys.argv[1:] if not flag.startswith(remove_flags)]
-
-  output_file_index = compiler_flags.index('-o') + 1
-  output_file_name = compiler_flags[output_file_index]
-
-  if output_file_index == 1:
-    # we are linking
-    return call([CPU_CXX_COMPILER] + compiler_flags + ['-Wl,--no-undefined'])
-
-  # find what we compile
-  compiling_cpp = False
-  if '-c' in compiler_flags:
-    compiled_file_index = compiler_flags.index('-c') + 1
-    compiled_file_name = compiler_flags[compiled_file_index]
-    compiling_cpp = compiled_file_name.endswith(('.cc', '.c++', '.cpp', '.CPP', '.C', '.cxx'))
-
-  # add -D_GLIBCXX_USE_CXX11_ABI=0 to the command line if you have custom installation of GCC/Clang
-  compiler_flags = compiler_flags + ['-DEIGEN_USE_SYCL=1', '-DTENSORFLOW_USE_SYCL', '-DEIGEN_HAS_C99_MATH']
-
-  if not compiling_cpp:
-    # compile for C
-    return call([CPU_C_COMPILER] + compiler_flags)
-
-  # create a blacklist of folders that will be skipped when compiling with ComputeCpp
-  skip_extensions = [".cu.cc"]
-  skip_folders = ["tensorflow/compiler", "tensorflow/docs_src", "third_party", "external", "hexagon"]
-  skip_folders = [(folder + '/') for folder in skip_folders]
-  # if compiling external project skip computecpp
-  if any(compiled_file_name.endswith(_ext) for _ext in skip_extensions) or any(_folder in output_file_name for _folder in skip_folders):
-    return call([CPU_CXX_COMPILER] + compiler_flags)
-
-  # this is an optimisation that will check if compiled file has to be compiled with ComputeCpp
-  flags_without_output = list(compiler_flags)
-  del flags_without_output[output_file_index]   # remove output_file_name
-  del flags_without_output[output_file_index - 1] # remove '-o'
-  # create preprocessed of the file and store it for later use
-  pipe = Popen([CPU_CXX_COMPILER] + flags_without_output + ["-E"], stdout=PIPE)
-  preprocessed_file_str = pipe.communicate()[0]
-  if pipe.returncode != 0:
-    return pipe.returncode
-
-  # check if it has parallel_for in it
-  if not '.parallel_for' in preprocessed_file_str:
-    # call CXX compiler like usual
-    with tempfile.NamedTemporaryFile(suffix=".ii") as preprocessed_file: # Force '.ii' extension so that g++ does not preprocess the file again
-      preprocessed_file.write(preprocessed_file_str)
-      preprocessed_file.flush()
-      compiler_flags[compiled_file_index] = preprocessed_file.name
-      return call([CPU_CXX_COMPILER] + compiler_flags)
-  del preprocessed_file_str   # save some memory as this string can be quite big
-
-  filename, file_extension = os.path.splitext(output_file_name)
-  bc_out = filename + '.sycl'
-
-  # strip asan for the device
-  computecpp_device_compiler_flags = ['-sycl-compress-name', '-Wno-unused-variable', '-Wno-c++11-narrowing',
-                                      '-I', COMPUTECPP_INCLUDE, '-isystem', COMPUTECPP_INCLUDE,
-                                      '-std=c++11', '-sycl', '-emit-llvm', '-no-serial-memop',
-                                      '-Xclang', '-cl-denorms-are-zero', '-Xclang', '-cl-fp32-correctly-rounded-divide-sqrt']
-  # disable flags enabling SIMD instructions
-  computecpp_device_compiler_flags += [flag for flag in compiler_flags if \
-    not any(x in flag.lower() for x in ('-fsanitize', '-fno-canonical-system-headers', '=native', '=core2', 'msse', 'vectorize', 'mavx', 'mmmx', 'm3dnow', 'fma'))]
-
-  x = call([COMPUTECPP_DRIVER] + computecpp_device_compiler_flags)
-  if x == 0:
-    # dont want that in case of compiling with computecpp first
-    host_compiler_flags = [flag for flag in compiler_flags if (not flag.startswith(('-MF', '-MD',)) and not '.d' in flag)]
-    host_compiler_flags[host_compiler_flags.index('-c')] = "--include"
-    host_compiler_flags = ['-xc++', '-Wno-unused-variable', '-I', COMPUTECPP_INCLUDE, '-c', bc_out] + host_compiler_flags
-    x = call([CPU_CXX_COMPILER] + host_compiler_flags)
-  return x
-
-if __name__ == '__main__':
-  sys.exit(main())
diff --git a/third_party/sycl/crosstool/trisycl.tpl b/third_party/sycl/crosstool/trisycl.tpl
deleted file mode 100644
index 87a70d8..0000000
--- a/third_party/sycl/crosstool/trisycl.tpl
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import sys
-import tempfile
-from subprocess import call
-
-CPU_CXX_COMPILER = ('%{host_cxx_compiler}')
-CPU_C_COMPILER = ('%{host_c_compiler}')
-
-CURRENT_DIR = os.path.dirname(sys.argv[0])
-TRISYCL_INCLUDE_DIR = CURRENT_DIR + '/../sycl/include'
-
-
-def main():
-  compiler_flags = []
-
-  remove_flags = ('-Wl,--no-undefined', '-Wno-unused-but-set-variable',
-                  '-Wignored-attributes', '-fno-exceptions')
-  # remove -fsamotoze-coverage from string with g++
-  if 'g++' in CPU_CXX_COMPILER:
-    remove_flags += ('-fsanitize-coverage',)
-    compiler_flags += ['-fopenmp']
-  else:
-    compiler_flags += ['-fopenmp=libomp']
-
-  compiler_flags += [
-      flag for flag in sys.argv[1:] if not flag.startswith(remove_flags)
-  ]
-
-  output_file_index = compiler_flags.index('-o') + 1
-  output_file_name = compiler_flags[output_file_index]
-
-  if (output_file_index == 1):
-    # we are linking
-    return call([CPU_CXX_COMPILER] + compiler_flags + ['-Wl,--no-undefined'])
-
-  # find what we compile
-  compiling_cpp = 0
-  if ('-c' in compiler_flags):
-    compiled_file_index = compiler_flags.index('-c') + 1
-    compiled_file_name = compiler_flags[compiled_file_index]
-    if (compiled_file_name.endswith(('.cc', '.c++', '.cpp', '.CPP', '.C',
-                                     '.cxx'))):
-      compiling_cpp = 1
-
-  debug_flags = [
-      '-DTRISYCL_DEBUG', '-DBOOST_LOG_DYN_LINK', '-DTRISYCL_TRACE_KERNEL',
-      '-lpthread', '-lboost_log', '-g', '-rdynamic'
-  ]
-
-  opt_flags = ['-DNDEBUG', '-DBOOST_DISABLE_ASSERTS', '-O3']
-
-  compiler_flags = compiler_flags + [
-      '-DEIGEN_USE_SYCL=1', '-DEIGEN_HAS_C99_MATH',
-      '-DEIGEN_MAX_ALIGN_BYTES=16', '-DTENSORFLOW_USE_SYCL'
-  ] + opt_flags
-
-  if (compiling_cpp == 1):
-    # create a blacklist of folders that will be skipped when compiling
-    # with triSYCL
-    skip_extensions = ['.cu.cc']
-    skip_folders = [
-        'tensorflow/compiler', 'tensorflow/docs_src', 'tensorflow/tensorboard',
-        'third_party', 'external', 'hexagon'
-    ]
-    skip_folders = [(folder + '/') for folder in skip_folders]
-    # if compiling external project skip triSYCL
-    if any(
-        compiled_file_name.endswith(_ext) for _ext in skip_extensions) or any(
-            _folder in output_file_name for _folder in skip_folders):
-      return call([CPU_CXX_COMPILER] + compiler_flags)
-
-    host_compiler_flags = [
-        '-xc++', '-Wno-unused-variable', '-I', TRISYCL_INCLUDE_DIR
-    ] + compiler_flags
-    x = call([CPU_CXX_COMPILER] + host_compiler_flags)
-    return x
-  else:
-    # compile for C
-    return call([CPU_C_COMPILER] + compiler_flags)
-
-
-if __name__ == '__main__':
-  sys.exit(main())
diff --git a/third_party/sycl/sycl/BUILD b/third_party/sycl/sycl/BUILD
deleted file mode 100644
index b045609..0000000
--- a/third_party/sycl/sycl/BUILD
+++ /dev/null
@@ -1,7 +0,0 @@
-# Description:
-# A minimal BUILD file to make template files in this folder available. Without this BUILD file,
-# bazel returns errors when trying to access tpl files in this folder.
-
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"])  # Apache 2.0
diff --git a/third_party/sycl/sycl/BUILD.tpl b/third_party/sycl/sycl/BUILD.tpl
deleted file mode 100755
index b7e9aa8..0000000
--- a/third_party/sycl/sycl/BUILD.tpl
+++ /dev/null
@@ -1,56 +0,0 @@
-licenses(["notice"])  # Apache 2.0
-
-load("@local_config_sycl//sycl:build_defs.bzl", "if_sycl")
-load(":platform.bzl", "sycl_library_path")
-
-load(":platform.bzl", "readlink_command")
-
-package(default_visibility = ["//visibility:public"])
-
-exports_files(["LICENSE.text"])
-
-config_setting(
-    name = "using_sycl_ccpp",
-    define_values = {
-        "using_sycl": "true",
-        "using_trisycl": "false",
-    },
-)
-
-config_setting(
-    name = "using_sycl_trisycl",
-    define_values = {
-        "using_sycl": "true",
-        "using_trisycl": "true",
-    },
-)
-
-
-cc_library(
-    name = "sycl_headers",
-    hdrs = glob([
-        "**/*.h",
-        "**/*.hpp",
-    ]),
-    includes = [".", "include"],
-)
-
-cc_library(
-    name = "syclrt",
-    srcs = [
-        sycl_library_path("ComputeCpp")
-    ],
-    data = [
-        sycl_library_path("ComputeCpp")
-    ],
-    includes = ["include/"],
-    linkstatic = 0,
-)
-
-cc_library(
-    name = "sycl",
-    deps = if_sycl([
-        ":sycl_headers",
-        ":syclrt",
-    ]),
-)
diff --git a/third_party/sycl/sycl/LICENSE.text b/third_party/sycl/sycl/LICENSE.text
deleted file mode 100644
index 8d3f050..0000000
--- a/third_party/sycl/sycl/LICENSE.text
+++ /dev/null
@@ -1,268 +0,0 @@
-
----------------------------------------------------------------------
-
-SOFTWARE LICENSE AGREEMENT
-
----------------------------------------------------------------------
----------------------------------------------------------------------
-
-By downloading, installing, copying, or otherwise using the
-ComputeCpp Community Edition software, including any associated
-components, media, printed materials, and electronic documentation
-("Software"), the user agrees to the following terms and conditions
-of this Software License Agreement ("Agreement"). Please read the
-terms of this Agreement carefully before beginning your download, as
-pressing the "I AGREE" button at the end of this Agreement will
-confirm your assent. If you do not agree to these terms, then
-Codeplay Software Limited is unwilling to license the Software to
-you; so please press the "CANCEL" button to cancel your download.
-
- 1. License. Codeplay Software Ltd., a company incorporated in
-    England and Wales with registered number 04567874 and having its
-    registered office at Regent House, 316 Beulah Hill, London,
-    United Kingdom, SE19 3HF ("Codeplay") hereby grants the user,
-    free of charge, a non-exclusive worldwide license to use and
-    replicate (but not modify) the Software for any use, whether
-    commercial or non-commercial, in accordance with this Agreement.
-    Codeplay reserves all rights to the Software that are not
-    expressly granted by this Agreement.
- 2. Redistribution. The user may copy and redistribute unmodified
-    copies of only those components of the Software which are
-    specified below ("Redistributable Components"), in object code
-    form, as part of the user’s software applications or libraries
-    ("Applications"). The user acknowledges and agrees that it has no
-    right to modify the Redistributable Components in any way. Any
-    use of the Redistributable Components within the user’s
-    Applications will continue to be subject to the terms and
-    conditions of this Agreement, and the user must also distribute a
-    copy of this Agreement and reproduce and include all notices of
-    copyrights or other proprietary rights in the Software. The
-    user’s redistribution of the Redistributable Components will not
-    entitle it to any payment from Codeplay. The user may not
-    transfer any of its rights or obligations under this Agreement.
-
-+-------------------------------------------+
-|Redistributable Component|File Name        |
-|-------------------------+-----------------|
-|Runtime (for Linux)      |libComputeCpp.so |
-|-------------------------+-----------------|
-|Runtime (for Windows)    |libComputeCpp.dll|
-+-------------------------------------------+
-
- 3. Restrictions. The user shall not:
-
-     a. circumvent or bypass any technological protection measures in
-        or relating to the Software;
-     b. use the Software to perform any unauthorized transfer of
-        information or for any illegal purpose;
-     c. de-compile, decrypt, disassemble, hack, emulate, exploit or
-        reverse-engineer the Software (other than to the limited
-        extent permitted by law);
-     d. copy or redistribute any components of the Software that are
-        not listed in the table of Redistributable Components;
-     e. publish, rent, lease, sell, export, import, or lend the
-        Software;
-     f. represent in any way that it is selling the Software itself
-        or any license to use the Software, nor refer to Codeplay or
-        ComputeCpp within its marketing materials, without the
-        express prior written permission of Codeplay.
- 4. Support. Codeplay does not provide any guarantees of support for
-    the Software to the user. Codeplay will use reasonable endeavors
-    to respond to users' support requests, for the most recent
-    release only, via the community support website at https://
-    computecpp.codeplay.com.
- 5. Intellectual Property. The Software is owned by Codeplay or its
-    licensors, and is protected by the copyright laws of the United
-    Kingdom and other countries and international treaty provisions.
-    Codeplay (and/or its licensors, as the case may be) retains all
-    copyrights, trade secrets and other proprietary rights in the
-    Software, including the rights to make and license the use of all
-    copies. To the extent that any patents owned by Codeplay or its
-    licensors relate to any component of the Software, the license
-    granted to the user in accordance with this Agreement allows for
-    the lawful use of such patents but only for the purposes of this
-    Agreement and not further or otherwise. Therefore, the user may
-    make no copies of the Software, or the written materials that
-    accompany the Software, or reproduce it in any way, except as set
-    forth above.
- 6. Terms. This Agreement is effective until terminated. Codeplay or
-    the user may terminate it immediately at any time. Any violation
-    of the terms of this Agreement by the user will result in
-    immediate termination by Codeplay. Upon termination, the user
-    must return or destroy the Software and accompanying materials
-    and notify Codeplay of its actions by email to info@codeplay.com.
- 7. NO WARRANTIES. Codeplay expressly disclaims any warranty for the
-    Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-    ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-    WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
-    AND NON-INFRINGEMENT. IN NO EVENT SHALL CODEPLAY BE LIABLE FOR
-    ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-    CONTRACT, DELICT OR TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-    CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-    SOFTWARE. In particular, Codeplay provides no guarantees of
-    application performance on the target hardware.
- 8. General. The invalidity of any portion or provision of this
-    Agreement shall not affect any other portions or provisions. This
-    Agreement shall be governed by the laws of Scotland. This
-    Agreement is the complete and exclusive agreement between the
-    user and Codeplay regarding the Software, and it supersedes any
-    prior agreement, oral or written, and any other communication
-    between the user and Codeplay relating to the subject matter of
-    the Agreement. Any amendment or modification of this Agreement
-    must be in writing and signed by both parties. If the user does
-    not agree to the terms of this Agreement, the user must not
-    install or use the Software.
- 9. Third Party Licenses. The following licenses are for third-party
-    components included in the software.
-
-     a. License for Clang/LLVM compiler technology components:
-
-==============================================================================
-
-LLVM Release License
-
-==============================================================================
-
-University of Illinois/NCSA
-
-Open Source License
-
-Copyright (c) 2007-2014 University of Illinois at Urbana-Champaign.
-
-All rights reserved.
-
-Developed by:
-
- LLVM Team
-
- University of Illinois at Urbana-Champaign
-
- http://llvm.org
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal with
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimers.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimers in the
- documentation and/or other materials provided with the distribution.
-
- * Neither the names of the LLVM Team, University of Illinois at
- Urbana-Champaign, nor the names of its contributors may be used to
- endorse or promote products derived from this Software without specific
- prior written permission.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
-SOFTWARE.
-
-==============================================================================
-
- b. License for OpenBSD regex components:
-
-$OpenBSD: COPYRIGHT,v 1.3 2003/06/02 20:18:36 millert Exp $
-Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved.
-This software is not subject to any license of the American Telephone
-and Telegraph Company or of the Regents of the University of California.
-Permission is granted to anyone to use this software for any purpose on
-any computer system, and to alter it and redistribute it, subject
-to the following restrictions:
-
-1. The author is not responsible for the consequences of use of this
- software, no matter how awful, even if they arise from flaws in it.
-
-2. The origin of this software must not be misrepresented, either by
- explicit claim or by omission. Since few users ever read sources,
- credits must appear in the documentation.
-
-3. Altered versions must be plainly marked as such, and must not be
- misrepresented as being the original software. Since few users
- ever read sources, credits must appear in the documentation.
-
-4. This notice may not be removed or altered.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-/*-
- * Copyright (c) 1994
- *      The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *                  @(#)COPYRIGHT8.1 (Berkeley) 3/16/94
- */
-
- c. License for MD5 components:
-
-/*
- * This code is derived from (original license follows):
- *
- * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
- * MD5 Message-Digest Algorithm (RFC 1321).
- *
- * Homepage:
- *  http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
- *
- * Author:
- * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
- *
- * This software was written by Alexander Peslyak in 2001. No copyright is
- * claimed, and the software is hereby placed in the public domain.
- * In case this attempt to disclaim copyright and place the software in the
- * public domain is deemed null and void, then the software is
- * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
- * general public under the following terms:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted.
- *
- * There's ABSOLUTELY NO WARRANTY, express or implied.
- *
- * (This is a heavily cut-down "BSD license".)
- *
- * This differs from Colin Plumb's older public domain implementation in that
- * no exactly 32-bit integer data type is required (any 32-bit or wider
- * unsigned integer data type will do), there's no compile-time endianness
- * configuration, and the function prototypes match OpenSSL's. No code from
- * Colin Plumb's implementation has been reused; this comment merely compares
- * the properties of the two independent implementations.
- *
- * The primary goals of this implementation are portability and ease of use.
- * It is meant to be fast, but not as fast as possible. Some known
- * optimizations are not included to reduce source code size and avoid
- * compile-time configuration.
- */
-
-
diff --git a/third_party/sycl/sycl/build_defs.bzl.tpl b/third_party/sycl/sycl/build_defs.bzl.tpl
deleted file mode 100755
index 33386f8..0000000
--- a/third_party/sycl/sycl/build_defs.bzl.tpl
+++ /dev/null
@@ -1,28 +0,0 @@
-# Macros for building SYCL code.
-
-def if_sycl(if_true, if_false = []):
-    """Shorthand for select()'ing on whether we're building with SYCL.
-
-    Returns a select statement which evaluates to if_true if we're building
-    with SYCL enabled.  Otherwise, the select statement evaluates to if_false.
-    If we are building with triSYCL instead of ComputeCPP, a list with
-    the first element of if_true is returned.
-    """
-    return select({
-        "@local_config_sycl//sycl:using_sycl_ccpp": if_true,
-        "@local_config_sycl//sycl:using_sycl_trisycl": if_true[0:1],
-        "//conditions:default": if_false
-    })
-
-def if_ccpp(if_true, if_false = []):
-    """Shorthand for select()'ing if we are building with ComputeCPP.
-
-    Returns a select statement which evaluates to if_true if we're building
-    with ComputeCPP enabled. Otherwise, the select statement evaluates
-    to if_false.
-    """
-    return select({
-        "@local_config_sycl//sycl:using_sycl_ccpp": if_true,
-        "@local_config_sycl//sycl:using_sycl_trisycl": if_false,
-        "//conditions:default": if_false
-    })
diff --git a/third_party/sycl/sycl/platform.bzl.tpl b/third_party/sycl/sycl/platform.bzl.tpl
deleted file mode 100755
index cb4b335..0000000
--- a/third_party/sycl/sycl/platform.bzl.tpl
+++ /dev/null
@@ -1,5 +0,0 @@
-def sycl_library_path(name):
-    return "lib/lib{}.so".format(name)
-
-def readlink_command():
-    return "readlink"
diff --git a/third_party/sycl/sycl_configure.bzl b/third_party/sycl/sycl_configure.bzl
deleted file mode 100644
index 5b9d0eb..0000000
--- a/third_party/sycl/sycl_configure.bzl
+++ /dev/null
@@ -1,250 +0,0 @@
-# -*- Python -*-
-"""SYCL autoconfiguration.
-`sycl_configure` depends on the following environment variables:
-
-  * HOST_CXX_COMPILER:  The host C++ compiler
-  * HOST_C_COMPILER:    The host C compiler
-  * COMPUTECPP_TOOLKIT_PATH: The path to the ComputeCpp toolkit.
-  * TRISYCL_INCLUDE_DIR: The path to the include directory of triSYCL.
-                         (if using triSYCL instead of ComputeCPP)
-  * PYTHON_LIB_PATH: The path to the python lib
-"""
-
-_HOST_CXX_COMPILER = "HOST_CXX_COMPILER"
-_HOST_C_COMPILER= "HOST_C_COMPILER"
-_COMPUTECPP_TOOLKIT_PATH = "COMPUTECPP_TOOLKIT_PATH"
-_TRISYCL_INCLUDE_DIR = "TRISYCL_INCLUDE_DIR"
-_PYTHON_LIB_PATH = "PYTHON_LIB_PATH"
-
-def _enable_sycl(repository_ctx):
-  if "TF_NEED_OPENCL_SYCL" in repository_ctx.os.environ:
-    enable_sycl = repository_ctx.os.environ["TF_NEED_OPENCL_SYCL"].strip()
-    return enable_sycl == "1"
-  return False
-
-def _enable_compute_cpp(repository_ctx):
-  return _COMPUTECPP_TOOLKIT_PATH in repository_ctx.os.environ
-
-def auto_configure_fail(msg):
-  """Output failure message when auto configuration fails."""
-  red = "\033[0;31m"
-  no_color = "\033[0m"
-  fail("\n%sAuto-Configuration Error:%s %s\n" % (red, no_color, msg))
-# END cc_configure common functions (see TODO above).
-
-def find_c(repository_ctx):
-  """Find host C compiler."""
-  c_name = "gcc"
-  if _HOST_C_COMPILER in repository_ctx.os.environ:
-    c_name = repository_ctx.os.environ[_HOST_C_COMPILER].strip()
-  if c_name.startswith("/"):
-    return c_name
-  c = repository_ctx.which(c_name)
-  if c == None:
-    fail("Cannot find C compiler, please correct your path.")
-  return c
-
-def find_cc(repository_ctx):
-  """Find host C++ compiler."""
-  cc_name = "g++"
-  if _HOST_CXX_COMPILER in repository_ctx.os.environ:
-    cc_name = repository_ctx.os.environ[_HOST_CXX_COMPILER].strip()
-  if cc_name.startswith("/"):
-    return cc_name
-  cc = repository_ctx.which(cc_name)
-  if cc == None:
-    fail("Cannot find C++ compiler, please correct your path.")
-  return cc
-
-def find_computecpp_root(repository_ctx):
-  """Find ComputeCpp compiler."""
-  sycl_name = ""
-  if _COMPUTECPP_TOOLKIT_PATH in repository_ctx.os.environ:
-    sycl_name = repository_ctx.os.environ[_COMPUTECPP_TOOLKIT_PATH].strip()
-  if sycl_name.startswith("/"):
-    return sycl_name
-  fail("Cannot find SYCL compiler, please correct your path")
-
-def find_trisycl_include_dir(repository_ctx):
-  """Find triSYCL include directory. """
-  if _TRISYCL_INCLUDE_DIR in repository_ctx.os.environ:
-    sycl_name = repository_ctx.os.environ[_TRISYCL_INCLUDE_DIR].strip()
-    if sycl_name.startswith("/"):
-      return sycl_name
-  fail( "Cannot find triSYCL include directory, please correct your path")
-
-def find_python_lib(repository_ctx):
-  """Returns python path."""
-  if _PYTHON_LIB_PATH in repository_ctx.os.environ:
-    return repository_ctx.os.environ[_PYTHON_LIB_PATH].strip()
-  fail("Environment variable PYTHON_LIB_PATH was not specified re-run ./configure")
-
-
-def _check_lib(repository_ctx, toolkit_path, lib):
-  """Checks if lib exists under sycl_toolkit_path or fail if it doesn't.
-
-  Args:
-    repository_ctx: The repository context.
-    toolkit_path: The toolkit directory containing the libraries.
-    ib: The library to look for under toolkit_path.
-  """
-  lib_path = toolkit_path + "/" + lib
-  if not repository_ctx.path(lib_path).exists:
-    auto_configure_fail("Cannot find %s" % lib_path)
-
-def _check_dir(repository_ctx, directory):
-  """Checks whether the directory exists and fail if it does not.
-
-  Args:
-    repository_ctx: The repository context.
-    directory: The directory to check the existence of.
-  """
-  if not repository_ctx.path(directory).exists:
-    auto_configure_fail("Cannot find dir: %s" % directory)
-
-def _symlink_dir(repository_ctx, src_dir, dest_dir):
-  """Symlinks all the files in a directory.
-
-  Args:
-    repository_ctx: The repository context.
-    src_dir: The source directory.
-    dest_dir: The destination directory to create the symlinks in.
-  """
-  files = repository_ctx.path(src_dir).readdir()
-  for src_file in files:
-    repository_ctx.symlink(src_file, dest_dir + "/" + src_file.basename)
-
-def _tpl(repository_ctx, tpl, substitutions={}, out=None):
-  if not out:
-    out = tpl.replace(":", "/")
-  repository_ctx.template(
-      out,
-      Label("//third_party/sycl/%s.tpl" % tpl),
-      substitutions)
-
-def _file(repository_ctx, label):
-  repository_ctx.template(
-      label.replace(":", "/"),
-      Label("//third_party/sycl/%s" % label),
-      {})
-
-_DUMMY_CROSSTOOL_BZL_FILE = """
-def error_sycl_disabled():
-  fail("ERROR: Building with --config=sycl but TensorFlow is not configured " +
-       "to build with SYCL support. Please re-run ./configure and enter 'Y' " +
-       "at the prompt to build with SYCL support.")
-
-  native.genrule(
-      name = "error_gen_crosstool",
-      outs = ["CROSSTOOL"],
-      cmd = "echo 'Should not be run.' && exit 1",
-  )
-
-  native.filegroup(
-      name = "crosstool",
-      srcs = [":CROSSTOOL"],
-      output_licenses = ["unencumbered"],
-  )
-"""
-
-
-_DUMMY_CROSSTOOL_BUILD_FILE = """
-load("//crosstool:error_sycl_disabled.bzl", "error_sycl_disabled")
-
-error_sycl_disabled()
-"""
-
-def _create_dummy_repository(repository_ctx):
-  # Set up BUILD file for sycl/.
-  _tpl(repository_ctx, "sycl:build_defs.bzl")
-  _tpl(repository_ctx, "sycl:BUILD")
-  _file(repository_ctx, "sycl:LICENSE.text")
-  _tpl(repository_ctx, "sycl:platform.bzl")
-
-  # Create dummy files for the SYCL toolkit since they are still required by
-  # tensorflow/sycl/platform/default/build_config:sycl.
-  repository_ctx.file("sycl/include/sycl.hpp", "")
-  repository_ctx.file("sycl/lib/libComputeCpp.so", "")
-
-  # If sycl_configure is not configured to build with SYCL support, and the user
-  # attempts to build with --config=sycl, add a dummy build rule to intercept
-  # this and fail with an actionable error message.
-  repository_ctx.file("crosstool/error_sycl_disabled.bzl",
-                      _DUMMY_CROSSTOOL_BZL_FILE)
-  repository_ctx.file("crosstool/BUILD", _DUMMY_CROSSTOOL_BUILD_FILE)
-
-
-def _sycl_autoconf_imp(repository_ctx):
-  """Implementation of the sycl_autoconf rule."""
-  if not _enable_sycl(repository_ctx):
-    _create_dummy_repository(repository_ctx)
-  else:
-    # copy template files
-    _tpl(repository_ctx, "sycl:build_defs.bzl")
-    _tpl(repository_ctx, "sycl:BUILD")
-    _tpl(repository_ctx, "sycl:platform.bzl")
-    _tpl(repository_ctx, "crosstool:BUILD")
-    _file(repository_ctx, "sycl:LICENSE.text")
-
-    if _enable_compute_cpp(repository_ctx):
-      _tpl(repository_ctx, "crosstool:computecpp",
-      {
-        "%{host_cxx_compiler}" : find_cc(repository_ctx),
-        "%{host_c_compiler}" : find_c(repository_ctx)
-      })
-
-      computecpp_root = find_computecpp_root(repository_ctx);
-      _check_dir(repository_ctx, computecpp_root)
-
-      _tpl(repository_ctx, "crosstool:CROSSTOOL",
-      {
-        "%{sycl_include_dir}" : computecpp_root,
-        "%{sycl_impl}" : "computecpp",
-        "%{c++_std}" : "-std=c++11",
-        "%{python_lib_path}" : find_python_lib(repository_ctx),
-      })
-
-      # symlink libraries
-      _check_lib(repository_ctx, computecpp_root+"/lib", "libComputeCpp.so" )
-      _symlink_dir(repository_ctx, computecpp_root + "/lib", "sycl/lib")
-      _symlink_dir(repository_ctx, computecpp_root + "/include", "sycl/include")
-      _symlink_dir(repository_ctx, computecpp_root + "/bin", "sycl/bin")
-    else:
-
-      trisycl_include_dir = find_trisycl_include_dir(repository_ctx);
-      _check_dir(repository_ctx, trisycl_include_dir)
-
-      _tpl(repository_ctx, "crosstool:trisycl",
-      {
-        "%{host_cxx_compiler}" : find_cc(repository_ctx),
-        "%{host_c_compiler}" : find_c(repository_ctx),
-        "%{trisycl_include_dir}" : trisycl_include_dir
-      })
-
-
-      _tpl(repository_ctx, "crosstool:CROSSTOOL",
-      {
-        "%{sycl_include_dir}" : trisycl_include_dir,
-        "%{sycl_impl}" : "trisycl",
-        "%{c++_std}" : "-std=c++1y",
-        "%{python_lib_path}" : find_python_lib(repository_ctx),
-      })
-
-      _symlink_dir(repository_ctx, trisycl_include_dir, "sycl/include")
-
-
-sycl_configure = repository_rule(
-  implementation = _sycl_autoconf_imp,
-  local = True,
-)
-"""Detects and configures the SYCL toolchain.
-
-Add the following to your WORKSPACE FILE:
-
-```python
-sycl_configure(name = "local_config_sycl")
-```
-
-Args:
-  name: A unique name for this workspace rule.
-"""
diff --git a/third_party/tensorrt/BUILD b/third_party/tensorrt/BUILD
deleted file mode 100644
index e69de29..0000000
--- a/third_party/tensorrt/BUILD
+++ /dev/null
diff --git a/third_party/tensorrt/BUILD.tpl b/third_party/tensorrt/BUILD.tpl
deleted file mode 100644
index 57682e8..0000000
--- a/third_party/tensorrt/BUILD.tpl
+++ /dev/null
@@ -1,39 +0,0 @@
-# NVIDIA TensorRT
-# A high-performance deep learning inference optimizer and runtime.
-
-licenses(["notice"])
-
-exports_files(["LICENSE"])
-
-load("@local_config_cuda//cuda:build_defs.bzl", "cuda_default_copts")
-
-package(default_visibility = ["//visibility:public"])
-
-cc_library(
-    name = "tensorrt_headers",
-    hdrs = [%{tensorrt_headers}],
-    includes = [
-        "include",
-    ],
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "nv_infer",
-    srcs = [%{nv_infer}],
-    data = [%{nv_infer}],
-    includes = [
-        "include",
-    ],
-    copts= cuda_default_copts(),
-    deps = [
-        "@local_config_cuda//cuda:cuda",
-        ":tensorrt_headers",
-    ],
-    linkstatic = 1,
-    visibility = ["//visibility:public"],
-)
-
-
-%{tensorrt_genrules}
-
diff --git a/third_party/tensorrt/LICENSE b/third_party/tensorrt/LICENSE
deleted file mode 100644
index 146d9b7..0000000
--- a/third_party/tensorrt/LICENSE
+++ /dev/null
@@ -1,203 +0,0 @@
-Copyright 2018 The TensorFlow Authors.  All rights reserved.
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright 2018, The TensorFlow Authors.
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
diff --git a/third_party/tensorrt/build_defs.bzl.tpl b/third_party/tensorrt/build_defs.bzl.tpl
deleted file mode 100644
index 0dc3a7b..0000000
--- a/third_party/tensorrt/build_defs.bzl.tpl
+++ /dev/null
@@ -1,7 +0,0 @@
-# Build configurations for TensorRT.
-
-def if_tensorrt(if_true, if_false=[]):
-  """Tests whether TensorRT was enabled during the configure process."""
-  if %{tensorrt_is_configured}:
-    return if_true
-  return if_false
diff --git a/third_party/tensorrt/tensorrt_configure.bzl b/third_party/tensorrt/tensorrt_configure.bzl
deleted file mode 100644
index 9b94650..0000000
--- a/third_party/tensorrt/tensorrt_configure.bzl
+++ /dev/null
@@ -1,225 +0,0 @@
-# -*- Python -*-
-"""Repository rule for TensorRT configuration.
-
-`tensorrt_configure` depends on the following environment variables:
-
-  * `TF_TENSORRT_VERSION`: The TensorRT libnvinfer version.
-  * `TENSORRT_INSTALL_PATH`: The installation path of the TensorRT library.
-"""
-
-load(
-    "//third_party/gpus:cuda_configure.bzl",
-    "auto_configure_fail",
-    "get_cpu_value",
-    "find_cuda_define",
-    "matches_version",
-    "symlink_genrule_for_dir",
-)
-
-_TENSORRT_INSTALL_PATH = "TENSORRT_INSTALL_PATH"
-_TF_TENSORRT_VERSION = "TF_TENSORRT_VERSION"
-
-_TF_TENSORRT_LIBS = ["nvinfer"]
-_TF_TENSORRT_HEADERS = ["NvInfer.h", "NvUtils.h"]
-
-_DEFINE_TENSORRT_SONAME_MAJOR = "#define NV_TENSORRT_SONAME_MAJOR"
-_DEFINE_TENSORRT_SONAME_MINOR = "#define NV_TENSORRT_SONAME_MINOR"
-_DEFINE_TENSORRT_SONAME_PATCH = "#define NV_TENSORRT_SONAME_PATCH"
-
-
-def _headers_exist(repository_ctx, path):
-  """Returns whether all TensorRT header files could be found in 'path'.
-
-  Args:
-    repository_ctx: The repository context.
-    path: The TensorRT include path to check.
-
-  Returns:
-    True if all TensorRT header files can be found in the path.
-  """
-  for h in _TF_TENSORRT_HEADERS:
-    if not repository_ctx.path("%s/%s" % (path, h)).exists:
-      return False
-  return True
-
-
-def _find_trt_header_dir(repository_ctx, trt_install_path):
-  """Returns the path to the directory containing headers of TensorRT.
-
-  Args:
-    repository_ctx: The repository context.
-    trt_install_path: The TensorRT library install directory.
-
-  Returns:
-    The path of the directory containing the TensorRT header.
-  """
-  if trt_install_path == "/usr/lib/x86_64-linux-gnu":
-    path = "/usr/include/x86_64-linux-gnu"
-    if _headers_exist(repository_ctx, path):
-      return path
-  if trt_install_path == "/usr/lib/aarch64-linux-gnu":
-    path = "/usr/include/aarch64-linux-gnu"
-    if _headers_exist(repository_ctx, path):
-      return path
-  path = str(repository_ctx.path("%s/../include" % trt_install_path).realpath)
-  if _headers_exist(repository_ctx, path):
-    return path
-  auto_configure_fail(
-      "Cannot find NvInfer.h with TensorRT install path %s" % trt_install_path)
-
-
-def _trt_lib_version(repository_ctx, trt_install_path):
-  """Detects the library (e.g. libnvinfer) version of TensorRT.
-
-  Args:
-    repository_ctx: The repository context.
-    trt_install_path: The TensorRT library install directory.
-
-  Returns:
-    A string containing the library version of TensorRT.
-  """
-  trt_header_dir = _find_trt_header_dir(repository_ctx, trt_install_path)
-  major_version = find_cuda_define(repository_ctx, trt_header_dir, "NvInfer.h",
-                                   _DEFINE_TENSORRT_SONAME_MAJOR)
-  minor_version = find_cuda_define(repository_ctx, trt_header_dir, "NvInfer.h",
-                                   _DEFINE_TENSORRT_SONAME_MINOR)
-  patch_version = find_cuda_define(repository_ctx, trt_header_dir, "NvInfer.h",
-                                   _DEFINE_TENSORRT_SONAME_PATCH)
-  full_version = "%s.%s.%s" % (major_version, minor_version, patch_version)
-  environ_version = repository_ctx.os.environ[_TF_TENSORRT_VERSION].strip()
-  if not matches_version(environ_version, full_version):
-    auto_configure_fail(
-        ("TensorRT library version detected from %s/%s (%s) does not match " +
-         "TF_TENSORRT_VERSION (%s). To fix this rerun configure again.") %
-        (trt_header_dir, "NvInfer.h", full_version, environ_version))
-  return environ_version
-
-
-def _find_trt_libs(repository_ctx, trt_install_path, trt_lib_version):
-  """Finds the given TensorRT library on the system.
-
-  Adapted from code contributed by Sami Kama (https://github.com/samikama).
-
-  Args:
-    repository_ctx: The repository context.
-    trt_install_path: The TensorRT library installation directory.
-    trt_lib_version: The version of TensorRT library files as returned
-      by _trt_lib_version.
-
-  Returns:
-    Map of library names to structs with the following fields:
-      src_file_path: The full path to the library found on the system.
-      dst_file_name: The basename of the target library.
-  """
-  objdump = repository_ctx.which("objdump")
-  result = {}
-  for lib in _TF_TENSORRT_LIBS:
-    dst_file_name = "lib%s.so.%s" % (lib, trt_lib_version)
-    src_file_path = repository_ctx.path("%s/%s" % (trt_install_path,
-                                                   dst_file_name))
-    if not src_file_path.exists:
-      auto_configure_fail(
-          "Cannot find TensorRT library %s" % str(src_file_path))
-    if objdump != None:
-      objdump_out = repository_ctx.execute([objdump, "-p", str(src_file_path)])
-      for line in objdump_out.stdout.splitlines():
-        if "SONAME" in line:
-          dst_file_name = line.strip().split(" ")[-1]
-    result.update({
-        lib:
-            struct(
-                dst_file_name=dst_file_name,
-                src_file_path=str(src_file_path.realpath))
-    })
-  return result
-
-
-def _tpl(repository_ctx, tpl, substitutions):
-  repository_ctx.template(tpl, Label("//third_party/tensorrt:%s.tpl" % tpl),
-                          substitutions)
-
-
-def _create_dummy_repository(repository_ctx):
-  """Create a dummy TensorRT repository."""
-  _tpl(repository_ctx, "build_defs.bzl", {"%{tensorrt_is_configured}": "False"})
-  substitutions = {
-      "%{tensorrt_genrules}": "",
-      "%{tensorrt_headers}": "",
-  }
-  for lib in _TF_TENSORRT_LIBS:
-    k = "%%{%s}" % lib.replace("nv", "nv_")
-    substitutions.update({k: ""})
-  _tpl(repository_ctx, "BUILD", substitutions)
-
-
-def _tensorrt_configure_impl(repository_ctx):
-  """Implementation of the tensorrt_configure repository rule."""
-  if _TENSORRT_INSTALL_PATH not in repository_ctx.os.environ:
-    _create_dummy_repository(repository_ctx)
-    return
-
-  if (get_cpu_value(repository_ctx) != "Linux"):
-    auto_configure_fail("TensorRT is supported only on Linux.")
-  if _TF_TENSORRT_VERSION not in repository_ctx.os.environ:
-    auto_configure_fail("TensorRT library (libnvinfer) version is not set.")
-  trt_install_path = repository_ctx.os.environ[_TENSORRT_INSTALL_PATH].strip()
-  if not repository_ctx.path(trt_install_path).exists:
-    auto_configure_fail(
-        "Cannot find TensorRT install path %s." % trt_install_path)
-
-  # Set up the symbolic links for the library files.
-  trt_lib_version = _trt_lib_version(repository_ctx, trt_install_path)
-  trt_libs = _find_trt_libs(repository_ctx, trt_install_path, trt_lib_version)
-  trt_lib_src = []
-  trt_lib_dest = []
-  for lib in trt_libs.values():
-    trt_lib_src.append(lib.src_file_path)
-    trt_lib_dest.append(lib.dst_file_name)
-  genrules = [
-      symlink_genrule_for_dir(repository_ctx, None, "tensorrt/lib/",
-                              "tensorrt_lib", trt_lib_src, trt_lib_dest)
-  ]
-
-  # Set up the symbolic links for the header files.
-  trt_header_dir = _find_trt_header_dir(repository_ctx, trt_install_path)
-  src_files = [
-      "%s/%s" % (trt_header_dir, header) for header in _TF_TENSORRT_HEADERS
-  ]
-  dest_files = _TF_TENSORRT_HEADERS
-  genrules.append(
-      symlink_genrule_for_dir(repository_ctx, None, "tensorrt/include/",
-                              "tensorrt_include", src_files, dest_files))
-
-  # Set up config file.
-  _tpl(repository_ctx, "build_defs.bzl", {"%{tensorrt_is_configured}": "True"})
-
-  # Set up BUILD file.
-  substitutions = {
-      "%{tensorrt_genrules}": "\n".join(genrules),
-      "%{tensorrt_headers}": '":tensorrt_include"',
-  }
-  for lib in _TF_TENSORRT_LIBS:
-    k = "%%{%s}" % lib.replace("nv", "nv_")
-    v = '"tensorrt/lib/%s"' % trt_libs[lib].dst_file_name
-    substitutions.update({k: v})
-  _tpl(repository_ctx, "BUILD", substitutions)
-
-
-tensorrt_configure = repository_rule(
-    implementation=_tensorrt_configure_impl,
-    environ=[
-        _TENSORRT_INSTALL_PATH,
-        _TF_TENSORRT_VERSION,
-    ],
-)
-"""Detects and configures the local CUDA toolchain.
-
-Add the following to your WORKSPACE FILE:
-
-```python
-tensorrt_configure(name = "local_config_tensorrt")
-```
-
-Args:
-  name: A unique name for this workspace rule.
-"""
diff --git a/third_party/termcolor.BUILD b/third_party/termcolor.BUILD
deleted file mode 100644
index 655d7cb..0000000
--- a/third_party/termcolor.BUILD
+++ /dev/null
@@ -1,15 +0,0 @@
-# Description:
-#   This is a library for outputing color to the terminal.
-
-licenses(["notice"])  # MIT
-
-exports_files(["COPYING.txt"])
-
-py_library(
-    name = "termcolor",
-    srcs = [
-        "termcolor.py",
-    ],
-    srcs_version = "PY2AND3",
-    visibility = ["//visibility:public"],
-)
diff --git a/third_party/tflite_mobilenet.BUILD b/third_party/tflite_mobilenet.BUILD
deleted file mode 100644
index de47ed6..0000000
--- a/third_party/tflite_mobilenet.BUILD
+++ /dev/null
@@ -1,12 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"])  # Apache 2.0
-
-exports_files(
-    glob(
-        ["**/*"],
-        exclude = [
-            "BUILD",
-        ],
-    ),
-)
diff --git a/third_party/tflite_smartreply.BUILD b/third_party/tflite_smartreply.BUILD
deleted file mode 100644
index 75663ef..0000000
--- a/third_party/tflite_smartreply.BUILD
+++ /dev/null
@@ -1,13 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"])  # Apache 2.0
-
-filegroup(
-    name = "model_files",
-    srcs = glob(
-        ["**/*"],
-        exclude = [
-            "BUILD",
-        ],
-    ),
-)
diff --git a/third_party/toolchains/clang6/BUILD b/third_party/toolchains/clang6/BUILD
deleted file mode 100644
index ffd0fb0..0000000
--- a/third_party/toolchains/clang6/BUILD
+++ /dev/null
@@ -1 +0,0 @@
-package(default_visibility = ["//visibility:public"])
diff --git a/third_party/toolchains/clang6/CROSSTOOL.tpl b/third_party/toolchains/clang6/CROSSTOOL.tpl
deleted file mode 100644
index 6b7e5a8..0000000
--- a/third_party/toolchains/clang6/CROSSTOOL.tpl
+++ /dev/null
@@ -1,587 +0,0 @@
-major_version: "v1"
-minor_version: "llvm:6.0.0"
-default_target_cpu: "k8"
-
-default_toolchain {
-  cpu: "k8"
-  toolchain_identifier: "k8-clang-6.0-cxx-4.8-linux-gnu"
-}
-
-toolchain {
-  compiler: "clang6"         # bazel build --compiler=clang6
-  target_cpu: "k8"           # bazel build --cpu=k8
-  target_libc: "GLIBC_2.19"  # bazel build --glibc=GLIBC_2.19
-
-  abi_libc_version: "2.19"
-  abi_version: "gcc-4.8-cxx11"
-  builtin_sysroot: ""
-  cc_target_os: "linux-gnu"
-  default_python_version: "python2.7"
-  dynamic_runtimes_filegroup: "dynamic-runtime-libs-k8"
-  host_system_name: "x86_64-unknown-linux-gnu"
-  needsPic: true
-  static_runtimes_filegroup: "static-runtime-libs-k8"
-  supports_embedded_runtimes: true
-  supports_fission: true
-  supports_gold_linker: true
-  supports_incremental_linker: true
-  supports_interface_shared_objects: true
-  supports_normalizing_ar: true
-  supports_start_end_lib: true
-  supports_thin_archives: true
-  target_system_name: "x86_64-unknown-linux-gnu"
-  toolchain_identifier: "k8-clang-6.0-cxx-4.8-linux-gnu"
-
-  tool_path { name: "ar" path: "%package(@local_config_clang6//clang6)%/llvm/bin/llvm-ar" }
-  tool_path { name: "as" path: "%package(@local_config_clang6//clang6)%/llvm/bin/llvm-as" }
-  tool_path { name: "compat-ld" path: "%package(@local_config_clang6//clang6)%/llvm/bin/ld.lld" }
-  tool_path { name: "cpp" path: "%package(@local_config_clang6//clang6)%/llvm/bin/llvm-cpp" }
-  tool_path { name: "dwp" path: "%package(@local_config_clang6//clang6)%/llvm/bin/llvm-dwp" }
-  tool_path { name: "gcc" path: "%package(@local_config_clang6//clang6)%/llvm/bin/clang" }
-  tool_path { name: "gcov" path: "%package(@local_config_clang6//clang6)%/llvm/bin/llvm-cov" }
-  tool_path { name: "ld" path: "%package(@local_config_clang6//clang6)%/llvm/bin/ld.lld" }
-  tool_path { name: "llvm-profdata" path: "%package(@local_config_clang6//clang6)%/llvm/bin/llvm-profdata" }
-  tool_path { name: "nm" path: "%package(@local_config_clang6//clang6)%/llvm/bin/llvm-nm" }
-  tool_path { name: "objcopy" path: "%package(@local_config_clang6//clang6)%/llvm/bin/llvm-objcopy" }
-  tool_path { name: "objdump" path: "%package(@local_config_clang6//clang6)%/sbin/objdump" }
-  tool_path { name: "strip" path: "%package(@local_config_clang6//clang6)%/sbin/strip" }
-
-  unfiltered_cxx_flag: "-no-canonical-prefixes"
-
-  # Make C++ compilation deterministic. Use linkstamping instead of these
-  # compiler symbols.
-  unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
-  unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
-
-  objcopy_embed_flag: "-I"
-  objcopy_embed_flag: "binary"
-
-  # This action_config makes features flags propagate
-  # to CC_FLAGS for genrules, and eventually skylark.
-  action_config {
-    action_name: "cc-flags-make-variable"
-    config_name: "cc-flags-make-variable"
-  }
-
-  # Security hardening on by default.
-  # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
-  # We need to undef it before redefining it as some distributions now have
-  # it enabled by default.
-  compiler_flag: "-U_FORTIFY_SOURCE"
-  compiler_flag: "-D_FORTIFY_SOURCE=1"
-  compiler_flag: "-fstack-protector"
-  linker_flag: "-Wl,-z,relro,-z,now"
-
-  # This adds a little bit more durability to our Clang build.
-  #
-  # At the moment, this only only be needed for:
-  # - add_boringssl_s390x.patch: --Wa,--noexecstack
-  #
-  # Folks who do maintenance work on TF Bazel Clang should consider
-  # commenting out these lines, while doing that work, to gain a better
-  # understanding of what the intersection of support looks like between GCC
-  # and Clang. Please note that,  Bazel does not support
-  # -Xclang-only / -Xgcc-only.
-  compiler_flag: "-Wno-unknown-warning-option"
-  compiler_flag: "-Wno-unused-command-line-argument"
-  compiler_flag: "-Wno-ignored-optimization-argument"
-
-  #### Common compiler options. ####
-  compiler_flag: "-D_REENTRANT"
-  compiler_flag: "-D__STDC_FORMAT_MACROS"
-  compiler_flag: "-DSUPPRESS_USE_FILE_OFFSET64"
-  compiler_flag: "-Wall"
-  compiler_flag: "-Wformat-security"
-  compiler_flag: "-Wframe-larger-than=16384"
-  compiler_flag: "-Wno-char-subscripts"
-  compiler_flag: "-Wno-error=deprecated-declarations"
-  compiler_flag: "-Wno-uninitialized"
-  compiler_flag: "-Wno-sign-compare"
-  compiler_flag: "-Wno-strict-overflow"
-  compiler_flag: "-Wno-unused-function"
-  compiler_flag: "-fdiagnostics-show-option"
-  compiler_flag: "-fmessage-length=0"
-  compiler_flag: "-fno-exceptions"
-  compiler_flag: "-fno-omit-frame-pointer"
-  compiler_flag: "-fno-strict-aliasing"
-  compiler_flag: "-fno-use-init-array"
-  compiler_flag: "-funsigned-char"
-  compiler_flag: "-gmlt"
-  cxx_flag: "-Wno-deprecated"
-  cxx_flag: "-Wno-invalid-offsetof"  # Needed for protobuf code (2017-11-07)
-  cxx_flag: "-fshow-overloads=best"
-  compiler_flag: "-Wthread-safety-analysis"
-
-  # Python extensions unfortunately make this go wild.
-  compiler_flag: "-Wno-writable-strings"
-
-  # GCC's warning produces too many false positives:
-  cxx_flag: "-Woverloaded-virtual"
-  cxx_flag: "-Wnon-virtual-dtor"
-
-  # Enable coloring even if there's no attached terminal. Bazel removes the
-  # escape sequences if --nocolor is specified. This isn't supported by gcc
-  # on Ubuntu 14.04.
-  compiler_flag: "-fcolor-diagnostics"
-
-  # Disable some broken warnings from Clang.
-  compiler_flag: "-Wno-ambiguous-member-template"
-  compiler_flag: "-Wno-pointer-sign"
-
-  # These warnings have a low signal to noise ratio.
-  compiler_flag: "-Wno-reserved-user-defined-literal"
-  compiler_flag: "-Wno-return-type-c-linkage"
-  compiler_flag: "-Wno-invalid-source-encoding"
-
-  # Per default we switch off any layering related warnings.
-  compiler_flag: "-Wno-private-header"
-
-  # Clang-specific warnings that we explicitly enable for TensorFlow. Some of
-  # these aren't on by default, or under -Wall, or are subsets of warnings
-  # turned off above.
-  compiler_flag: "-Wfloat-overflow-conversion"
-  compiler_flag: "-Wfloat-zero-conversion"
-  compiler_flag: "-Wfor-loop-analysis"
-  compiler_flag: "-Wgnu-redeclared-enum"
-  compiler_flag: "-Winfinite-recursion"
-  compiler_flag: "-Wliteral-conversion"
-  compiler_flag: "-Wself-assign"
-  compiler_flag: "-Wstring-conversion"
-  compiler_flag: "-Wtautological-overlap-compare"
-  compiler_flag: "-Wunused-comparison"
-  compiler_flag: "-Wvla"
-  cxx_flag: "-Wdeprecated-increment-bool"
-
-  # Clang code-generation flags for performance optimization.
-  compiler_flag: "-faligned-allocation"
-  compiler_flag: "-fnew-alignment=8"
-
-  # Clang defaults to C99 while GCC defaults to C89. GCC plugins are written in
-  # C89 and don't have a BUILD rule we could add a copts flag to.
-  gcc_plugin_compiler_flag: "-std=gnu89"
-
-  compilation_mode_flags {
-    mode: FASTBUILD
-  }
-
-  compilation_mode_flags {
-    mode: DBG
-    compiler_flag: "-g"
-  }
-
-  compilation_mode_flags {
-    mode: OPT
-    compiler_flag: "-g0"
-    compiler_flag: "-fdebug-types-section"
-    compiler_flag: "-DNDEBUG"
-    compiler_flag: "-fno-split-dwarf-inlining"
-    compiler_flag: "-Os"
-    compiler_flag: "-fexperimental-new-pass-manager"
-    compiler_flag: "-fdebug-info-for-profiling"
-    compiler_flag: "-ffunction-sections"
-    compiler_flag: "-fdata-sections"
-    linker_flag: "-Wl,--gc-sections"
-    linker_flag: "-Wl,-z,relro,-z,now"
-  }
-
-  # Features indicating whether this is a host compile or not. Exactly one of
-  # these will be implicitly provided by bazel.
-  feature { name: "host" }
-  feature { name: "nonhost" }
-
-  # Features indicating which compiler will be used for code generation.
-  feature {
-    name: "llvm_codegen"
-    provides: "codegen"
-    enabled: true
-  }
-
-  # Features for compilation modes. Exactly one of these will be implicitly
-  # provided by bazel.
-  feature { name: "fastbuild" }
-  feature { name: "dbg" }
-  feature { name: "opt" }
-
-  # Features controlling the C++ language mode.
-  feature {
-    name: "c++11"
-    provides: "c++std"
-    flag_set {
-      action: "c++-compile"
-      action: "c++-header-parsing"
-      action: "c++-header-preprocessing"
-      action: "c++-module-compile"
-      action: "linkstamp-compile"
-      flag_group {
-        flag: "-nostdinc++"
-        flag: "-std=c++11"
-        flag: "-Wc++14-extensions"
-        flag: "-Wc++2a-extensions"
-        flag: "-Wno-binary-literal"
-      }
-    }
-  }
-  feature {
-    name: "c++14"
-    provides: "c++std"
-    flag_set {
-      action: "c++-compile"
-      action: "c++-header-parsing"
-      action: "c++-header-preprocessing"
-      action: "c++-module-compile"
-      action: "linkstamp-compile"
-      flag_group {
-        flag: "-nostdinc++"
-        flag: "-std=c++14"
-        flag: "-Wc++11-compat"
-        flag: "-Wno-c++11-compat-binary-literal"
-        flag: "-Wc++2a-extensions"
-      }
-    }
-  }
-  feature {
-    name: "c++17"
-    provides: "c++std"
-    flag_set {
-      action: "c++-compile"
-      action: "c++-header-parsing"
-      action: "c++-header-preprocessing"
-      action: "c++-module-compile"
-      action: "linkstamp-compile"
-      flag_group {
-        flag: "-nostdinc++"
-        flag: "-std=c++17"
-        flag: "-Wc++11-compat"
-        flag: "-Wno-c++11-compat-binary-literal"
-        flag: "-Wc++2a-extensions"
-      }
-    }
-  }
-  feature {
-    name: "c++2a"
-    provides: "c++std"
-    flag_set {
-      action: "c++-compile"
-      action: "c++-header-parsing"
-      action: "c++-header-preprocessing"
-      action: "c++-module-compile"
-      action: "linkstamp-compile"
-      flag_group {
-        flag: "-nostdinc++"
-        flag: "-std=c++2a"
-        flag: "-Wc++11-compat"
-        flag: "-Wno-c++11-compat-binary-literal"
-      }
-    }
-  }
-  feature {
-    name: "c++default"
-    enabled: true
-    flag_set {
-      # Provide the c++11 flags if no standard is selected
-      with_feature {
-        not_feature: "c++11"
-        not_feature: "c++14"
-        not_feature: "c++17"
-        not_feature: "c++2a"
-      }
-      action: "c++-compile"
-      action: "c++-header-parsing"
-      action: "c++-header-preprocessing"
-      action: "c++-module-compile"
-      action: "linkstamp-compile"
-      flag_group {
-        flag: "-nostdinc++"
-        flag: "-std=c++11"
-        flag: "-Wc++14-extensions"
-        flag: "-Wc++2a-extensions"
-        flag: "-Wno-binary-literal"
-      }
-    }
-  }
-
-  feature {
-    name: "use_compiler_rt"
-    requires { feature: "llvm_codegen" }
-    # TODO(saugustine): At the moment, "use_compiler_rt" also
-    # requires "linking_mode_flags { mode: FULLY_STATIC" ... },
-    # but that isn't a feature. We should probably convert it.
-    flag_set {
-      action: "c++-link"
-      action: "c++-link-interface-dynamic-library"
-      action: "c++-link-dynamic-library"
-      action: "c++-link-executable"
-      # "link" is a misnomer for these actions. They are really just
-      # invocations of ar.
-      #action: "c++-link-pic-static-library"
-      #action: "c++-link-static-library"
-      #action: "c++-link-alwayslink-static-library"
-      #action: "c++-link-pic-static-library"
-      #action: "c++-link-alwayslink-pic-static-library"
-      flag_group {
-        flag: "-rtlib=compiler-rt"
-        flag: "-lunwind"
-      }
-    }
-  }
-
-  feature {
-    name: "pie"
-    flag_set {
-      action: "assemble"
-      action: "preprocess-assemble"
-      action: "c-compile"
-      action: "c++-compile"
-      action: "c++-header-parsing"
-      action: "c++-header-preprocessing"
-      action: "c++-module-compile"
-      action: "c++-module-codegen"
-      action: "cc-flags-make-variable"
-      action: "lto-backend"
-      action: "linkstamp-compile"
-      flag_group {
-        flag: "-mpie-copy-relocations"
-        flag: "-fPIE"
-      }
-    }
-    flag_set {
-      action: "cc-flags-make-variable"
-      action: "c++-link-executable"
-      flag_group {
-        flag: "-pie"
-      }
-    }
-  }
-
-  # Pic must appear after pie, because pic may need to override pie, and bazel
-  # turns it on selectively. These don't interact with other options.
-  #
-  # TODO: In practice, normal vs pic vs pie is a ternary mode. We should
-  # implement it that way. This will require changes to bazel, which only
-  # calculates whether or not pic is needed, not pie.
-  #
-  # NOTE: Bazel might make this all a moot point.
-  feature {
-    name: "pic"
-    flag_set {
-      action: "assemble"
-      action: "preprocess-assemble"
-      action: "c-compile"
-      action: "c++-compile"
-      action: "c++-module-codegen"
-      action: "c++-module-compile"
-      action: "linkstamp-compile"
-      expand_if_all_available: "pic"
-      flag_group {
-        flag: "-fPIC"
-      }
-    }
-  }
-
-  feature {
-    name: "gold"
-    enabled: true
-    flag_set {
-      action: "c++-link-executable"
-      action: "c++-link-dynamic-library"
-      action: "c++-link-interface-dynamic-library"
-      flag_group {
-        expand_if_none_available: "lto"
-        flag: "-fuse-ld=gold"
-      }
-    }
-  }
-
-  # This is great if you want linking TensorFlow to take ten minutes.
-  feature {
-    name: "lto"
-    requires { feature: "nonhost" }
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        flag: "-flto=thin"
-      }
-    }
-    flag_set {
-      action: "c++-link-executable"
-      action: "c++-link-dynamic-library"
-      action: "c++-link-interface-dynamic-library"
-      flag_group {
-        flag: "-flto=thin"
-      }
-    }
-  }
-
-  feature {
-    name: "parse_headers"
-    flag_set {
-      action: "c++-header-parsing"
-      flag_group {
-        flag: "-xc++-header"
-        flag: "-fsyntax-only"
-      }
-    }
-  }
-
-  feature {
-    name: "preprocess_headers"
-    flag_set {
-      action: "c++-header-preprocessing"
-      flag_group {
-        flag: "-xc++"
-        flag: "-E"
-      }
-    }
-  }
-
-  feature {
-    name: "per_object_debug_info"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      action: "c++-module-codegen"
-      action: "assemble"
-      action: "preprocess-assemble"
-      action: "lto-backend"
-      flag_group {
-        flag: "-gsplit-dwarf"
-        flag: "-ggnu-pubnames"
-      }
-    }
-    flag_set {
-      action: "c++-link-executable"
-      action: "c++-link-dynamic-library"
-      action: "c++-link-interface-dynamic-library"
-      flag_group {
-        expand_if_all_available: "is_using_fission"
-        flag: "-Wl,--gdb-index"
-      }
-    }
-  }
-
-  feature {
-    name: "xray"
-    requires {
-      feature: "llvm_codegen"
-      feature: "nonhost"
-    }
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      action: "c++-header-parsing"
-      action: "c++-header-preprocessing"
-      action: "c++-module-compile"
-      action: "c++-link-interface-dynamic-library"
-      action: "c++-link-dynamic-library"
-      action: "c++-link-executable"
-      flag_group {
-        flag: "-fxray-instrument"
-      }
-    }
-  }
-
-  feature {
-    name: "minimal_ubsan"
-    requires { feature: "llvm_codegen" }
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      action: "c++-header-parsing"
-      action: "c++-header-preprocessing"
-      action: "c++-module-compile"
-      action: "c++-module-codegen"
-      flag_group {
-        flag: "-fsanitize=return,returns-nonnull-attribute,vla-bound,unreachable,float-cast-overflow"
-        flag: "-fsanitize-trap=all"
-        flag: "-DUNDEFINED_BEHAVIOR_SANITIZER"
-      }
-    }
-  }
-
-  feature {
-    name: "minimal_ubsan_enabled_by_default"
-    requires {
-      feature: "llvm_codegen"
-      feature: "fastbuild"
-    }
-    enabled: true
-    implies: "minimal_ubsan"
-  }
-
-  cxx_builtin_include_directory: "%package(@local_config_clang6//clang6)%/llvm/lib/clang/6.0.0/include"
-  cxx_builtin_include_directory: "/usr/include"
-
-  unfiltered_cxx_flag: "-cxx-isystem"
-  unfiltered_cxx_flag: "/usr/include/c++/4.8"
-  unfiltered_cxx_flag: "-cxx-isystem"
-  unfiltered_cxx_flag: "/usr/include/x86_64-linux-gnu/c++/4.8"
-  unfiltered_cxx_flag: "-isystem"
-  unfiltered_cxx_flag: "%package(@local_config_clang6//clang6)%/llvm/lib/clang/6.0.0/include"
-  unfiltered_cxx_flag: "-isystem"
-  unfiltered_cxx_flag: "/usr/include/x86_64-linux-gnu"
-  unfiltered_cxx_flag: "-isystem"
-  unfiltered_cxx_flag: "/usr/include"
-
-  linker_flag: "-Wl,--build-id=md5"
-  linker_flag: "-Wl,--fatal-warnings"
-  linker_flag: "-Wl,--hash-style=gnu"
-  linker_flag: "-no-canonical-prefixes"
-  linker_flag: "--target=x86_64-unknown-linux-gnu"
-
-  linker_flag: "-L/usr/lib/gcc/x86_64-linux-gnu/4.8"
-
-  # This is the minimum x86 architecture TensorFlow supports.
-  compiler_flag: "-DARCH_K8"
-  compiler_flag: "-m64"
-
-  # These are for Linux.
-  ld_embed_flag: "-melf_x86_64"
-  linker_flag: "-Wl,--eh-frame-hdr"
-  linker_flag: "-Wl,-z,max-page-size=0x1000"
-
-  # Google never uses the stack like a heap, e.g. alloca(), because tcmalloc
-  # and jemalloc are so fast. However copts=["$(STACK_FRAME_UNLIMITED)"] can be
-  # specified when that can't be the case.
-  make_variable {
-    name: "STACK_FRAME_UNLIMITED"
-    value: "-Wframe-larger-than=100000000 -Wno-vla"
-  }
-
-  # These flags are for folks who build C/C++ code inside genrules.
-  make_variable {
-    name: "CC_FLAGS"
-    value: "-no-canonical-prefixes --target=x86_64-unknown-linux-gnu -fno-omit-frame-pointer -fno-tree-vrp -msse3"
-  }
-
-  feature {
-    name: "copts"
-    flag_set {
-      expand_if_all_available: "copts"
-      action: "assemble"
-      action: "preprocess-assemble"
-      action: "c-compile"
-      action: "c++-compile"
-      action: "c++-header-parsing"
-      action: "c++-header-preprocessing"
-      action: "c++-module-compile"
-      action: "c++-module-codegen"
-      action: "lto-backend"
-      flag_group {
-        iterate_over: "copts"
-        flag: "%{copts}"
-      }
-    }
-  }
-
-  # Please do not statically link libstdc++. This would probably lead to a lot
-  # of bloat since OpKernels need to use linkstatic=1 because  b/27630669 and
-  # it could cause memory leaks since Python uses dlopen() on our libraries:
-  # https://stackoverflow.com/a/35015415
-  linker_flag: "-lstdc++"
-  linker_flag: "-lm"
-  linker_flag: "-lpthread"
-  linker_flag: "-l:/lib/x86_64-linux-gnu/libc-2.19.so"
-}
diff --git a/third_party/toolchains/clang6/README.md b/third_party/toolchains/clang6/README.md
deleted file mode 100644
index 0c6be25..0000000
--- a/third_party/toolchains/clang6/README.md
+++ /dev/null
@@ -1,101 +0,0 @@
-# TensorFlow Bazel Clang
-
-This is a specialized toolchain that uses an old Debian with a new Clang that
-can cross compile to any x86_64 microarchitecture. It's intended to build Linux
-binaries that only require the following ABIs:
-
-- GLIBC_2.18
-- CXXABI_1.3.7 (GCC 4.8.3)
-- GCC_4.2.0
-
-Which are available on at least the following Linux platforms:
-
-- Ubuntu 14+
-- CentOS 7+
-- Debian 8+
-- SuSE 13.2+
-- Mint 17.3+
-- Manjaro 0.8.11
-
-# System Install
-
-On Debian 8 (Jessie) Clang 6.0 can be installed as follows:
-
-```sh
-cat >>/etc/apt/sources.list <<'EOF'
-deb http://apt.llvm.org/jessie/ llvm-toolchain-jessie main
-deb-src http://apt.llvm.org/jessie/ llvm-toolchain-jessie main
-EOF
-wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
-apt-key fingerprint |& grep '6084 F3CF 814B 57C1 CF12  EFD5 15CF 4D18 AF4F 7421'
-apt-get update
-apt-get install clang lld
-```
-
-# Bazel Configuration
-
-This toolchain can compile TensorFlow in 2m30s on a 96-core Skylake GCE VM if
-the following `.bazelrc` settings are added:
-
-```
-startup --host_jvm_args=-Xmx30G
-startup --host_jvm_args=-Xms30G
-startup --host_jvm_args=-XX:MaxNewSize=3g
-startup --host_jvm_args=-XX:-UseAdaptiveSizePolicy
-startup --host_jvm_args=-XX:+UseConcMarkSweepGC
-startup --host_jvm_args=-XX:TargetSurvivorRatio=70
-startup --host_jvm_args=-XX:SurvivorRatio=6
-startup --host_jvm_args=-XX:+UseCMSInitiatingOccupancyOnly
-startup --host_jvm_args=-XX:CMSFullGCsBeforeCompaction=1
-startup --host_jvm_args=-XX:CMSInitiatingOccupancyFraction=75
-
-build --jobs=100
-build --local_resources=200000,100,100
-build --crosstool_top=@local_config_clang6//clang6
-build --noexperimental_check_output_files
-build --nostamp
-build --config=opt
-build --noexperimental_check_output_files
-build --copt=-march=native
-build --host_copt=-march=native
-```
-
-# x86_64 Microarchitectures
-
-## Intel CPU Line
-
-- 2003 P6 M           SSE SSE2
-- 2004 prescott       SSE3 SSSE3 (-march=prescott)
-- 2006 core           X64 SSE4.1 (only on 45nm variety) (-march=core2)
-- 2008 nehalem        SSE4.2 VT-x VT-d (-march=nehalem)
-- 2010 westmere       CLMUL AES (-march=westmere)
-- 2012 sandybridge    AVX TXT (-march=sandybridge)
-- 2012 ivybridge      F16C MOVBE (-march=ivybridge)
-- 2013 haswell        AVX2 TSX BMI2 FMA (-march=haswell)
-- 2014 broadwell      RDSEED ADCX PREFETCHW (-march=broadwell - works on trusty gcc4.9)
-- 2015 skylake        SGX ADX MPX AVX-512[xeon-only] (-march=skylake / -march=skylake-avx512 - needs gcc7)
-- 2018 cannonlake     AVX-512 SHA (-march=cannonlake - needs clang5)
-
-## Intel Low Power CPU Line
-
-- 2013 silvermont     SSE4.1 SSE4.2 VT-x (-march=silvermont)
-- 2016 goldmont       SHA (-march=goldmont - needs clang5)
-
-## AMD CPU Line
-
-- 2003 k8             SSE SSE2 (-march=k8)
-- 2005 k8 (Venus)     SSE3 (-march=k8-sse3)
-- 2008 barcelona      SSE4a?! (-march=barcelona)
-- 2011 bulldozer      SSE4.1 SSE4.2 CLMUL AVX AES FMA4?! (-march=bdver1)
-- 2011 piledriver     FMA (-march=bdver2)
-- 2015 excavator      AVX2 BMI2 MOVBE (-march=bdver4)
-
-## Google Compute Engine Supported CPUs
-
-- 2012 sandybridge 2.6gHz -march=sandybridge
-- 2012 ivybridge   2.5gHz -march=ivybridge
-- 2013 haswell     2.3gHz -march=haswell
-- 2014 broadwell   2.2gHz -march=broadwell
-- 2015 skylake     2.0gHz -march=skylake-avx512
-
-See: <https://cloud.google.com/compute/docs/cpu-platforms>
diff --git a/third_party/toolchains/clang6/clang.BUILD b/third_party/toolchains/clang6/clang.BUILD
deleted file mode 100644
index 802d62c..0000000
--- a/third_party/toolchains/clang6/clang.BUILD
+++ /dev/null
@@ -1,162 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-# Please note that the output of these tools is unencumbered.
-licenses(["restricted"])  # NCSA, GPLv3 (e.g. gold)
-
-filegroup(
-    name = "ar",
-    srcs = ["llvm/bin/llvm-ar"],
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "as",
-    srcs = ["llvm/bin/llvm-as"],
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "cpp",
-    srcs = ["llvm/bin/llvm-cpp"],
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "dwp",
-    srcs = ["llvm/bin/llvm-dwp"],
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "gcc",
-    srcs = ["llvm/bin/clang"],
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "gcov",
-    srcs = ["llvm/bin/llvm-cov"],
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "ld",
-    srcs = ["llvm/bin/ld.lld"],
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "nm",
-    srcs = ["llvm/bin/llvm-nm"],
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "objcopy",
-    srcs = ["llvm/bin/llvm-objcopy"],
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "objdump",
-    srcs = ["llvm/bin/llvm-objdump"],
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "profdata",
-    srcs = ["llvm/bin/llvm-profdata"],
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "strip",
-    srcs = ["sbin/strip"],
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "xray",
-    srcs = ["llvm/bin/llvm-xray"],
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "includes",
-    srcs = glob(["llvm/lib/clang/6.0.0/include/**"]),
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "libraries",
-    srcs = glob([
-        "lib/*.*",
-        "lib/clang/6.0.0/lib/linux/*.*",
-    ]),
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "compiler_files",
-    srcs = [
-        ":as",
-        ":gcc",
-        ":includes",
-    ],
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "linker_files",
-    srcs = [
-        ":ar",
-        ":ld",
-        ":libraries",
-    ],
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "all_files",
-    srcs = [
-        ":compiler_files",
-        ":dwp",
-        ":gcov",
-        ":linker_files",
-        ":nm",
-        ":objcopy",
-        ":objdump",
-        ":profdata",
-        ":strip",
-        ":xray",
-    ],
-    output_licenses = ["unencumbered"],
-)
-
-filegroup(
-    name = "empty",
-    srcs = [],  # bazel crashes without this
-    output_licenses = ["unencumbered"],
-)
-
-cc_toolchain_suite(
-    name = "clang6",
-    toolchains = {
-        "k8|clang6": ":clang6-k8",
-    },
-)
-
-cc_toolchain(
-    name = "clang6-k8",
-    all_files = ":all_files",
-    compiler_files = ":compiler_files",
-    cpu = "k8",
-    dwp_files = ":dwp",
-    dynamic_runtime_libs = [":empty"],
-    linker_files = ":linker_files",
-    objcopy_files = ":objcopy",
-    output_licenses = ["unencumbered"],
-    static_runtime_libs = [":empty"],
-    strip_files = ":strip",
-    supports_param_files = 1,
-)
diff --git a/third_party/toolchains/clang6/repo.bzl b/third_party/toolchains/clang6/repo.bzl
deleted file mode 100644
index b81f445..0000000
--- a/third_party/toolchains/clang6/repo.bzl
+++ /dev/null
@@ -1,30 +0,0 @@
-"""Repository rule for Debian 8 Jessie Clang-6.0 portable Linux builds."""
-
-def _clang6_configure(ctx):
-  # TODO(jart): It'd probably be better to use Bazel's struct.to_proto()
-  #             method to generate a gigantic CROSSTOOL file that allows
-  #             Clang to support everything.
-  ctx.symlink(
-      ctx.os.environ.get('TF_LLVM_PATH',
-                         '/usr/lib/llvm-6.0'),
-      'clang6/llvm')
-  ctx.symlink(
-      ctx.os.environ.get('STRIP', '/usr/bin/strip'),
-      'clang6/sbin/strip')
-  ctx.symlink(
-      ctx.os.environ.get('OBJDUMP', '/usr/bin/objdump'),
-      'clang6/sbin/objdump')
-  ctx.symlink(ctx.attr._build, 'clang6/BUILD')
-  ctx.template('clang6/CROSSTOOL', ctx.attr._crosstool, {
-      '%package(@local_config_clang6//clang6)%': str(ctx.path('clang6')),
-  })
-
-clang6_configure = repository_rule(
-    implementation = _clang6_configure,
-    attrs = {
-        '_build': attr.label(
-            default=str(Label('//third_party/toolchains/clang6:clang.BUILD'))),
-        '_crosstool': attr.label(
-            default=str(Label('//third_party/toolchains/clang6:CROSSTOOL.tpl'))),
-    },
-)
diff --git a/third_party/toolchains/cpus/arm/BUILD b/third_party/toolchains/cpus/arm/BUILD
deleted file mode 100644
index 10c7867..0000000
--- a/third_party/toolchains/cpus/arm/BUILD
+++ /dev/null
@@ -1,49 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-cc_toolchain_suite(
-    name = "toolchain",
-    toolchains = {
-        "armeabi|compiler": ":cc-compiler-armeabi",
-        "local|compiler": ":cc-compiler-local",
-    },
-)
-
-filegroup(
-    name = "empty",
-    srcs = [],
-)
-
-filegroup(
-    name = "arm_linux_all_files",
-    srcs = [
-        "@arm_compiler//:compiler_pieces",
-    ],
-)
-
-cc_toolchain(
-    name = "cc-compiler-local",
-    all_files = ":empty",
-    compiler_files = ":empty",
-    cpu = "local",
-    dwp_files = ":empty",
-    dynamic_runtime_libs = [":empty"],
-    linker_files = ":empty",
-    objcopy_files = ":empty",
-    static_runtime_libs = [":empty"],
-    strip_files = ":empty",
-    supports_param_files = 1,
-)
-
-cc_toolchain(
-    name = "cc-compiler-armeabi",
-    all_files = ":arm_linux_all_files",
-    compiler_files = ":arm_linux_all_files",
-    cpu = "armeabi",
-    dwp_files = ":empty",
-    dynamic_runtime_libs = [":empty"],
-    linker_files = ":arm_linux_all_files",
-    objcopy_files = "arm_linux_all_files",
-    static_runtime_libs = [":empty"],
-    strip_files = "arm_linux_all_files",
-    supports_param_files = 1,
-)
diff --git a/third_party/toolchains/cpus/arm/CROSSTOOL.tpl b/third_party/toolchains/cpus/arm/CROSSTOOL.tpl
deleted file mode 100644
index f0e17d1..0000000
--- a/third_party/toolchains/cpus/arm/CROSSTOOL.tpl
+++ /dev/null
@@ -1,876 +0,0 @@
-major_version: "local"
-minor_version: ""
-default_target_cpu: "same_as_host"
-
-default_toolchain {
-  cpu: "k8"
-  toolchain_identifier: "local_linux"
-}
-default_toolchain {
-  cpu: "piii"
-  toolchain_identifier: "local_linux"
-}
-default_toolchain {
-  cpu: "darwin"
-  toolchain_identifier: "local_darwin"
-}
-default_toolchain {
-  cpu: "freebsd"
-  toolchain_identifier: "local_freebsd"
-}
-default_toolchain {
-  cpu: "armeabi"
-  toolchain_identifier: "arm-linux-gnueabihf"
-}
-default_toolchain {
-  cpu: "arm"
-  toolchain_identifier: "local_linux"
-}
-default_toolchain {
-  cpu: "x64_windows"
-  toolchain_identifier: "local_windows_msys64"
-}
-default_toolchain {
-  cpu: "x64_windows_msvc"
-  toolchain_identifier: "vc_14_0_x64"
-}
-default_toolchain {
-  cpu: "s390x"
-  toolchain_identifier: "local_linux"
-}
-
-toolchain {
-  abi_version: "armeabi"
-  abi_libc_version: "armeabi"
-  builtin_sysroot: ""
-  compiler: "compiler"
-  host_system_name: "armeabi"
-  needsPic: true
-  supports_gold_linker: false
-  supports_incremental_linker: false
-  supports_fission: false
-  supports_interface_shared_objects: false
-  supports_normalizing_ar: false
-  supports_start_end_lib: false
-  target_libc: "armeabi"
-  target_cpu: "armeabi"
-  target_system_name: "armeabi"
-  toolchain_identifier: "arm-linux-gnueabihf"
-
-  tool_path { name: "ar" path: "%{ARM_COMPILER_PATH}%/bin/arm-linux-gnueabihf-ar" }
-  tool_path { name: "compat-ld" path: "/bin/false" }
-  tool_path { name: "cpp" path: "%{ARM_COMPILER_PATH}%/bin/arm-linux-gnueabihf-cpp" }
-  tool_path { name: "dwp" path: "%{ARM_COMPILER_PATH}%/bin/arm-linux-gnueabihf-dwp" }
-  tool_path { name: "gcc" path: "%{ARM_COMPILER_PATH}%/bin/arm-linux-gnueabihf-gcc" }
-  tool_path { name: "gcov" path: "%{ARM_COMPILER_PATH}%/bin/arm-linux-gnueabihf-gcov" }
-  tool_path { name: "ld" path: "%{ARM_COMPILER_PATH}%/bin/arm-linux-gnueabihf-ld" }
-
-  tool_path { name: "nm" path: "%{ARM_COMPILER_PATH}%/bin/arm-linux-gnueabihf-nm" }
-  tool_path { name: "objcopy" path: "%{ARM_COMPILER_PATH}%/bin/arm-linux-gnueabihf-objcopy" }
-  tool_path { name: "objdump" path: "%{ARM_COMPILER_PATH}%/bin/arm-linux-gnueabihf-objdump" }
-  tool_path { name: "strip" path: "%{ARM_COMPILER_PATH}%/bin/arm-linux-gnueabihf-strip" }
-
-  cxx_builtin_include_directory: "%{ARM_COMPILER_PATH}%/arm-linux-gnueabihf/include/c++/4.9.3/"
-  cxx_builtin_include_directory: "%{ARM_COMPILER_PATH}%/arm-linux-gnueabihf/sysroot/usr/include/"
-  cxx_builtin_include_directory: "%{ARM_COMPILER_PATH}%/arm-linux-gnueabihf/libc/usr/include/"
-  cxx_builtin_include_directory: "%{ARM_COMPILER_PATH}%/lib/gcc/arm-linux-gnueabihf/4.9.3/include"
-  cxx_builtin_include_directory: "%{ARM_COMPILER_PATH}%/lib/gcc/arm-linux-gnueabihf/4.9.3/include-fixed"
-  cxx_builtin_include_directory: "%{ARM_COMPILER_PATH}%/local_include"
-  cxx_builtin_include_directory: "/usr/include"
-  # The path below must match the one used in
-  # tensorflow/tools/ci_build/pi/build_raspberry_pi.sh.
-  cxx_builtin_include_directory: "/tmp/openblas_install/include/"
-  cxx_flag: "-std=c++11"
-  # The cxx_builtin_include_directory directives don't seem to be adding these, so
-  # explicitly set them as flags. There's a query to the Bazel team outstanding about
-  # why this is necessary.
-  cxx_flag: "-isystem"
-  cxx_flag: "/usr/include/arm-linux-gnueabihf"
-  cxx_flag: "-isystem"
-  cxx_flag: "%{PYTHON_INCLUDE_PATH}%"
-  cxx_flag: "-isystem"
-  cxx_flag: "/usr/include/"
-  linker_flag: "-lstdc++"
-
-  unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
-  unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
-
-  unfiltered_cxx_flag: "-no-canonical-prefixes"
-  unfiltered_cxx_flag: "-fno-canonical-system-headers"
-
-  compiler_flag: "-U_FORTIFY_SOURCE"
-  compiler_flag: "-D_FORTIFY_SOURCE=1"
-  compiler_flag: "-fstack-protector"
-  compiler_flag: "-DRASPBERRY_PI"  # To differentiate from mobile builds.
-  linker_flag: "-Wl,-z,relro,-z,now"
-
-  linker_flag: "-no-canonical-prefixes"
-  linker_flag: "-pass-exit-codes"
-
-  linker_flag: "-Wl,--build-id=md5"
-  linker_flag: "-Wl,--hash-style=gnu"
-
-  compilation_mode_flags {
-    mode: DBG
-    # Enable debug symbols.
-    compiler_flag: "-g"
-  }
-  compilation_mode_flags {
-    mode: OPT
-
-    # No debug symbols.
-    # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or
-    # even generally? However, that can't happen here, as it requires special
-    # handling in Bazel.
-    compiler_flag: "-g0"
-
-    # Conservative choice for -O
-    # -O3 can increase binary size and even slow down the resulting binaries.
-    # Profile first and / or use FDO if you need better performance than this.
-    compiler_flag: "-O2"
-
-    # Disable assertions
-    compiler_flag: "-DNDEBUG"
-
-    # Removal of unused code and data at link time (can this increase binary size in some cases?).
-    compiler_flag: "-ffunction-sections"
-    compiler_flag: "-fdata-sections"
-    linker_flag: "-Wl,--gc-sections"
-  }
-  linking_mode_flags { mode: DYNAMIC }
-
-}
-
-toolchain {
-  abi_version: "local"
-  abi_libc_version: "local"
-  builtin_sysroot: ""
-  compiler: "compiler"
-  host_system_name: "local"
-  needsPic: true
-  supports_gold_linker: false
-  supports_incremental_linker: false
-  supports_fission: false
-  supports_interface_shared_objects: false
-  supports_normalizing_ar: false
-  supports_start_end_lib: false
-  target_libc: "local"
-  target_cpu: "local"
-  target_system_name: "local"
-  toolchain_identifier: "local_linux"
-
-  tool_path { name: "ar" path: "/usr/bin/ar" }
-  tool_path { name: "compat-ld" path: "/usr/bin/ld" }
-  tool_path { name: "cpp" path: "/usr/bin/cpp" }
-  tool_path { name: "dwp" path: "/usr/bin/dwp" }
-  tool_path { name: "gcc" path: "/usr/bin/gcc" }
-  cxx_flag: "-std=c++0x"
-  linker_flag: "-lstdc++"
-  linker_flag: "-B/usr/bin/"
-
-  # TODO(bazel-team): In theory, the path here ought to exactly match the path
-  # used by gcc. That works because bazel currently doesn't track files at
-  # absolute locations and has no remote execution, yet. However, this will need
-  # to be fixed, maybe with auto-detection?
-  cxx_builtin_include_directory: "/usr/lib/gcc/"
-  cxx_builtin_include_directory: "/usr/local/include"
-  cxx_builtin_include_directory: "/usr/include"
-  tool_path { name: "gcov" path: "/usr/bin/gcov" }
-
-  # C(++) compiles invoke the compiler (as that is the one knowing where
-  # to find libraries), but we provide LD so other rules can invoke the linker.
-  tool_path { name: "ld" path: "/usr/bin/ld" }
-
-  tool_path { name: "nm" path: "/usr/bin/nm" }
-  tool_path { name: "objcopy" path: "/usr/bin/objcopy" }
-  objcopy_embed_flag: "-I"
-  objcopy_embed_flag: "binary"
-  tool_path { name: "objdump" path: "/usr/bin/objdump" }
-  tool_path { name: "strip" path: "/usr/bin/strip" }
-
-  # Anticipated future default.
-  unfiltered_cxx_flag: "-no-canonical-prefixes"
-  unfiltered_cxx_flag: "-fno-canonical-system-headers"
-
-  # Make C++ compilation deterministic. Use linkstamping instead of these
-  # compiler symbols.
-  unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
-  unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
-
-  # Security hardening on by default.
-  # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
-  # We need to undef it before redefining it as some distributions now have
-  # it enabled by default.
-  compiler_flag: "-U_FORTIFY_SOURCE"
-  compiler_flag: "-D_FORTIFY_SOURCE=1"
-  compiler_flag: "-fstack-protector"
-  linker_flag: "-Wl,-z,relro,-z,now"
-
-  # Enable coloring even if there's no attached terminal. Bazel removes the
-  # escape sequences if --nocolor is specified. This isn't supported by gcc
-  # on Ubuntu 14.04.
-  # compiler_flag: "-fcolor-diagnostics"
-
-  # All warnings are enabled. Maybe enable -Werror as well?
-  compiler_flag: "-Wall"
-  # Enable a few more warnings that aren't part of -Wall.
-  compiler_flag: "-Wunused-but-set-parameter"
-  # But disable some that are problematic.
-  compiler_flag: "-Wno-free-nonheap-object" # has false positives
-
-  # Keep stack frames for debugging, even in opt mode.
-  compiler_flag: "-fno-omit-frame-pointer"
-
-  # Anticipated future default.
-  linker_flag: "-no-canonical-prefixes"
-  # Have gcc return the exit code from ld.
-  linker_flag: "-pass-exit-codes"
-  # Stamp the binary with a unique identifier.
-  linker_flag: "-Wl,--build-id=md5"
-  linker_flag: "-Wl,--hash-style=gnu"
-  # Gold linker only? Can we enable this by default?
-  # linker_flag: "-Wl,--warn-execstack"
-  # linker_flag: "-Wl,--detect-odr-violations"
-
-  compilation_mode_flags {
-    mode: DBG
-    # Enable debug symbols.
-    compiler_flag: "-g"
-  }
-  compilation_mode_flags {
-    mode: OPT
-
-    # No debug symbols.
-    # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or
-    # even generally? However, that can't happen here, as it requires special
-    # handling in Bazel.
-    compiler_flag: "-g0"
-
-    # Conservative choice for -O
-    # -O3 can increase binary size and even slow down the resulting binaries.
-    # Profile first and / or use FDO if you need better performance than this.
-    compiler_flag: "-O2"
-
-    # Disable assertions
-    compiler_flag: "-DNDEBUG"
-
-    # Removal of unused code and data at link time (can this increase binary size in some cases?).
-    compiler_flag: "-ffunction-sections"
-    compiler_flag: "-fdata-sections"
-    linker_flag: "-Wl,--gc-sections"
-  }
-  linking_mode_flags { mode: DYNAMIC }
-}
-
-toolchain {
-  abi_version: "local"
-  abi_libc_version: "local"
-  builtin_sysroot: ""
-  compiler: "compiler"
-  host_system_name: "local"
-  needsPic: true
-  target_libc: "macosx"
-  target_cpu: "darwin"
-  target_system_name: "local"
-  toolchain_identifier: "local_darwin"
-
-  tool_path { name: "ar" path: "/usr/bin/libtool" }
-  tool_path { name: "compat-ld" path: "/usr/bin/ld" }
-  tool_path { name: "cpp" path: "/usr/bin/cpp" }
-  tool_path { name: "dwp" path: "/usr/bin/dwp" }
-  tool_path { name: "gcc" path: "osx_cc_wrapper.sh" }
-  cxx_flag: "-std=c++0x"
-  ar_flag: "-static"
-  ar_flag: "-s"
-  ar_flag: "-o"
-  linker_flag: "-lstdc++"
-  linker_flag: "-undefined"
-  linker_flag: "dynamic_lookup"
-  linker_flag: "-headerpad_max_install_names"
-  # TODO(ulfjack): This is wrong on so many levels. Figure out a way to auto-detect the proper
-  # setting from the local compiler, and also how to make incremental builds correct.
-  cxx_builtin_include_directory: "/"
-  tool_path { name: "gcov" path: "/usr/bin/gcov" }
-  tool_path { name: "ld" path: "/usr/bin/ld" }
-  tool_path { name: "nm" path: "/usr/bin/nm" }
-  tool_path { name: "objcopy" path: "/usr/bin/objcopy" }
-  objcopy_embed_flag: "-I"
-  objcopy_embed_flag: "binary"
-  tool_path { name: "objdump" path: "/usr/bin/objdump" }
-  tool_path { name: "strip" path: "/usr/bin/strip" }
-
-  # Anticipated future default.
-  unfiltered_cxx_flag: "-no-canonical-prefixes"
-
-  # Make C++ compilation deterministic. Use linkstamping instead of these
-  # compiler symbols.
-  unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
-  unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
-
-  # Security hardening on by default.
-  # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
-  compiler_flag: "-D_FORTIFY_SOURCE=1"
-  compiler_flag: "-fstack-protector"
-
-  # Enable coloring even if there's no attached terminal. Bazel removes the
-  # escape sequences if --nocolor is specified.
-  compiler_flag: "-fcolor-diagnostics"
-
-  # All warnings are enabled. Maybe enable -Werror as well?
-  compiler_flag: "-Wall"
-  # Enable a few more warnings that aren't part of -Wall.
-  compiler_flag: "-Wthread-safety"
-  compiler_flag: "-Wself-assign"
-
-  # Keep stack frames for debugging, even in opt mode.
-  compiler_flag: "-fno-omit-frame-pointer"
-
-  # Anticipated future default.
-  linker_flag: "-no-canonical-prefixes"
-
-  compilation_mode_flags {
-    mode: DBG
-    # Enable debug symbols.
-    compiler_flag: "-g"
-  }
-  compilation_mode_flags {
-    mode: OPT
-    # No debug symbols.
-    # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or even generally?
-    # However, that can't happen here, as it requires special handling in Bazel.
-    compiler_flag: "-g0"
-
-    # Conservative choice for -O
-    # -O3 can increase binary size and even slow down the resulting binaries.
-    # Profile first and / or use FDO if you need better performance than this.
-    compiler_flag: "-O2"
-
-    # Disable assertions
-    compiler_flag: "-DNDEBUG"
-
-    # Removal of unused code and data at link time (can this increase binary size in some cases?).
-    compiler_flag: "-ffunction-sections"
-    compiler_flag: "-fdata-sections"
-  }
-  linking_mode_flags { mode: DYNAMIC }
-}
-
-toolchain {
-  abi_version: "local"
-  abi_libc_version: "local"
-  builtin_sysroot: ""
-  compiler: "compiler"
-  host_system_name: "local"
-  needsPic: true
-  supports_gold_linker: false
-  supports_incremental_linker: false
-  supports_fission: false
-  supports_interface_shared_objects: false
-  supports_normalizing_ar: false
-  supports_start_end_lib: false
-  target_libc: "local"
-  target_cpu: "freebsd"
-  target_system_name: "local"
-  toolchain_identifier: "local_freebsd"
-
-  tool_path { name: "ar" path: "/usr/bin/ar" }
-  tool_path { name: "compat-ld" path: "/usr/bin/ld" }
-  tool_path { name: "cpp" path: "/usr/bin/cpp" }
-  tool_path { name: "dwp" path: "/usr/bin/dwp" }
-  tool_path { name: "gcc" path: "/usr/bin/clang" }
-  cxx_flag: "-std=c++0x"
-  linker_flag: "-lstdc++"
-  linker_flag: "-B/usr/bin/"
-
-  # TODO(bazel-team): In theory, the path here ought to exactly match the path
-  # used by gcc. That works because bazel currently doesn't track files at
-  # absolute locations and has no remote execution, yet. However, this will need
-  # to be fixed, maybe with auto-detection?
-  cxx_builtin_include_directory: "/usr/lib/clang"
-  cxx_builtin_include_directory: "/usr/local/include"
-  cxx_builtin_include_directory: "/usr/include"
-  tool_path { name: "gcov" path: "/usr/bin/gcov" }
-
-  # C(++) compiles invoke the compiler (as that is the one knowing where
-  # to find libraries), but we provide LD so other rules can invoke the linker.
-  tool_path { name: "ld" path: "/usr/bin/ld" }
-
-  tool_path { name: "nm" path: "/usr/bin/nm" }
-  tool_path { name: "objcopy" path: "/usr/bin/objcopy" }
-  objcopy_embed_flag: "-I"
-  objcopy_embed_flag: "binary"
-  tool_path { name: "objdump" path: "/usr/bin/objdump" }
-  tool_path { name: "strip" path: "/usr/bin/strip" }
-
-  # Anticipated future default.
-  unfiltered_cxx_flag: "-no-canonical-prefixes"
-
-  # Make C++ compilation deterministic. Use linkstamping instead of these
-  # compiler symbols.
-  unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
-  unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
-
-  # Security hardening on by default.
-  # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
-  # We need to undef it before redefining it as some distributions now have
-  # it enabled by default.
-  compiler_flag: "-U_FORTIFY_SOURCE"
-  compiler_flag: "-D_FORTIFY_SOURCE=1"
-  compiler_flag: "-fstack-protector"
-  linker_flag: "-Wl,-z,relro,-z,now"
-
-  # Enable coloring even if there's no attached terminal. Bazel removes the
-  # escape sequences if --nocolor is specified. This isn't supported by gcc
-  # on Ubuntu 14.04.
-  # compiler_flag: "-fcolor-diagnostics"
-
-  # All warnings are enabled. Maybe enable -Werror as well?
-  compiler_flag: "-Wall"
-  # Enable a few more warnings that aren't part of -Wall.
-  #compiler_flag: "-Wunused-but-set-parameter"
-  # But disable some that are problematic.
-  #compiler_flag: "-Wno-free-nonheap-object" # has false positives
-
-  # Keep stack frames for debugging, even in opt mode.
-  compiler_flag: "-fno-omit-frame-pointer"
-
-  # Anticipated future default.
-  linker_flag: "-no-canonical-prefixes"
-  # Have gcc return the exit code from ld.
-  #linker_flag: "-pass-exit-codes"
-  # Stamp the binary with a unique identifier.
-  #linker_flag: "-Wl,--build-id=md5"
-  linker_flag: "-Wl,--hash-style=gnu"
-  # Gold linker only? Can we enable this by default?
-  # linker_flag: "-Wl,--warn-execstack"
-  # linker_flag: "-Wl,--detect-odr-violations"
-
-  compilation_mode_flags {
-    mode: DBG
-    # Enable debug symbols.
-    compiler_flag: "-g"
-  }
-  compilation_mode_flags {
-    mode: OPT
-
-    # No debug symbols.
-    # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or
-    # even generally? However, that can't happen here, as it requires special
-    # handling in Bazel.
-    compiler_flag: "-g0"
-
-    # Conservative choice for -O
-    # -O3 can increase binary size and even slow down the resulting binaries.
-    # Profile first and / or use FDO if you need better performance than this.
-    compiler_flag: "-O2"
-
-    # Disable assertions
-    compiler_flag: "-DNDEBUG"
-
-    # Removal of unused code and data at link time (can this increase binary size in some cases?).
-    compiler_flag: "-ffunction-sections"
-    compiler_flag: "-fdata-sections"
-    linker_flag: "-Wl,--gc-sections"
-  }
-  linking_mode_flags { mode: DYNAMIC }
-}
-
-toolchain {
-  abi_version: "local"
-  abi_libc_version: "local"
-  builtin_sysroot: ""
-  compiler: "windows_mingw"
-  host_system_name: "local"
-  needsPic: false
-  target_libc: "local"
-  target_cpu: "x64_windows"
-  target_system_name: "local"
-  toolchain_identifier: "local_windows_mingw"
-
-  tool_path { name: "ar" path: "C:/mingw/bin/ar" }
-  tool_path { name: "compat-ld" path: "C:/mingw/bin/ld" }
-  tool_path { name: "cpp" path: "C:/mingw/bin/cpp" }
-  tool_path { name: "dwp" path: "C:/mingw/bin/dwp" }
-  tool_path { name: "gcc" path: "C:/mingw/bin/gcc" }
-  cxx_flag: "-std=c++0x"
-  # TODO(bazel-team): In theory, the path here ought to exactly match the path
-  # used by gcc. That works because bazel currently doesn't track files at
-  # absolute locations and has no remote execution, yet. However, this will need
-  # to be fixed, maybe with auto-detection?
-  cxx_builtin_include_directory: "C:/mingw/include"
-  cxx_builtin_include_directory: "C:/mingw/lib/gcc"
-  tool_path { name: "gcov" path: "C:/mingw/bin/gcov" }
-  tool_path { name: "ld" path: "C:/mingw/bin/ld" }
-  tool_path { name: "nm" path: "C:/mingw/bin/nm" }
-  tool_path { name: "objcopy" path: "C:/mingw/bin/objcopy" }
-  objcopy_embed_flag: "-I"
-  objcopy_embed_flag: "binary"
-  tool_path { name: "objdump" path: "C:/mingw/bin/objdump" }
-  tool_path { name: "strip" path: "C:/mingw/bin/strip" }
-  linking_mode_flags { mode: DYNAMIC }
-}
-
-toolchain {
-  abi_version: "local"
-  abi_libc_version: "local"
-  builtin_sysroot: ""
-  compiler: "windows_msys64_mingw64"
-  host_system_name: "local"
-  needsPic: false
-  target_libc: "local"
-  target_cpu: "x64_windows"
-  target_system_name: "local"
-  toolchain_identifier: "local_windows_msys64_mingw64"
-
-  tool_path { name: "ar" path: "C:/tools/msys64/mingw64/bin/ar" }
-  tool_path { name: "compat-ld" path: "C:/tools/msys64/mingw64/bin/ld" }
-  tool_path { name: "cpp" path: "C:/tools/msys64/mingw64/bin/cpp" }
-  tool_path { name: "dwp" path: "C:/tools/msys64/mingw64/bin/dwp" }
-  tool_path { name: "gcc" path: "C:/tools/msys64/mingw64/bin/gcc" }
-  cxx_flag: "-std=c++0x"
-  # TODO(bazel-team): In theory, the path here ought to exactly match the path
-  # used by gcc. That works because bazel currently doesn't track files at
-  # absolute locations and has no remote execution, yet. However, this will need
-  # to be fixed, maybe with auto-detection?
-  cxx_builtin_include_directory: "C:/tools/msys64/mingw64/x86_64-w64-mingw32/include"
-  tool_path { name: "gcov" path: "C:/tools/msys64/mingw64/bin/gcov" }
-  tool_path { name: "ld" path: "C:/tools/msys64/mingw64/bin/ld" }
-  tool_path { name: "nm" path: "C:/tools/msys64/mingw64/bin/nm" }
-  tool_path { name: "objcopy" path: "C:/tools/msys64/mingw64/bin/objcopy" }
-  objcopy_embed_flag: "-I"
-  objcopy_embed_flag: "binary"
-  tool_path { name: "objdump" path: "C:/tools/msys64/mingw64/bin/objdump" }
-  tool_path { name: "strip" path: "C:/tools/msys64/mingw64/bin/strip" }
-  linking_mode_flags { mode: DYNAMIC }
-}
-
-toolchain {
-  abi_version: "local"
-  abi_libc_version: "local"
-  builtin_sysroot: ""
-  compiler: "windows_clang"
-  host_system_name: "local"
-  needsPic: false
-  target_libc: "local"
-  target_cpu: "x64_windows"
-  target_system_name: "local"
-  toolchain_identifier: "local_windows_clang"
-
-  tool_path { name: "ar" path: "C:/mingw/bin/ar" }
-  tool_path { name: "compat-ld" path: "C:/Program Files (x86)/LLVM/bin/ld" }
-  tool_path { name: "cpp" path: "C:/Program Files (x86)/LLVM/bin/cpp" }
-  tool_path { name: "dwp" path: "C:/Program Files (x86)/LLVM/bin/dwp" }
-  tool_path { name: "gcc" path: "C:/Program Files (x86)/LLVM/bin/clang" }
-  cxx_flag: "-std=c++0x"
-  # TODO(bazel-team): In theory, the path here ought to exactly match the path
-  # used by gcc. That works because bazel currently doesn't track files at
-  # absolute locations and has no remote execution, yet. However, this will need
-  # to be fixed, maybe with auto-detection?
-  cxx_builtin_include_directory: "/usr/lib/gcc/"
-  cxx_builtin_include_directory: "/usr/local/include"
-  cxx_builtin_include_directory: "/usr/include"
-  tool_path { name: "gcov" path: "C:/Program Files (x86)/LLVM/bin/gcov" }
-  tool_path { name: "ld" path: "C:/Program Files (x86)/LLVM/bin/ld" }
-  tool_path { name: "nm" path: "C:/Program Files (x86)/LLVM/bin/nm" }
-  tool_path { name: "objcopy" path: "C:/Program Files (x86)/LLVM/bin/objcopy" }
-  objcopy_embed_flag: "-I"
-  objcopy_embed_flag: "binary"
-  tool_path { name: "objdump" path: "C:/Program Files (x86)/LLVM/bin/objdump" }
-  tool_path { name: "strip" path: "C:/Program Files (x86)/LLVM/bin/strip" }
-  linking_mode_flags { mode: DYNAMIC }
-}
-
-toolchain {
-   abi_version: "local"
-   abi_libc_version: "local"
-   builtin_sysroot: ""
-   compiler: "windows_msys64"
-   host_system_name: "local"
-   needsPic: false
-   target_libc: "local"
-   target_cpu: "x64_windows"
-   target_system_name: "local"
-   toolchain_identifier: "local_windows_msys64"
-
-   tool_path { name: "ar" path: "C:/tools/msys64/usr/bin/ar" }
-   tool_path { name: "compat-ld" path: "C:/tools/msys64/usr/bin/ld" }
-   tool_path { name: "cpp" path: "C:/tools/msys64/usr/bin/cpp" }
-   tool_path { name: "dwp" path: "C:/tools/msys64/usr/bin/dwp" }
-   # Use gcc instead of g++ so that C will compile correctly.
-   tool_path { name: "gcc" path: "C:/tools/msys64/usr/bin/gcc" }
-   cxx_flag: "-std=gnu++0x"
-   linker_flag: "-lstdc++"
-   # TODO(bazel-team): In theory, the path here ought to exactly match the path
-   # used by gcc. That works because bazel currently doesn't track files at
-   # absolute locations and has no remote execution, yet. However, this will need
-   # to be fixed, maybe with auto-detection?
-   cxx_builtin_include_directory: "C:/tools/msys64/"
-   cxx_builtin_include_directory: "/usr/"
-   tool_path { name: "gcov" path: "C:/tools/msys64/usr/bin/gcov" }
-   tool_path { name: "ld" path: "C:/tools/msys64/usr/bin/ld" }
-   tool_path { name: "nm" path: "C:/tools/msys64/usr/bin/nm" }
-   tool_path { name: "objcopy" path: "C:/tools/msys64/usr/bin/objcopy" }
-   objcopy_embed_flag: "-I"
-   objcopy_embed_flag: "binary"
-   tool_path { name: "objdump" path: "C:/tools/msys64/usr/bin/objdump" }
-   tool_path { name: "strip" path: "C:/tools/msys64/usr/bin/strip" }
-   linking_mode_flags { mode: DYNAMIC }
-}
-
-toolchain {
-  toolchain_identifier: "vc_14_0_x64"
-  host_system_name: "local"
-  target_system_name: "local"
-
-  abi_version: "local"
-  abi_libc_version: "local"
-  target_cpu: "x64_windows_msvc"
-  compiler: "cl"
-  target_libc: "msvcrt140"
-  default_python_version: "python2.7"
-  cxx_builtin_include_directory: "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/INCLUDE"
-  cxx_builtin_include_directory: "C:/Program Files (x86)/Windows Kits/10/include/"
-  cxx_builtin_include_directory: "C:/Program Files (x86)/Windows Kits/8.1/include/"
-  cxx_builtin_include_directory: "C:/Program Files (x86)/GnuWin32/include/"
-  cxx_builtin_include_directory: "C:/python_27_amd64/files/include"
-  tool_path {
-    name: "ar"
-    path: "wrapper/bin/msvc_link.bat"
-  }
-  tool_path {
-    name: "cpp"
-    path: "wrapper/bin/msvc_cl.bat"
-  }
-  tool_path {
-    name: "gcc"
-    path: "wrapper/bin/msvc_cl.bat"
-  }
-  tool_path {
-    name: "gcov"
-    path: "wrapper/bin/msvc_nop.bat"
-  }
-  tool_path {
-    name: "ld"
-    path: "wrapper/bin/msvc_link.bat"
-  }
-  tool_path {
-    name: "nm"
-    path: "wrapper/bin/msvc_nop.bat"
-  }
-  tool_path {
-    name: "objcopy"
-    path: "wrapper/bin/msvc_nop.bat"
-  }
-  tool_path {
-    name: "objdump"
-    path: "wrapper/bin/msvc_nop.bat"
-  }
-  tool_path {
-    name: "strip"
-    path: "wrapper/bin/msvc_nop.bat"
-  }
-  supports_gold_linker: false
-  supports_start_end_lib: false
-  supports_interface_shared_objects: false
-  supports_incremental_linker: false
-  supports_normalizing_ar: true
-  needsPic: false
-
-  compiler_flag: "-m64"
-  compiler_flag: "/D__inline__=__inline"
-  # TODO(pcloudy): Review those flags below, they should be defined by cl.exe
-  compiler_flag: "/DOS_WINDOWS=OS_WINDOWS"
-  compiler_flag: "/DCOMPILER_MSVC"
-
-  # Don't pollute with GDI macros in windows.h.
-  compiler_flag: "/DNOGDI"
-  # Don't define min/max macros in windows.h.
-  compiler_flag: "/DNOMINMAX"
-  compiler_flag: "/DPRAGMA_SUPPORTED"
-  # Platform defines.
-  compiler_flag: "/D_WIN32_WINNT=0x0600"
-  # Turn off warning messages.
-  compiler_flag: "/D_CRT_SECURE_NO_DEPRECATE"
-  compiler_flag: "/D_CRT_SECURE_NO_WARNINGS"
-  compiler_flag: "/D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS"
-  # Use math constants (M_PI, etc.) from the math library
-  compiler_flag: "/D_USE_MATH_DEFINES"
-
-  # Useful options to have on for compilation.
-  # Suppress startup banner.
-  compiler_flag: "/nologo"
-  # Increase the capacity of object files to 2^32 sections.
-  compiler_flag: "/bigobj"
-  # Allocate 500MB for precomputed headers.
-  compiler_flag: "/Zm500"
-  # Use unsigned char by default.
-  compiler_flag: "/J"
-  # Use function level linking.
-  compiler_flag: "/Gy"
-  # Use string pooling.
-  compiler_flag: "/GF"
-  # Warning level 3 (could possibly go to 4 in the future).
-  compiler_flag: "/W3"
-  # Catch both asynchronous (structured) and synchronous (C++) exceptions.
-  compiler_flag: "/EHsc"
-
-  # Globally disabled warnings.
-  # Don't warn about elements of array being be default initialized.
-  compiler_flag: "/wd4351"
-  # Don't warn about no matching delete found.
-  compiler_flag: "/wd4291"
-  # Don't warn about diamond inheritance patterns.
-  compiler_flag: "/wd4250"
-  # Don't warn about insecure functions (e.g. non _s functions).
-  compiler_flag: "/wd4996"
-
-  linker_flag: "-m64"
-
-  feature {
-    name: 'include_paths'
-    flag_set {
-      action: 'preprocess-assemble'
-      action: 'c-compile'
-      action: 'c++-compile'
-      action: 'c++-header-parsing'
-      action: 'c++-header-preprocessing'
-      action: 'c++-module-compile'
-      flag_group {
-        flag: '/I%{quote_include_paths}'
-      }
-      flag_group {
-        flag: '/I%{include_paths}'
-      }
-      flag_group {
-        flag: '/I%{system_include_paths}'
-      }
-    }
-  }
-
-  feature {
-    name: 'dependency_file'
-    flag_set {
-      action: 'assemble'
-      action: 'preprocess-assemble'
-      action: 'c-compile'
-      action: 'c++-compile'
-      action: 'c++-module-compile'
-      action: 'c++-header-preprocessing'
-      action: 'c++-header-parsing'
-      expand_if_all_available: 'dependency_file'
-      flag_group {
-        flag: '/DEPENDENCY_FILE'
-        flag: '%{dependency_file}'
-      }
-    }
-  }
-
-  # Stop passing -frandom-seed option
-  feature {
-    name: 'random_seed'
-  }
-
-  # This feature is just for enabling flag_set in action_config for -c and -o options during the transitional period
-  feature {
-    name: 'compile_action_flags_in_flag_set'
-  }
-
-  action_config {
-    config_name: 'c-compile'
-    action_name: 'c-compile'
-    tool {
-      tool_path: 'wrapper/bin/msvc_cl.bat'
-    }
-    flag_set {
-      flag_group {
-        flag: '/c'
-        flag: '%{source_file}'
-      }
-    }
-    flag_set {
-      expand_if_all_available: 'output_object_file'
-      flag_group {
-        flag: '/Fo%{output_object_file}'
-      }
-    }
-    flag_set {
-      expand_if_all_available: 'output_assembly_file'
-      flag_group {
-        flag: '/Fa%{output_assembly_file}'
-      }
-    }
-    flag_set {
-      expand_if_all_available: 'output_preprocess_file'
-      flag_group {
-        flag: '/P'
-        flag: '/Fi%{output_preprocess_file}'
-      }
-    }
-  }
-
-  action_config {
-    config_name: 'c++-compile'
-    action_name: 'c++-compile'
-    tool {
-      tool_path: 'wrapper/bin/msvc_cl.bat'
-    }
-    flag_set {
-      flag_group {
-        flag: '/c'
-        flag: '%{source_file}'
-      }
-    }
-    flag_set {
-      expand_if_all_available: 'output_object_file'
-      flag_group {
-        flag: '/Fo%{output_object_file}'
-      }
-    }
-    flag_set {
-      expand_if_all_available: 'output_assembly_file'
-      flag_group {
-        flag: '/Fa%{output_assembly_file}'
-      }
-    }
-    flag_set {
-      expand_if_all_available: 'output_preprocess_file'
-      flag_group {
-        flag: '/P'
-        flag: '/Fi%{output_preprocess_file}'
-      }
-    }
-  }
-
-  compilation_mode_flags {
-    mode: DBG
-    compiler_flag: "/DDEBUG=1"
-    # This will signal the wrapper that we are doing a debug build, which sets
-    # some internal state of the toolchain wrapper. It is intentionally a "-"
-    # flag to make this very obvious.
-    compiler_flag: "-g"
-    compiler_flag: "/Od"
-    compiler_flag: "-Xcompilation-mode=dbg"
-  }
-
-  compilation_mode_flags {
-    mode: FASTBUILD
-    compiler_flag: "/DNDEBUG"
-    compiler_flag: "/Od"
-    compiler_flag: "-Xcompilation-mode=fastbuild"
-  }
-
-  compilation_mode_flags {
-    mode: OPT
-    compiler_flag: "/DNDEBUG"
-    compiler_flag: "/O2"
-    compiler_flag: "-Xcompilation-mode=opt"
-  }
-}
diff --git a/third_party/toolchains/cpus/arm/arm_compiler_configure.bzl b/third_party/toolchains/cpus/arm/arm_compiler_configure.bzl
deleted file mode 100644
index ab6eac1..0000000
--- a/third_party/toolchains/cpus/arm/arm_compiler_configure.bzl
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- Python -*-
-"""Repository rule for arm compiler autoconfiguration."""
-
-def _tpl(repository_ctx, tpl, substitutions={}, out=None):
-  if not out:
-    out = tpl
-  repository_ctx.template(
-      out,
-      Label("//third_party/toolchains/cpus/arm:%s.tpl" % tpl),
-      substitutions)
-
-
-def _arm_compiler_configure_impl(repository_ctx):
-  # We need to find a cross-compilation include directory for Python, so look
-  # for an environment variable. Be warned, this crosstool template is only
-  # regenerated on the first run of Bazel, so if you change the variable after
-  # it may not be reflected in later builds. Doing a shutdown and clean of Bazel
-  # doesn't fix this, you'll need to delete the generated file at something like:
-  # external/local_config_arm_compiler/CROSSTOOL in your Bazel install.
-  if "CROSSTOOL_PYTHON_INCLUDE_PATH" in repository_ctx.os.environ:
-    python_include_path = repository_ctx.os.environ["CROSSTOOL_PYTHON_INCLUDE_PATH"]
-  else:
-    python_include_path = "/usr/include/python2.7"
-  _tpl(repository_ctx, "CROSSTOOL", {
-      "%{ARM_COMPILER_PATH}%": str(repository_ctx.path(
-          repository_ctx.attr.remote_config_repo)),
-      "%{PYTHON_INCLUDE_PATH}%": python_include_path,
-  })
-  repository_ctx.symlink(repository_ctx.attr.build_file, "BUILD")
-
-
-arm_compiler_configure = repository_rule(
-    implementation = _arm_compiler_configure_impl,
-    attrs = {
-        "remote_config_repo": attr.string(mandatory = False, default =""),
-        "build_file": attr.label(),
-    },
-)
diff --git a/third_party/toolchains/cpus/py/BUILD b/third_party/toolchains/cpus/py/BUILD
deleted file mode 100644
index c175742..0000000
--- a/third_party/toolchains/cpus/py/BUILD
+++ /dev/null
@@ -1,197 +0,0 @@
-# A build file to configure python remote repository used with Bazel remote
-# execution service
-# DO NOT EDIT: automatically generated BUILD file
-
-licenses(["restricted"])
-
-package(default_visibility = ["//visibility:public"])
-
-cc_library(
-    name = "python_headers",
-    hdrs = [":python_include"],
-    data = select({
-        ":windows": [":python_import_lib"],
-        "//conditions:default": [],
-    }),
-    includes = ["python_include"],
-    linkopts = select({
-        # TODO(pcloudy): Ideally, this should just go into deps after resolving
-        # https://github.com/bazelbuild/bazel/issues/3237,
-        ":windows": ["$(locations :python_import_lib)"],
-        "//conditions:default": [],
-    }),
-)
-
-cc_library(
-    name = "numpy_headers",
-    hdrs = [":numpy_include"],
-    includes = ["numpy_include"],
-)
-
-config_setting(
-    name = "windows",
-    values = {"cpu": "x64_windows"},
-    visibility = ["//visibility:public"],
-)
-
-genrule(
-    name = "python_include",
-    outs = [
-        "python_include/code.h",
-        "python_include/dtoa.h",
-        "python_include/tupleobject.h",
-        "python_include/object.h",
-        "python_include/ast.h",
-        "python_include/pymacconfig.h",
-        "python_include/errcode.h",
-        "python_include/frameobject.h",
-        "python_include/pgenheaders.h",
-        "python_include/cellobject.h",
-        "python_include/intobject.h",
-        "python_include/pythread.h",
-        "python_include/cStringIO.h",
-        "python_include/boolobject.h",
-        "python_include/modsupport.h",
-        "python_include/import.h",
-        "python_include/pymath.h",
-        "python_include/node.h",
-        "python_include/funcobject.h",
-        "python_include/eval.h",
-        "python_include/longintrepr.h",
-        "python_include/floatobject.h",
-        "python_include/rangeobject.h",
-        "python_include/pyfpe.h",
-        "python_include/pystrcmp.h",
-        "python_include/dictobject.h",
-        "python_include/pyarena.h",
-        "python_include/objimpl.h",
-        "python_include/bitset.h",
-        "python_include/memoryobject.h",
-        "python_include/bytearrayobject.h",
-        "python_include/pydebug.h",
-        "python_include/pyerrors.h",
-        "python_include/weakrefobject.h",
-        "python_include/grammar.h",
-        "python_include/symtable.h",
-        "python_include/longobject.h",
-        "python_include/structmember.h",
-        "python_include/enumobject.h",
-        "python_include/classobject.h",
-        "python_include/unicodeobject.h",
-        "python_include/sliceobject.h",
-        "python_include/pystrtod.h",
-        "python_include/genobject.h",
-        "python_include/pymactoolbox.h",
-        "python_include/compile.h",
-        "python_include/pyexpat.h",
-        "python_include/asdl.h",
-        "python_include/codecs.h",
-        "python_include/pyctype.h",
-        "python_include/sysmodule.h",
-        "python_include/methodobject.h",
-        "python_include/graminit.h",
-        "python_include/cobject.h",
-        "python_include/intrcheck.h",
-        "python_include/pyport.h",
-        "python_include/warnings.h",
-        "python_include/osdefs.h",
-        "python_include/fileobject.h",
-        "python_include/stringobject.h",
-        "python_include/timefuncs.h",
-        "python_include/traceback.h",
-        "python_include/ceval.h",
-        "python_include/bytes_methods.h",
-        "python_include/pyconfig.h",
-        "python_include/Python.h",
-        "python_include/moduleobject.h",
-        "python_include/pystate.h",
-        "python_include/descrobject.h",
-        "python_include/ucnhash.h",
-        "python_include/pygetopt.h",
-        "python_include/pymem.h",
-        "python_include/complexobject.h",
-        "python_include/structseq.h",
-        "python_include/datetime.h",
-        "python_include/pythonrun.h",
-        "python_include/numpy/oldnumeric.h",
-        "python_include/numpy/npy_1_7_deprecated_api.h",
-        "python_include/numpy/ufunc_api.txt",
-        "python_include/numpy/multiarray_api.txt",
-        "python_include/numpy/halffloat.h",
-        "python_include/numpy/npy_common.h",
-        "python_include/numpy/utils.h",
-        "python_include/numpy/npy_interrupt.h",
-        "python_include/numpy/npy_endian.h",
-        "python_include/numpy/__ufunc_api.h",
-        "python_include/numpy/_neighborhood_iterator_imp.h",
-        "python_include/numpy/ufuncobject.h",
-        "python_include/numpy/ndarraytypes.h",
-        "python_include/numpy/npy_math.h",
-        "python_include/numpy/noprefix.h",
-        "python_include/numpy/npy_3kcompat.h",
-        "python_include/numpy/arrayscalars.h",
-        "python_include/numpy/npy_os.h",
-        "python_include/numpy/ndarrayobject.h",
-        "python_include/numpy/npy_no_deprecated_api.h",
-        "python_include/numpy/arrayobject.h",
-        "python_include/numpy/_numpyconfig.h",
-        "python_include/numpy/__multiarray_api.h",
-        "python_include/numpy/npy_cpu.h",
-        "python_include/numpy/old_defines.h",
-        "python_include/numpy/numpyconfig.h",
-        "python_include/pycapsule.h",
-        "python_include/setobject.h",
-        "python_include/listobject.h",
-        "python_include/bytesobject.h",
-        "python_include/pgen.h",
-        "python_include/patchlevel.h",
-        "python_include/opcode.h",
-        "python_include/parsetok.h",
-        "python_include/marshal.h",
-        "python_include/token.h",
-        "python_include/iterobject.h",
-        "python_include/abstract.h",
-        "python_include/py_curses.h",
-        "python_include/metagrammar.h",
-        "python_include/bufferobject.h",
-        "python_include/Python-ast.h",
-    ],
-    cmd = """
-cp "/usr/include/python2.7/code.h" "$(@D)/python_include/code.h" && cp "/usr/include/python2.7/dtoa.h" "$(@D)/python_include/dtoa.h" && cp "/usr/include/python2.7/tupleobject.h" "$(@D)/python_include/tupleobject.h" && cp "/usr/include/python2.7/object.h" "$(@D)/python_include/object.h" && cp "/usr/include/python2.7/ast.h" "$(@D)/python_include/ast.h" && cp "/usr/include/python2.7/pymacconfig.h" "$(@D)/python_include/pymacconfig.h" && cp "/usr/include/python2.7/errcode.h" "$(@D)/python_include/errcode.h" && cp "/usr/include/python2.7/frameobject.h" "$(@D)/python_include/frameobject.h" && cp "/usr/include/python2.7/pgenheaders.h" "$(@D)/python_include/pgenheaders.h" && cp "/usr/include/python2.7/cellobject.h" "$(@D)/python_include/cellobject.h" && cp "/usr/include/python2.7/intobject.h" "$(@D)/python_include/intobject.h" && cp "/usr/include/python2.7/pythread.h" "$(@D)/python_include/pythread.h" && cp "/usr/include/python2.7/cStringIO.h" "$(@D)/python_include/cStringIO.h" && cp "/usr/include/python2.7/boolobject.h" "$(@D)/python_include/boolobject.h" && cp "/usr/include/python2.7/modsupport.h" "$(@D)/python_include/modsupport.h" && cp "/usr/include/python2.7/import.h" "$(@D)/python_include/import.h" && cp "/usr/include/python2.7/pymath.h" "$(@D)/python_include/pymath.h" && cp "/usr/include/python2.7/node.h" "$(@D)/python_include/node.h" && cp "/usr/include/python2.7/funcobject.h" "$(@D)/python_include/funcobject.h" && cp "/usr/include/python2.7/eval.h" "$(@D)/python_include/eval.h" && cp "/usr/include/python2.7/longintrepr.h" "$(@D)/python_include/longintrepr.h" && cp "/usr/include/python2.7/floatobject.h" "$(@D)/python_include/floatobject.h" && cp "/usr/include/python2.7/rangeobject.h" "$(@D)/python_include/rangeobject.h" && cp "/usr/include/python2.7/pyfpe.h" "$(@D)/python_include/pyfpe.h" && cp "/usr/include/python2.7/pystrcmp.h" "$(@D)/python_include/pystrcmp.h" && cp "/usr/include/python2.7/dictobject.h" "$(@D)/python_include/dictobject.h" && cp "/usr/include/python2.7/pyarena.h" "$(@D)/python_include/pyarena.h" && cp "/usr/include/python2.7/objimpl.h" "$(@D)/python_include/objimpl.h" && cp "/usr/include/python2.7/bitset.h" "$(@D)/python_include/bitset.h" && cp "/usr/include/python2.7/memoryobject.h" "$(@D)/python_include/memoryobject.h" && cp "/usr/include/python2.7/bytearrayobject.h" "$(@D)/python_include/bytearrayobject.h" && cp "/usr/include/python2.7/pydebug.h" "$(@D)/python_include/pydebug.h" && cp "/usr/include/python2.7/pyerrors.h" "$(@D)/python_include/pyerrors.h" && cp "/usr/include/python2.7/weakrefobject.h" "$(@D)/python_include/weakrefobject.h" && cp "/usr/include/python2.7/grammar.h" "$(@D)/python_include/grammar.h" && cp "/usr/include/python2.7/symtable.h" "$(@D)/python_include/symtable.h" && cp "/usr/include/python2.7/longobject.h" "$(@D)/python_include/longobject.h" && cp "/usr/include/python2.7/structmember.h" "$(@D)/python_include/structmember.h" && cp "/usr/include/python2.7/enumobject.h" "$(@D)/python_include/enumobject.h" && cp "/usr/include/python2.7/classobject.h" "$(@D)/python_include/classobject.h" && cp "/usr/include/python2.7/unicodeobject.h" "$(@D)/python_include/unicodeobject.h" && cp "/usr/include/python2.7/sliceobject.h" "$(@D)/python_include/sliceobject.h" && cp "/usr/include/python2.7/pystrtod.h" "$(@D)/python_include/pystrtod.h" && cp "/usr/include/python2.7/genobject.h" "$(@D)/python_include/genobject.h" && cp "/usr/include/python2.7/pymactoolbox.h" "$(@D)/python_include/pymactoolbox.h" && cp "/usr/include/python2.7/compile.h" "$(@D)/python_include/compile.h" && cp "/usr/include/python2.7/pyexpat.h" "$(@D)/python_include/pyexpat.h" && cp "/usr/include/python2.7/asdl.h" "$(@D)/python_include/asdl.h" && cp "/usr/include/python2.7/codecs.h" "$(@D)/python_include/codecs.h" && cp "/usr/include/python2.7/pyctype.h" "$(@D)/python_include/pyctype.h" && cp "/usr/include/python2.7/sysmodule.h" "$(@D)/python_include/sysmodule.h" && cp "/usr/include/python2.7/methodobject.h" "$(@D)/python_include/methodobject.h" && cp "/usr/include/python2.7/graminit.h" "$(@D)/python_include/graminit.h" && cp "/usr/include/python2.7/cobject.h" "$(@D)/python_include/cobject.h" && cp "/usr/include/python2.7/intrcheck.h" "$(@D)/python_include/intrcheck.h" && cp "/usr/include/python2.7/pyport.h" "$(@D)/python_include/pyport.h" && cp "/usr/include/python2.7/warnings.h" "$(@D)/python_include/warnings.h" && cp "/usr/include/python2.7/osdefs.h" "$(@D)/python_include/osdefs.h" && cp "/usr/include/python2.7/fileobject.h" "$(@D)/python_include/fileobject.h" && cp "/usr/include/python2.7/stringobject.h" "$(@D)/python_include/stringobject.h" && cp "/usr/include/python2.7/timefuncs.h" "$(@D)/python_include/timefuncs.h" && cp "/usr/include/python2.7/traceback.h" "$(@D)/python_include/traceback.h" && cp "/usr/include/python2.7/ceval.h" "$(@D)/python_include/ceval.h" && cp "/usr/include/python2.7/bytes_methods.h" "$(@D)/python_include/bytes_methods.h" && cp "/usr/include/python2.7/pyconfig.h" "$(@D)/python_include/pyconfig.h" && cp "/usr/include/python2.7/Python.h" "$(@D)/python_include/Python.h" && cp "/usr/include/python2.7/moduleobject.h" "$(@D)/python_include/moduleobject.h" && cp "/usr/include/python2.7/pystate.h" "$(@D)/python_include/pystate.h" && cp "/usr/include/python2.7/descrobject.h" "$(@D)/python_include/descrobject.h" && cp "/usr/include/python2.7/ucnhash.h" "$(@D)/python_include/ucnhash.h" && cp "/usr/include/python2.7/pygetopt.h" "$(@D)/python_include/pygetopt.h" && cp "/usr/include/python2.7/pymem.h" "$(@D)/python_include/pymem.h" && cp "/usr/include/python2.7/complexobject.h" "$(@D)/python_include/complexobject.h" && cp "/usr/include/python2.7/structseq.h" "$(@D)/python_include/structseq.h" && cp "/usr/include/python2.7/datetime.h" "$(@D)/python_include/datetime.h" && cp "/usr/include/python2.7/pythonrun.h" "$(@D)/python_include/pythonrun.h" && cp "/usr/include/python2.7/numpy/oldnumeric.h" "$(@D)/python_include/numpy/oldnumeric.h" && cp "/usr/include/python2.7/numpy/npy_1_7_deprecated_api.h" "$(@D)/python_include/numpy/npy_1_7_deprecated_api.h" && cp "/usr/include/python2.7/numpy/ufunc_api.txt" "$(@D)/python_include/numpy/ufunc_api.txt" && cp "/usr/include/python2.7/numpy/multiarray_api.txt" "$(@D)/python_include/numpy/multiarray_api.txt" && cp "/usr/include/python2.7/numpy/halffloat.h" "$(@D)/python_include/numpy/halffloat.h" && cp "/usr/include/python2.7/numpy/npy_common.h" "$(@D)/python_include/numpy/npy_common.h" && cp "/usr/include/python2.7/numpy/utils.h" "$(@D)/python_include/numpy/utils.h" && cp "/usr/include/python2.7/numpy/npy_interrupt.h" "$(@D)/python_include/numpy/npy_interrupt.h" && cp "/usr/include/python2.7/numpy/npy_endian.h" "$(@D)/python_include/numpy/npy_endian.h" && cp "/usr/include/python2.7/numpy/__ufunc_api.h" "$(@D)/python_include/numpy/__ufunc_api.h" && cp "/usr/include/python2.7/numpy/_neighborhood_iterator_imp.h" "$(@D)/python_include/numpy/_neighborhood_iterator_imp.h" && cp "/usr/include/python2.7/numpy/ufuncobject.h" "$(@D)/python_include/numpy/ufuncobject.h" && cp "/usr/include/python2.7/numpy/ndarraytypes.h" "$(@D)/python_include/numpy/ndarraytypes.h" && cp "/usr/include/python2.7/numpy/npy_math.h" "$(@D)/python_include/numpy/npy_math.h" && cp "/usr/include/python2.7/numpy/noprefix.h" "$(@D)/python_include/numpy/noprefix.h" && cp "/usr/include/python2.7/numpy/npy_3kcompat.h" "$(@D)/python_include/numpy/npy_3kcompat.h" && cp "/usr/include/python2.7/numpy/arrayscalars.h" "$(@D)/python_include/numpy/arrayscalars.h" && cp "/usr/include/python2.7/numpy/npy_os.h" "$(@D)/python_include/numpy/npy_os.h" && cp "/usr/include/python2.7/numpy/ndarrayobject.h" "$(@D)/python_include/numpy/ndarrayobject.h" && cp "/usr/include/python2.7/numpy/npy_no_deprecated_api.h" "$(@D)/python_include/numpy/npy_no_deprecated_api.h" && cp "/usr/include/python2.7/numpy/arrayobject.h" "$(@D)/python_include/numpy/arrayobject.h" && cp "/usr/include/python2.7/numpy/_numpyconfig.h" "$(@D)/python_include/numpy/_numpyconfig.h" && cp "/usr/include/python2.7/numpy/__multiarray_api.h" "$(@D)/python_include/numpy/__multiarray_api.h" && cp "/usr/include/python2.7/numpy/npy_cpu.h" "$(@D)/python_include/numpy/npy_cpu.h" && cp "/usr/include/python2.7/numpy/old_defines.h" "$(@D)/python_include/numpy/old_defines.h" && cp "/usr/include/python2.7/numpy/numpyconfig.h" "$(@D)/python_include/numpy/numpyconfig.h" && cp "/usr/include/python2.7/pycapsule.h" "$(@D)/python_include/pycapsule.h" && cp "/usr/include/python2.7/setobject.h" "$(@D)/python_include/setobject.h" && cp "/usr/include/python2.7/listobject.h" "$(@D)/python_include/listobject.h" && cp "/usr/include/python2.7/bytesobject.h" "$(@D)/python_include/bytesobject.h" && cp "/usr/include/python2.7/pgen.h" "$(@D)/python_include/pgen.h" && cp "/usr/include/python2.7/patchlevel.h" "$(@D)/python_include/patchlevel.h" && cp "/usr/include/python2.7/opcode.h" "$(@D)/python_include/opcode.h" && cp "/usr/include/python2.7/parsetok.h" "$(@D)/python_include/parsetok.h" && cp "/usr/include/python2.7/marshal.h" "$(@D)/python_include/marshal.h" && cp "/usr/include/python2.7/token.h" "$(@D)/python_include/token.h" && cp "/usr/include/python2.7/iterobject.h" "$(@D)/python_include/iterobject.h" && cp "/usr/include/python2.7/abstract.h" "$(@D)/python_include/abstract.h" && cp "/usr/include/python2.7/py_curses.h" "$(@D)/python_include/py_curses.h" && cp "/usr/include/python2.7/metagrammar.h" "$(@D)/python_include/metagrammar.h" && cp "/usr/include/python2.7/bufferobject.h" "$(@D)/python_include/bufferobject.h" && cp "/usr/include/python2.7/Python-ast.h" "$(@D)/python_include/Python-ast.h"
-   """,
-)
-
-genrule(
-    name = "numpy_include",
-    outs = [
-        "numpy_include/numpy/oldnumeric.h",
-        "numpy_include/numpy/npy_1_7_deprecated_api.h",
-        "numpy_include/numpy/ufunc_api.txt",
-        "numpy_include/numpy/multiarray_api.txt",
-        "numpy_include/numpy/halffloat.h",
-        "numpy_include/numpy/npy_common.h",
-        "numpy_include/numpy/utils.h",
-        "numpy_include/numpy/npy_interrupt.h",
-        "numpy_include/numpy/npy_endian.h",
-        "numpy_include/numpy/__ufunc_api.h",
-        "numpy_include/numpy/_neighborhood_iterator_imp.h",
-        "numpy_include/numpy/ufuncobject.h",
-        "numpy_include/numpy/ndarraytypes.h",
-        "numpy_include/numpy/npy_math.h",
-        "numpy_include/numpy/noprefix.h",
-        "numpy_include/numpy/npy_3kcompat.h",
-        "numpy_include/numpy/arrayscalars.h",
-        "numpy_include/numpy/npy_os.h",
-        "numpy_include/numpy/ndarrayobject.h",
-        "numpy_include/numpy/npy_no_deprecated_api.h",
-        "numpy_include/numpy/arrayobject.h",
-        "numpy_include/numpy/_numpyconfig.h",
-        "numpy_include/numpy/__multiarray_api.h",
-        "numpy_include/numpy/npy_cpu.h",
-        "numpy_include/numpy/old_defines.h",
-        "numpy_include/numpy/numpyconfig.h",
-    ],
-    cmd = """
-cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/oldnumeric.h" "$(@D)/numpy_include/numpy/oldnumeric.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h" "$(@D)/numpy_include/numpy/npy_1_7_deprecated_api.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ufunc_api.txt" "$(@D)/numpy_include/numpy/ufunc_api.txt" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/multiarray_api.txt" "$(@D)/numpy_include/numpy/multiarray_api.txt" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/halffloat.h" "$(@D)/numpy_include/numpy/halffloat.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_common.h" "$(@D)/numpy_include/numpy/npy_common.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/utils.h" "$(@D)/numpy_include/numpy/utils.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_interrupt.h" "$(@D)/numpy_include/numpy/npy_interrupt.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_endian.h" "$(@D)/numpy_include/numpy/npy_endian.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/__ufunc_api.h" "$(@D)/numpy_include/numpy/__ufunc_api.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/_neighborhood_iterator_imp.h" "$(@D)/numpy_include/numpy/_neighborhood_iterator_imp.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ufuncobject.h" "$(@D)/numpy_include/numpy/ufuncobject.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h" "$(@D)/numpy_include/numpy/ndarraytypes.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_math.h" "$(@D)/numpy_include/numpy/npy_math.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/noprefix.h" "$(@D)/numpy_include/numpy/noprefix.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_3kcompat.h" "$(@D)/numpy_include/numpy/npy_3kcompat.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayscalars.h" "$(@D)/numpy_include/numpy/arrayscalars.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_os.h" "$(@D)/numpy_include/numpy/npy_os.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h" "$(@D)/numpy_include/numpy/ndarrayobject.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_no_deprecated_api.h" "$(@D)/numpy_include/numpy/npy_no_deprecated_api.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h" "$(@D)/numpy_include/numpy/arrayobject.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/_numpyconfig.h" "$(@D)/numpy_include/numpy/_numpyconfig.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/__multiarray_api.h" "$(@D)/numpy_include/numpy/__multiarray_api.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_cpu.h" "$(@D)/numpy_include/numpy/npy_cpu.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/old_defines.h" "$(@D)/numpy_include/numpy/old_defines.h" && cp "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/numpyconfig.h" "$(@D)/numpy_include/numpy/numpyconfig.h"
-   """,
-)
diff --git a/third_party/toolchains/cpus/py3/BUILD b/third_party/toolchains/cpus/py3/BUILD
deleted file mode 100644
index 932a252..0000000
--- a/third_party/toolchains/cpus/py3/BUILD
+++ /dev/null
@@ -1,179 +0,0 @@
-# A build file to configure python remote repository used with Bazel remote
-# execution service
-# DO NOT EDIT: automatically generated BUILD file
-
-licenses(["restricted"])
-
-package(default_visibility = ["//visibility:public"])
-
-cc_library(
-    name = "python_headers",
-    hdrs = [":python_include"],
-    data = select({
-        ":windows": [":python_import_lib"],
-        "//conditions:default": [],
-    }),
-    includes = ["python_include"],
-    linkopts = select({
-        # TODO(pcloudy): Ideally, this should just go into deps after resolving
-        # https://github.com/bazelbuild/bazel/issues/3237,
-        ":windows": ["$(locations :python_import_lib)"],
-        "//conditions:default": [],
-    }),
-)
-
-cc_library(
-    name = "numpy_headers",
-    hdrs = [":numpy_include"],
-    includes = ["numpy_include"],
-)
-
-config_setting(
-    name = "windows",
-    values = {"cpu": "x64_windows"},
-    visibility = ["//visibility:public"],
-)
-
-genrule(
-    name = "python_include",
-    outs = [
-        "python_include/code.h",
-        "python_include/dtoa.h",
-        "python_include/tupleobject.h",
-        "python_include/object.h",
-        "python_include/ast.h",
-        "python_include/pymacconfig.h",
-        "python_include/errcode.h",
-        "python_include/frameobject.h",
-        "python_include/typeslots.h",
-        "python_include/pgenheaders.h",
-        "python_include/cellobject.h",
-        "python_include/pythread.h",
-        "python_include/boolobject.h",
-        "python_include/accu.h",
-        "python_include/modsupport.h",
-        "python_include/import.h",
-        "python_include/pymath.h",
-        "python_include/node.h",
-        "python_include/funcobject.h",
-        "python_include/eval.h",
-        "python_include/pyatomic.h",
-        "python_include/longintrepr.h",
-        "python_include/floatobject.h",
-        "python_include/rangeobject.h",
-        "python_include/pyfpe.h",
-        "python_include/pystrcmp.h",
-        "python_include/fileutils.h",
-        "python_include/dictobject.h",
-        "python_include/pyarena.h",
-        "python_include/osmodule.h",
-        "python_include/objimpl.h",
-        "python_include/bitset.h",
-        "python_include/memoryobject.h",
-        "python_include/bytearrayobject.h",
-        "python_include/pydebug.h",
-        "python_include/pyerrors.h",
-        "python_include/weakrefobject.h",
-        "python_include/grammar.h",
-        "python_include/symtable.h",
-        "python_include/longobject.h",
-        "python_include/structmember.h",
-        "python_include/enumobject.h",
-        "python_include/pymacro.h",
-        "python_include/classobject.h",
-        "python_include/unicodeobject.h",
-        "python_include/sliceobject.h",
-        "python_include/pystrtod.h",
-        "python_include/genobject.h",
-        "python_include/compile.h",
-        "python_include/pyexpat.h",
-        "python_include/asdl.h",
-        "python_include/codecs.h",
-        "python_include/dynamic_annotations.h",
-        "python_include/pyctype.h",
-        "python_include/sysmodule.h",
-        "python_include/methodobject.h",
-        "python_include/graminit.h",
-        "python_include/bltinmodule.h",
-        "python_include/intrcheck.h",
-        "python_include/pyport.h",
-        "python_include/warnings.h",
-        "python_include/osdefs.h",
-        "python_include/pydtrace.h",
-        "python_include/pylifecycle.h",
-        "python_include/fileobject.h",
-        "python_include/pytime.h",
-        "python_include/traceback.h",
-        "python_include/ceval.h",
-        "python_include/bytes_methods.h",
-        "python_include/namespaceobject.h",
-        "python_include/pyconfig.h",
-        "python_include/Python.h",
-        "python_include/moduleobject.h",
-        "python_include/pystate.h",
-        "python_include/descrobject.h",
-        "python_include/odictobject.h",
-        "python_include/ucnhash.h",
-        "python_include/pygetopt.h",
-        "python_include/pymem.h",
-        "python_include/complexobject.h",
-        "python_include/structseq.h",
-        "python_include/datetime.h",
-        "python_include/pythonrun.h",
-        "python_include/pyhash.h",
-        "python_include/pycapsule.h",
-        "python_include/setobject.h",
-        "python_include/listobject.h",
-        "python_include/bytesobject.h",
-        "python_include/pgen.h",
-        "python_include/patchlevel.h",
-        "python_include/opcode.h",
-        "python_include/parsetok.h",
-        "python_include/pystrhex.h",
-        "python_include/marshal.h",
-        "python_include/token.h",
-        "python_include/iterobject.h",
-        "python_include/abstract.h",
-        "python_include/py_curses.h",
-        "python_include/metagrammar.h",
-        "python_include/Python-ast.h",
-    ],
-    cmd = """
-cp "/opt/python3.6/include/python3.6m/code.h" "$(@D)/python_include/code.h" && cp "/opt/python3.6/include/python3.6m/dtoa.h" "$(@D)/python_include/dtoa.h" && cp "/opt/python3.6/include/python3.6m/tupleobject.h" "$(@D)/python_include/tupleobject.h" && cp "/opt/python3.6/include/python3.6m/object.h" "$(@D)/python_include/object.h" && cp "/opt/python3.6/include/python3.6m/ast.h" "$(@D)/python_include/ast.h" && cp "/opt/python3.6/include/python3.6m/pymacconfig.h" "$(@D)/python_include/pymacconfig.h" && cp "/opt/python3.6/include/python3.6m/errcode.h" "$(@D)/python_include/errcode.h" && cp "/opt/python3.6/include/python3.6m/frameobject.h" "$(@D)/python_include/frameobject.h" && cp "/opt/python3.6/include/python3.6m/typeslots.h" "$(@D)/python_include/typeslots.h" && cp "/opt/python3.6/include/python3.6m/pgenheaders.h" "$(@D)/python_include/pgenheaders.h" && cp "/opt/python3.6/include/python3.6m/cellobject.h" "$(@D)/python_include/cellobject.h" && cp "/opt/python3.6/include/python3.6m/pythread.h" "$(@D)/python_include/pythread.h" && cp "/opt/python3.6/include/python3.6m/boolobject.h" "$(@D)/python_include/boolobject.h" && cp "/opt/python3.6/include/python3.6m/accu.h" "$(@D)/python_include/accu.h" && cp "/opt/python3.6/include/python3.6m/modsupport.h" "$(@D)/python_include/modsupport.h" && cp "/opt/python3.6/include/python3.6m/import.h" "$(@D)/python_include/import.h" && cp "/opt/python3.6/include/python3.6m/pymath.h" "$(@D)/python_include/pymath.h" && cp "/opt/python3.6/include/python3.6m/node.h" "$(@D)/python_include/node.h" && cp "/opt/python3.6/include/python3.6m/funcobject.h" "$(@D)/python_include/funcobject.h" && cp "/opt/python3.6/include/python3.6m/eval.h" "$(@D)/python_include/eval.h" && cp "/opt/python3.6/include/python3.6m/pyatomic.h" "$(@D)/python_include/pyatomic.h" && cp "/opt/python3.6/include/python3.6m/longintrepr.h" "$(@D)/python_include/longintrepr.h" && cp "/opt/python3.6/include/python3.6m/floatobject.h" "$(@D)/python_include/floatobject.h" && cp "/opt/python3.6/include/python3.6m/rangeobject.h" "$(@D)/python_include/rangeobject.h" && cp "/opt/python3.6/include/python3.6m/pyfpe.h" "$(@D)/python_include/pyfpe.h" && cp "/opt/python3.6/include/python3.6m/pystrcmp.h" "$(@D)/python_include/pystrcmp.h" && cp "/opt/python3.6/include/python3.6m/fileutils.h" "$(@D)/python_include/fileutils.h" && cp "/opt/python3.6/include/python3.6m/dictobject.h" "$(@D)/python_include/dictobject.h" && cp "/opt/python3.6/include/python3.6m/pyarena.h" "$(@D)/python_include/pyarena.h" && cp "/opt/python3.6/include/python3.6m/osmodule.h" "$(@D)/python_include/osmodule.h" && cp "/opt/python3.6/include/python3.6m/objimpl.h" "$(@D)/python_include/objimpl.h" && cp "/opt/python3.6/include/python3.6m/bitset.h" "$(@D)/python_include/bitset.h" && cp "/opt/python3.6/include/python3.6m/memoryobject.h" "$(@D)/python_include/memoryobject.h" && cp "/opt/python3.6/include/python3.6m/bytearrayobject.h" "$(@D)/python_include/bytearrayobject.h" && cp "/opt/python3.6/include/python3.6m/pydebug.h" "$(@D)/python_include/pydebug.h" && cp "/opt/python3.6/include/python3.6m/pyerrors.h" "$(@D)/python_include/pyerrors.h" && cp "/opt/python3.6/include/python3.6m/weakrefobject.h" "$(@D)/python_include/weakrefobject.h" && cp "/opt/python3.6/include/python3.6m/grammar.h" "$(@D)/python_include/grammar.h" && cp "/opt/python3.6/include/python3.6m/symtable.h" "$(@D)/python_include/symtable.h" && cp "/opt/python3.6/include/python3.6m/longobject.h" "$(@D)/python_include/longobject.h" && cp "/opt/python3.6/include/python3.6m/structmember.h" "$(@D)/python_include/structmember.h" && cp "/opt/python3.6/include/python3.6m/enumobject.h" "$(@D)/python_include/enumobject.h" && cp "/opt/python3.6/include/python3.6m/pymacro.h" "$(@D)/python_include/pymacro.h" && cp "/opt/python3.6/include/python3.6m/classobject.h" "$(@D)/python_include/classobject.h" && cp "/opt/python3.6/include/python3.6m/unicodeobject.h" "$(@D)/python_include/unicodeobject.h" && cp "/opt/python3.6/include/python3.6m/sliceobject.h" "$(@D)/python_include/sliceobject.h" && cp "/opt/python3.6/include/python3.6m/pystrtod.h" "$(@D)/python_include/pystrtod.h" && cp "/opt/python3.6/include/python3.6m/genobject.h" "$(@D)/python_include/genobject.h" && cp "/opt/python3.6/include/python3.6m/compile.h" "$(@D)/python_include/compile.h" && cp "/opt/python3.6/include/python3.6m/pyexpat.h" "$(@D)/python_include/pyexpat.h" && cp "/opt/python3.6/include/python3.6m/asdl.h" "$(@D)/python_include/asdl.h" && cp "/opt/python3.6/include/python3.6m/codecs.h" "$(@D)/python_include/codecs.h" && cp "/opt/python3.6/include/python3.6m/dynamic_annotations.h" "$(@D)/python_include/dynamic_annotations.h" && cp "/opt/python3.6/include/python3.6m/pyctype.h" "$(@D)/python_include/pyctype.h" && cp "/opt/python3.6/include/python3.6m/sysmodule.h" "$(@D)/python_include/sysmodule.h" && cp "/opt/python3.6/include/python3.6m/methodobject.h" "$(@D)/python_include/methodobject.h" && cp "/opt/python3.6/include/python3.6m/graminit.h" "$(@D)/python_include/graminit.h" && cp "/opt/python3.6/include/python3.6m/bltinmodule.h" "$(@D)/python_include/bltinmodule.h" && cp "/opt/python3.6/include/python3.6m/intrcheck.h" "$(@D)/python_include/intrcheck.h" && cp "/opt/python3.6/include/python3.6m/pyport.h" "$(@D)/python_include/pyport.h" && cp "/opt/python3.6/include/python3.6m/warnings.h" "$(@D)/python_include/warnings.h" && cp "/opt/python3.6/include/python3.6m/osdefs.h" "$(@D)/python_include/osdefs.h" && cp "/opt/python3.6/include/python3.6m/pydtrace.h" "$(@D)/python_include/pydtrace.h" && cp "/opt/python3.6/include/python3.6m/pylifecycle.h" "$(@D)/python_include/pylifecycle.h" && cp "/opt/python3.6/include/python3.6m/fileobject.h" "$(@D)/python_include/fileobject.h" && cp "/opt/python3.6/include/python3.6m/pytime.h" "$(@D)/python_include/pytime.h" && cp "/opt/python3.6/include/python3.6m/traceback.h" "$(@D)/python_include/traceback.h" && cp "/opt/python3.6/include/python3.6m/ceval.h" "$(@D)/python_include/ceval.h" && cp "/opt/python3.6/include/python3.6m/bytes_methods.h" "$(@D)/python_include/bytes_methods.h" && cp "/opt/python3.6/include/python3.6m/namespaceobject.h" "$(@D)/python_include/namespaceobject.h" && cp "/opt/python3.6/include/python3.6m/pyconfig.h" "$(@D)/python_include/pyconfig.h" && cp "/opt/python3.6/include/python3.6m/Python.h" "$(@D)/python_include/Python.h" && cp "/opt/python3.6/include/python3.6m/moduleobject.h" "$(@D)/python_include/moduleobject.h" && cp "/opt/python3.6/include/python3.6m/pystate.h" "$(@D)/python_include/pystate.h" && cp "/opt/python3.6/include/python3.6m/descrobject.h" "$(@D)/python_include/descrobject.h" && cp "/opt/python3.6/include/python3.6m/odictobject.h" "$(@D)/python_include/odictobject.h" && cp "/opt/python3.6/include/python3.6m/ucnhash.h" "$(@D)/python_include/ucnhash.h" && cp "/opt/python3.6/include/python3.6m/pygetopt.h" "$(@D)/python_include/pygetopt.h" && cp "/opt/python3.6/include/python3.6m/pymem.h" "$(@D)/python_include/pymem.h" && cp "/opt/python3.6/include/python3.6m/complexobject.h" "$(@D)/python_include/complexobject.h" && cp "/opt/python3.6/include/python3.6m/structseq.h" "$(@D)/python_include/structseq.h" && cp "/opt/python3.6/include/python3.6m/datetime.h" "$(@D)/python_include/datetime.h" && cp "/opt/python3.6/include/python3.6m/pythonrun.h" "$(@D)/python_include/pythonrun.h" && cp "/opt/python3.6/include/python3.6m/pyhash.h" "$(@D)/python_include/pyhash.h" && cp "/opt/python3.6/include/python3.6m/pycapsule.h" "$(@D)/python_include/pycapsule.h" && cp "/opt/python3.6/include/python3.6m/setobject.h" "$(@D)/python_include/setobject.h" && cp "/opt/python3.6/include/python3.6m/listobject.h" "$(@D)/python_include/listobject.h" && cp "/opt/python3.6/include/python3.6m/bytesobject.h" "$(@D)/python_include/bytesobject.h" && cp "/opt/python3.6/include/python3.6m/pgen.h" "$(@D)/python_include/pgen.h" && cp "/opt/python3.6/include/python3.6m/patchlevel.h" "$(@D)/python_include/patchlevel.h" && cp "/opt/python3.6/include/python3.6m/opcode.h" "$(@D)/python_include/opcode.h" && cp "/opt/python3.6/include/python3.6m/parsetok.h" "$(@D)/python_include/parsetok.h" && cp "/opt/python3.6/include/python3.6m/pystrhex.h" "$(@D)/python_include/pystrhex.h" && cp "/opt/python3.6/include/python3.6m/marshal.h" "$(@D)/python_include/marshal.h" && cp "/opt/python3.6/include/python3.6m/token.h" "$(@D)/python_include/token.h" && cp "/opt/python3.6/include/python3.6m/iterobject.h" "$(@D)/python_include/iterobject.h" && cp "/opt/python3.6/include/python3.6m/abstract.h" "$(@D)/python_include/abstract.h" && cp "/opt/python3.6/include/python3.6m/py_curses.h" "$(@D)/python_include/py_curses.h" && cp "/opt/python3.6/include/python3.6m/metagrammar.h" "$(@D)/python_include/metagrammar.h" && cp "/opt/python3.6/include/python3.6m/Python-ast.h" "$(@D)/python_include/Python-ast.h"
-   """,
-)
-
-genrule(
-    name = "numpy_include",
-    outs = [
-        "numpy_include/numpy/oldnumeric.h",
-        "numpy_include/numpy/npy_1_7_deprecated_api.h",
-        "numpy_include/numpy/ufunc_api.txt",
-        "numpy_include/numpy/multiarray_api.txt",
-        "numpy_include/numpy/halffloat.h",
-        "numpy_include/numpy/npy_common.h",
-        "numpy_include/numpy/utils.h",
-        "numpy_include/numpy/npy_interrupt.h",
-        "numpy_include/numpy/npy_endian.h",
-        "numpy_include/numpy/__ufunc_api.h",
-        "numpy_include/numpy/_neighborhood_iterator_imp.h",
-        "numpy_include/numpy/ufuncobject.h",
-        "numpy_include/numpy/ndarraytypes.h",
-        "numpy_include/numpy/npy_math.h",
-        "numpy_include/numpy/noprefix.h",
-        "numpy_include/numpy/npy_3kcompat.h",
-        "numpy_include/numpy/arrayscalars.h",
-        "numpy_include/numpy/npy_os.h",
-        "numpy_include/numpy/ndarrayobject.h",
-        "numpy_include/numpy/npy_no_deprecated_api.h",
-        "numpy_include/numpy/arrayobject.h",
-        "numpy_include/numpy/_numpyconfig.h",
-        "numpy_include/numpy/__multiarray_api.h",
-        "numpy_include/numpy/npy_cpu.h",
-        "numpy_include/numpy/old_defines.h",
-        "numpy_include/numpy/numpyconfig.h",
-    ],
-    cmd = """
-cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/oldnumeric.h" "$(@D)/numpy_include/numpy/oldnumeric.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h" "$(@D)/numpy_include/numpy/npy_1_7_deprecated_api.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/ufunc_api.txt" "$(@D)/numpy_include/numpy/ufunc_api.txt" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/multiarray_api.txt" "$(@D)/numpy_include/numpy/multiarray_api.txt" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/halffloat.h" "$(@D)/numpy_include/numpy/halffloat.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/npy_common.h" "$(@D)/numpy_include/numpy/npy_common.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/utils.h" "$(@D)/numpy_include/numpy/utils.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/npy_interrupt.h" "$(@D)/numpy_include/numpy/npy_interrupt.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/npy_endian.h" "$(@D)/numpy_include/numpy/npy_endian.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/__ufunc_api.h" "$(@D)/numpy_include/numpy/__ufunc_api.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/_neighborhood_iterator_imp.h" "$(@D)/numpy_include/numpy/_neighborhood_iterator_imp.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/ufuncobject.h" "$(@D)/numpy_include/numpy/ufuncobject.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h" "$(@D)/numpy_include/numpy/ndarraytypes.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/npy_math.h" "$(@D)/numpy_include/numpy/npy_math.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/noprefix.h" "$(@D)/numpy_include/numpy/noprefix.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/npy_3kcompat.h" "$(@D)/numpy_include/numpy/npy_3kcompat.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/arrayscalars.h" "$(@D)/numpy_include/numpy/arrayscalars.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/npy_os.h" "$(@D)/numpy_include/numpy/npy_os.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h" "$(@D)/numpy_include/numpy/ndarrayobject.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/npy_no_deprecated_api.h" "$(@D)/numpy_include/numpy/npy_no_deprecated_api.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h" "$(@D)/numpy_include/numpy/arrayobject.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/_numpyconfig.h" "$(@D)/numpy_include/numpy/_numpyconfig.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/__multiarray_api.h" "$(@D)/numpy_include/numpy/__multiarray_api.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/npy_cpu.h" "$(@D)/numpy_include/numpy/npy_cpu.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/old_defines.h" "$(@D)/numpy_include/numpy/old_defines.h" && cp "/opt/python3.6/lib/python3.6/site-packages/numpy/core/include/numpy/numpyconfig.h" "$(@D)/numpy_include/numpy/numpyconfig.h"
-   """,
-)
diff --git a/third_party/toolchains/gpus/crosstool/BUILD b/third_party/toolchains/gpus/crosstool/BUILD
deleted file mode 100644
index 1f90650..0000000
--- a/third_party/toolchains/gpus/crosstool/BUILD
+++ /dev/null
@@ -1,57 +0,0 @@
-# A build file to configure cc toolchain for GPU build used with Bazel remote
-# execution service
-# DO NOT EDIT: automatically generated BUILD file
-
-licenses(["restricted"])
-
-package(default_visibility = ["//visibility:public"])
-
-cc_toolchain_suite(
-    name = "toolchain",
-    toolchains = {
-        "local|compiler": ":cc-compiler-local",
-        "darwin|compiler": ":cc-compiler-darwin",
-    },
-)
-
-cc_toolchain(
-    name = "cc-compiler-local",
-    all_files = ":empty",
-    compiler_files = ":empty",
-    cpu = "local",
-    dwp_files = ":empty",
-    dynamic_runtime_libs = [":empty"],
-    linker_files = ":empty",
-    objcopy_files = ":empty",
-    static_runtime_libs = [":empty"],
-    strip_files = ":empty",
-    # To support linker flags that need to go to the start of command line
-    # we need the toolchain to support parameter files. Parameter files are
-    # last on the command line and contain all shared libraries to link, so all
-    # regular options will be left of them.
-    supports_param_files = 1,
-)
-
-cc_toolchain(
-    name = "cc-compiler-darwin",
-    all_files = ":empty",
-    compiler_files = ":empty",
-    cpu = "darwin",
-    dwp_files = ":empty",
-    dynamic_runtime_libs = [":empty"],
-    linker_files = ":empty",
-    objcopy_files = ":empty",
-    static_runtime_libs = [":empty"],
-    strip_files = ":empty",
-    supports_param_files = 0,
-)
-
-filegroup(
-    name = "empty",
-    srcs = [],
-)
-
-filegroup(
-    name = "crosstool_wrapper_driver_is_not_gcc",
-    srcs = ["clang/bin/crosstool_wrapper_driver_is_not_gcc"],
-)
diff --git a/third_party/toolchains/gpus/crosstool/CROSSTOOL b/third_party/toolchains/gpus/crosstool/CROSSTOOL
deleted file mode 100644
index d6ee7e3..0000000
--- a/third_party/toolchains/gpus/crosstool/CROSSTOOL
+++ /dev/null
@@ -1,309 +0,0 @@
-# A crosstool configuration for GPU build used with Bazel remote
-# execution service
-# DO NOT EDIT: automatically generated file
-
-major_version: "local"
-minor_version: ""
-default_target_cpu: "same_as_host"
-
-default_toolchain {
-  cpu: "k8"
-  toolchain_identifier: "local_linux"
-}
-default_toolchain {
-  cpu: "piii"
-  toolchain_identifier: "local_linux"
-}
-default_toolchain {
-  cpu: "arm"
-  toolchain_identifier: "local_linux"
-}
-default_toolchain {
-  cpu: "darwin"
-  toolchain_identifier: "local_darwin"
-}
-default_toolchain {
-  cpu: "ppc"
-  toolchain_identifier: "local_linux"
-}
-
-toolchain {
-  abi_version: "local"
-  abi_libc_version: "local"
-  compiler: "compiler"
-  host_system_name: "local"
-  needsPic: true
-  target_libc: "local"
-  target_cpu: "local"
-  target_system_name: "local"
-  toolchain_identifier: "local_linux"
-
-  feature {
-    name: "c++11"
-    flag_set {
-      action: "c++-compile"
-      flag_group {
-        flag: "-std=c++11"
-      }
-    }
-  }
-
-  feature {
-    name: "stdlib"
-    flag_set {
-      action: "c++-link-executable"
-      action: "c++-link-dynamic-library"
-      action: "c++-link-nodeps-dynamic-library"
-      flag_group {
-        flag: "-lstdc++"
-      }
-    }
-  }
-
-  feature {
-    name: "determinism"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        # Make C++ compilation deterministic. Use linkstamping instead of these
-        # compiler symbols.
-        flag: "-Wno-builtin-macro-redefined"
-        flag: "-D__DATE__=\"redacted\""
-        flag: "-D__TIMESTAMP__=\"redacted\""
-        flag: "-D__TIME__=\"redacted\""
-      }
-    }
-  }
-
-  feature {
-    name: "alwayslink"
-    flag_set {
-      action: "c++-link-dynamic-library"
-      action: "c++-link-nodeps-dynamic-library"
-      action: "c++-link-executable"
-      flag_group {
-        flag: "-Wl,-no-as-needed"
-      }
-    }
-  }
-
-  # This feature will be enabled for builds that support pic by bazel.
-  feature {
-    name: "pic"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        expand_if_all_available: "pic"
-        flag: "-fPIC"
-      }
-      flag_group {
-        expand_if_none_available: "pic"
-        flag: "-fPIE"
-      }
-    }
-  }
-
-  # Security hardening on by default.
-  feature {
-    name: "hardening"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
-        # We need to undef it before redefining it as some distributions now
-        # have it enabled by default.
-        flag: "-U_FORTIFY_SOURCE"
-        flag: "-D_FORTIFY_SOURCE=1"
-        flag: "-fstack-protector"
-      }
-    }
-    flag_set {
-      action: "c++-link-dynamic-library"
-      action: "c++-link-nodeps-dynamic-library"
-      flag_group {
-        flag: "-Wl,-z,relro,-z,now"
-      }
-    }
-    flag_set {
-      action: "c++-link-executable"
-      flag_group {
-        flag: "-pie"
-        flag: "-Wl,-z,relro,-z,now"
-      }
-    }
-  }
-
-  feature {
-    name: "warnings"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        # All warnings are enabled. Maybe enable -Werror as well?
-        flag: "-Wall"
-        # Some parts of the codebase set -Werror and hit this warning, so
-        # switch it off for now.
-        flag: "-Wno-invalid-partial-specialization"
-      }
-    }
-  }
-
-  # Keep stack frames for debugging, even in opt mode.
-  feature {
-    name: "frame-pointer"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        flag: "-fno-omit-frame-pointer"
-      }
-    }
-  }
-
-  feature {
-    name: "build-id"
-    flag_set {
-      action: "c++-link-executable"
-      action: "c++-link-dynamic-library"
-      action: "c++-link-nodeps-dynamic-library"
-      flag_group {
-        # Stamp the binary with a unique identifier.
-        flag: "-Wl,--build-id=md5"
-        flag: "-Wl,--hash-style=gnu"
-      }
-    }
-  }
-
-  feature {
-    name: "no-canonical-prefixes"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      action: "c++-link-executable"
-      action: "c++-link-dynamic-library"
-      action: "c++-link-nodeps-dynamic-library"
-      flag_group {
-        flag:"-no-canonical-prefixes"
-      }
-    }
-  }
-
-  feature {
-    name: "disable-assertions"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        flag: "-DNDEBUG"
-      }
-    }
-  }
-
-  feature {
-    name: "linker-bin-path"
-
-    flag_set {
-      action: "c++-link-executable"
-      action: "c++-link-dynamic-library"
-      action: "c++-link-nodeps-dynamic-library"
-      flag_group {
-        flag: "-B/usr/bin/"
-      }
-    }
-  }
-
-  feature {
-    name: "common"
-    implies: "stdlib"
-    implies: "c++11"
-    implies: "determinism"
-    implies: "alwayslink"
-    implies: "hardening"
-    implies: "warnings"
-    implies: "frame-pointer"
-    implies: "build-id"
-    implies: "no-canonical-prefixes"
-    implies: "linker-bin-path"
-  }
-
-  feature {
-    name: "opt"
-    implies: "common"
-    implies: "disable-assertions"
-
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        # No debug symbols.
-        # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt
-        # or even generally? However, that can't happen here, as it requires
-        # special handling in Bazel.
-        flag: "-g0"
-
-        # Conservative choice for -O
-        # -O3 can increase binary size and even slow down the resulting binaries.
-        # Profile first and / or use FDO if you need better performance than this.
-        flag: "-O2"
-
-        # Removal of unused code and data at link time (can this increase binary size in some cases?).
-        flag: "-ffunction-sections"
-        flag: "-fdata-sections"
-      }
-    }
-    flag_set {
-      action: "c++-link-dynamic-library"
-      action: "c++-link-nodeps-dynamic-library"
-      action: "c++-link-executable"
-      flag_group {
-        flag: "-Wl,--gc-sections"
-      }
-    }
-  }
-
-  feature {
-    name: "fastbuild"
-    implies: "common"
-  }
-
-  feature {
-    name: "dbg"
-    implies: "common"
-    flag_set {
-      action: "c-compile"
-      action: "c++-compile"
-      flag_group {
-        flag: "-g"
-      }
-    }
-  }
-
-  # Set clang as a C/C++ compiler.
-  tool_path { name: "gcc" path: "/usr/local/bin/clang" }
-
-  # Use the default system toolchain for everything else.
-  tool_path { name: "ar" path: "/usr/bin/ar" }
-  tool_path { name: "compat-ld" path: "/usr/bin/ld" }
-  tool_path { name: "cpp" path: "/usr/bin/cpp" }
-  tool_path { name: "dwp" path: "/usr/bin/dwp" }
-  tool_path { name: "gcov" path: "/usr/bin/gcov" }
-  tool_path { name: "ld" path: "/usr/bin/ld" }
-  tool_path { name: "nm" path: "/usr/bin/nm" }
-  tool_path { name: "objcopy" path: "/usr/bin/objcopy" }
-  tool_path { name: "objdump" path: "/usr/bin/objdump" }
-  tool_path { name: "strip" path: "/usr/bin/strip" }
-
-  # Enabled dynamic linking.
-  linking_mode_flags { mode: DYNAMIC }
-
-  cxx_builtin_include_directory: "/usr/include/c++/5.4.0"
-  cxx_builtin_include_directory: "/usr/include/x86_64-linux-gnu/c++/5.4.0"
-  cxx_builtin_include_directory: "/usr/include/c++/5.4.0/backward"
-  cxx_builtin_include_directory: "/usr/local/include"
-  cxx_builtin_include_directory: "/usr/local/lib/clang/7.0.0/include"
-  cxx_builtin_include_directory: "/usr/include/x86_64-linux-gnu"
-  cxx_builtin_include_directory: "/usr/include"
-}
diff --git a/third_party/toolchains/gpus/cuda/BUILD b/third_party/toolchains/gpus/cuda/BUILD
deleted file mode 100644
index 4cb8380..0000000
--- a/third_party/toolchains/gpus/cuda/BUILD
+++ /dev/null
@@ -1,1282 +0,0 @@
-# A build file to configure cuda remote repository used with Bazel remote
-# execution service
-# DO NOT EDIT: automatically generated BUILD file
-
-licenses(["restricted"])  # MPL2, portions GPL v3, LGPL v3, BSD-like
-
-package(default_visibility = ["//visibility:public"])
-
-config_setting(
-    name = "using_nvcc",
-    values = {
-        "define": "using_cuda_nvcc=true",
-    },
-)
-
-config_setting(
-    name = "using_clang",
-    values = {
-        "define": "using_cuda_clang=true",
-    },
-)
-
-# Equivalent to using_clang && -c opt.
-config_setting(
-    name = "using_clang_opt",
-    values = {
-        "define": "using_cuda_clang=true",
-        "compilation_mode": "opt",
-    },
-)
-
-config_setting(
-    name = "darwin",
-    values = {"cpu": "darwin"},
-    visibility = ["//visibility:public"],
-)
-
-config_setting(
-    name = "freebsd",
-    values = {"cpu": "freebsd"},
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cuda_headers",
-    hdrs = [
-        "cuda/cuda_config.h",
-        ":cuda-include",
-        ":cudnn-include",
-    ],
-    includes = [
-        ".",
-        "cuda/include",
-        "cuda/include/crt",
-    ],
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cudart_static",
-    srcs = ["cuda/lib/libcudart_static.a"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    linkopts = select({
-        ":freebsd": [],
-        "//conditions:default": ["-ldl"],
-    }) + [
-        "-lpthread",
-        "-lrt",
-    ],
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cuda_driver",
-    srcs = ["cuda/lib/libcuda.so"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cudart",
-    srcs = ["cuda/lib/libcudart.so.9.0"],
-    data = ["cuda/lib/libcudart.so.9.0"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    linkstatic = 1,
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cublas",
-    srcs = ["cuda/lib/libcublas.so.9.0"],
-    data = ["cuda/lib/libcublas.so.9.0"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    linkstatic = 1,
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cusolver",
-    srcs = ["cuda/lib/libcusolver.so.9.0"],
-    data = ["cuda/lib/libcusolver.so.9.0"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    linkopts = ["-lgomp"],
-    linkstatic = 1,
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cudnn",
-    srcs = ["cuda/lib/libcudnn.so.7"],
-    data = ["cuda/lib/libcudnn.so.7"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    linkstatic = 1,
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cufft",
-    srcs = ["cuda/lib/libcufft.so.9.0"],
-    data = ["cuda/lib/libcufft.so.9.0"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    linkstatic = 1,
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "curand",
-    srcs = ["cuda/lib/libcurand.so.9.0"],
-    data = ["cuda/lib/libcurand.so.9.0"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    linkstatic = 1,
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cuda",
-    visibility = ["//visibility:public"],
-    deps = [
-        ":cublas",
-        ":cuda_headers",
-        ":cudart",
-        ":cudnn",
-        ":cufft",
-        ":curand",
-    ],
-)
-
-cc_library(
-    name = "cupti_headers",
-    hdrs = [
-        "cuda/cuda_config.h",
-        ":cuda-extras",
-    ],
-    includes = [
-        ".",
-        "cuda/extras/CUPTI/include/",
-    ],
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "cupti_dsos",
-    data = ["cuda/lib/libcupti.so.9.0"],
-    includes = [
-        ".",
-        "cuda/include",
-    ],
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "libdevice_root",
-    data = [":cuda-nvvm"],
-    visibility = ["//visibility:public"],
-)
-
-genrule(
-    name = "cuda-include",
-    outs = [
-        "cuda/include/CL/cl.h",
-        "cuda/include/CL/cl.hpp",
-        "cuda/include/CL/cl_egl.h",
-        "cuda/include/CL/cl_ext.h",
-        "cuda/include/CL/cl_gl.h",
-        "cuda/include/CL/cl_gl_ext.h",
-        "cuda/include/CL/cl_platform.h",
-        "cuda/include/CL/opencl.h",
-        "cuda/include/builtin_types.h",
-        "cuda/include/channel_descriptor.h",
-        "cuda/include/common_functions.h",
-        "cuda/include/cooperative_groups.h",
-        "cuda/include/cooperative_groups_helpers.h",
-        "cuda/include/crt/common_functions.h",
-        "cuda/include/crt/device_double_functions.h",
-        "cuda/include/crt/device_double_functions.hpp",
-        "cuda/include/crt/device_functions.h",
-        "cuda/include/crt/device_functions.hpp",
-        "cuda/include/crt/func_macro.h",
-        "cuda/include/crt/host_config.h",
-        "cuda/include/crt/host_defines.h",
-        "cuda/include/crt/host_runtime.h",
-        "cuda/include/crt/math_functions.h",
-        "cuda/include/crt/math_functions.hpp",
-        "cuda/include/crt/mma.h",
-        "cuda/include/crt/mma.hpp",
-        "cuda/include/crt/nvfunctional",
-        "cuda/include/crt/sm_70_rt.h",
-        "cuda/include/crt/sm_70_rt.hpp",
-        "cuda/include/crt/storage_class.h",
-        "cuda/include/cuComplex.h",
-        "cuda/include/cublas.h",
-        "cuda/include/cublasXt.h",
-        "cuda/include/cublas_api.h",
-        "cuda/include/cublas_v2.h",
-        "cuda/include/cuda.h",
-        "cuda/include/cudaEGL.h",
-        "cuda/include/cudaGL.h",
-        "cuda/include/cudaProfiler.h",
-        "cuda/include/cudaVDPAU.h",
-        "cuda/include/cuda_device_runtime_api.h",
-        "cuda/include/cuda_fp16.h",
-        "cuda/include/cuda_fp16.hpp",
-        "cuda/include/cuda_gl_interop.h",
-        "cuda/include/cuda_occupancy.h",
-        "cuda/include/cuda_profiler_api.h",
-        "cuda/include/cuda_runtime.h",
-        "cuda/include/cuda_runtime_api.h",
-        "cuda/include/cuda_surface_types.h",
-        "cuda/include/cuda_texture_types.h",
-        "cuda/include/cuda_vdpau_interop.h",
-        "cuda/include/cudalibxt.h",
-        "cuda/include/cudnn.h",
-        "cuda/include/cufft.h",
-        "cuda/include/cufftXt.h",
-        "cuda/include/cufftw.h",
-        "cuda/include/curand.h",
-        "cuda/include/curand_discrete.h",
-        "cuda/include/curand_discrete2.h",
-        "cuda/include/curand_globals.h",
-        "cuda/include/curand_kernel.h",
-        "cuda/include/curand_lognormal.h",
-        "cuda/include/curand_mrg32k3a.h",
-        "cuda/include/curand_mtgp32.h",
-        "cuda/include/curand_mtgp32_host.h",
-        "cuda/include/curand_mtgp32_kernel.h",
-        "cuda/include/curand_mtgp32dc_p_11213.h",
-        "cuda/include/curand_normal.h",
-        "cuda/include/curand_normal_static.h",
-        "cuda/include/curand_philox4x32_x.h",
-        "cuda/include/curand_poisson.h",
-        "cuda/include/curand_precalc.h",
-        "cuda/include/curand_uniform.h",
-        "cuda/include/cusolverDn.h",
-        "cuda/include/cusolverRf.h",
-        "cuda/include/cusolverSp.h",
-        "cuda/include/cusolverSp_LOWLEVEL_PREVIEW.h",
-        "cuda/include/cusolver_common.h",
-        "cuda/include/cusparse.h",
-        "cuda/include/cusparse_v2.h",
-        "cuda/include/device_atomic_functions.h",
-        "cuda/include/device_atomic_functions.hpp",
-        "cuda/include/device_double_functions.h",
-        "cuda/include/device_double_functions.hpp",
-        "cuda/include/device_functions.h",
-        "cuda/include/device_functions.hpp",
-        "cuda/include/device_functions_decls.h",
-        "cuda/include/device_launch_parameters.h",
-        "cuda/include/device_types.h",
-        "cuda/include/driver_functions.h",
-        "cuda/include/driver_types.h",
-        "cuda/include/dynlink_cuda.h",
-        "cuda/include/dynlink_cuda_cuda.h",
-        "cuda/include/dynlink_cuviddec.h",
-        "cuda/include/dynlink_nvcuvid.h",
-        "cuda/include/fatBinaryCtl.h",
-        "cuda/include/fatbinary.h",
-        "cuda/include/host_config.h",
-        "cuda/include/host_defines.h",
-        "cuda/include/library_types.h",
-        "cuda/include/math_constants.h",
-        "cuda/include/math_functions.h",
-        "cuda/include/math_functions.hpp",
-        "cuda/include/math_functions_dbl_ptx3.h",
-        "cuda/include/math_functions_dbl_ptx3.hpp",
-        "cuda/include/mma.h",
-        "cuda/include/npp.h",
-        "cuda/include/nppcore.h",
-        "cuda/include/nppdefs.h",
-        "cuda/include/nppi.h",
-        "cuda/include/nppi_arithmetic_and_logical_operations.h",
-        "cuda/include/nppi_color_conversion.h",
-        "cuda/include/nppi_compression_functions.h",
-        "cuda/include/nppi_computer_vision.h",
-        "cuda/include/nppi_data_exchange_and_initialization.h",
-        "cuda/include/nppi_filtering_functions.h",
-        "cuda/include/nppi_geometry_transforms.h",
-        "cuda/include/nppi_linear_transforms.h",
-        "cuda/include/nppi_morphological_operations.h",
-        "cuda/include/nppi_statistics_functions.h",
-        "cuda/include/nppi_support_functions.h",
-        "cuda/include/nppi_threshold_and_compare_operations.h",
-        "cuda/include/npps.h",
-        "cuda/include/npps_arithmetic_and_logical_operations.h",
-        "cuda/include/npps_conversion_functions.h",
-        "cuda/include/npps_filtering_functions.h",
-        "cuda/include/npps_initialization.h",
-        "cuda/include/npps_statistics_functions.h",
-        "cuda/include/npps_support_functions.h",
-        "cuda/include/nppversion.h",
-        "cuda/include/nvToolsExt.h",
-        "cuda/include/nvToolsExtCuda.h",
-        "cuda/include/nvToolsExtCudaRt.h",
-        "cuda/include/nvToolsExtMeta.h",
-        "cuda/include/nvToolsExtSync.h",
-        "cuda/include/nvblas.h",
-        "cuda/include/nvfunctional",
-        "cuda/include/nvgraph.h",
-        "cuda/include/nvml.h",
-        "cuda/include/nvrtc.h",
-        "cuda/include/sm_20_atomic_functions.h",
-        "cuda/include/sm_20_atomic_functions.hpp",
-        "cuda/include/sm_20_intrinsics.h",
-        "cuda/include/sm_20_intrinsics.hpp",
-        "cuda/include/sm_30_intrinsics.h",
-        "cuda/include/sm_30_intrinsics.hpp",
-        "cuda/include/sm_32_atomic_functions.h",
-        "cuda/include/sm_32_atomic_functions.hpp",
-        "cuda/include/sm_32_intrinsics.h",
-        "cuda/include/sm_32_intrinsics.hpp",
-        "cuda/include/sm_35_atomic_functions.h",
-        "cuda/include/sm_35_intrinsics.h",
-        "cuda/include/sm_60_atomic_functions.h",
-        "cuda/include/sm_60_atomic_functions.hpp",
-        "cuda/include/sm_61_intrinsics.h",
-        "cuda/include/sm_61_intrinsics.hpp",
-        "cuda/include/sobol_direction_vectors.h",
-        "cuda/include/surface_functions.h",
-        "cuda/include/surface_functions.hpp",
-        "cuda/include/surface_indirect_functions.h",
-        "cuda/include/surface_indirect_functions.hpp",
-        "cuda/include/surface_types.h",
-        "cuda/include/texture_fetch_functions.h",
-        "cuda/include/texture_fetch_functions.hpp",
-        "cuda/include/texture_indirect_functions.h",
-        "cuda/include/texture_indirect_functions.hpp",
-        "cuda/include/texture_types.h",
-        "cuda/include/thrust/adjacent_difference.h",
-        "cuda/include/thrust/advance.h",
-        "cuda/include/thrust/binary_search.h",
-        "cuda/include/thrust/complex.h",
-        "cuda/include/thrust/copy.h",
-        "cuda/include/thrust/count.h",
-        "cuda/include/thrust/detail/adjacent_difference.inl",
-        "cuda/include/thrust/detail/advance.inl",
-        "cuda/include/thrust/detail/allocator/allocator_traits.h",
-        "cuda/include/thrust/detail/allocator/allocator_traits.inl",
-        "cuda/include/thrust/detail/allocator/copy_construct_range.h",
-        "cuda/include/thrust/detail/allocator/copy_construct_range.inl",
-        "cuda/include/thrust/detail/allocator/default_construct_range.h",
-        "cuda/include/thrust/detail/allocator/default_construct_range.inl",
-        "cuda/include/thrust/detail/allocator/destroy_range.h",
-        "cuda/include/thrust/detail/allocator/destroy_range.inl",
-        "cuda/include/thrust/detail/allocator/fill_construct_range.h",
-        "cuda/include/thrust/detail/allocator/fill_construct_range.inl",
-        "cuda/include/thrust/detail/allocator/malloc_allocator.h",
-        "cuda/include/thrust/detail/allocator/malloc_allocator.inl",
-        "cuda/include/thrust/detail/allocator/no_throw_allocator.h",
-        "cuda/include/thrust/detail/allocator/tagged_allocator.h",
-        "cuda/include/thrust/detail/allocator/tagged_allocator.inl",
-        "cuda/include/thrust/detail/allocator/temporary_allocator.h",
-        "cuda/include/thrust/detail/allocator/temporary_allocator.inl",
-        "cuda/include/thrust/detail/binary_search.inl",
-        "cuda/include/thrust/detail/complex/arithmetic.h",
-        "cuda/include/thrust/detail/complex/c99math.h",
-        "cuda/include/thrust/detail/complex/catrig.h",
-        "cuda/include/thrust/detail/complex/catrigf.h",
-        "cuda/include/thrust/detail/complex/ccosh.h",
-        "cuda/include/thrust/detail/complex/ccoshf.h",
-        "cuda/include/thrust/detail/complex/cexp.h",
-        "cuda/include/thrust/detail/complex/cexpf.h",
-        "cuda/include/thrust/detail/complex/clog.h",
-        "cuda/include/thrust/detail/complex/clogf.h",
-        "cuda/include/thrust/detail/complex/complex.inl",
-        "cuda/include/thrust/detail/complex/cpow.h",
-        "cuda/include/thrust/detail/complex/cpowf.h",
-        "cuda/include/thrust/detail/complex/cproj.h",
-        "cuda/include/thrust/detail/complex/csinh.h",
-        "cuda/include/thrust/detail/complex/csinhf.h",
-        "cuda/include/thrust/detail/complex/csqrt.h",
-        "cuda/include/thrust/detail/complex/csqrtf.h",
-        "cuda/include/thrust/detail/complex/ctanh.h",
-        "cuda/include/thrust/detail/complex/ctanhf.h",
-        "cuda/include/thrust/detail/complex/math_private.h",
-        "cuda/include/thrust/detail/complex/stream.h",
-        "cuda/include/thrust/detail/config.h",
-        "cuda/include/thrust/detail/config/compiler.h",
-        "cuda/include/thrust/detail/config/compiler_fence.h",
-        "cuda/include/thrust/detail/config/config.h",
-        "cuda/include/thrust/detail/config/debug.h",
-        "cuda/include/thrust/detail/config/device_system.h",
-        "cuda/include/thrust/detail/config/exec_check_disable.h",
-        "cuda/include/thrust/detail/config/forceinline.h",
-        "cuda/include/thrust/detail/config/global_workarounds.h",
-        "cuda/include/thrust/detail/config/host_device.h",
-        "cuda/include/thrust/detail/config/host_system.h",
-        "cuda/include/thrust/detail/config/simple_defines.h",
-        "cuda/include/thrust/detail/contiguous_storage.h",
-        "cuda/include/thrust/detail/contiguous_storage.inl",
-        "cuda/include/thrust/detail/copy.h",
-        "cuda/include/thrust/detail/copy.inl",
-        "cuda/include/thrust/detail/copy_if.h",
-        "cuda/include/thrust/detail/copy_if.inl",
-        "cuda/include/thrust/detail/count.inl",
-        "cuda/include/thrust/detail/cstdint.h",
-        "cuda/include/thrust/detail/device_delete.inl",
-        "cuda/include/thrust/detail/device_free.inl",
-        "cuda/include/thrust/detail/device_malloc.inl",
-        "cuda/include/thrust/detail/device_new.inl",
-        "cuda/include/thrust/detail/device_ptr.inl",
-        "cuda/include/thrust/detail/device_reference.inl",
-        "cuda/include/thrust/detail/device_vector.inl",
-        "cuda/include/thrust/detail/dispatch/is_trivial_copy.h",
-        "cuda/include/thrust/detail/distance.inl",
-        "cuda/include/thrust/detail/equal.inl",
-        "cuda/include/thrust/detail/execute_with_allocator.h",
-        "cuda/include/thrust/detail/execution_policy.h",
-        "cuda/include/thrust/detail/extrema.inl",
-        "cuda/include/thrust/detail/fill.inl",
-        "cuda/include/thrust/detail/find.inl",
-        "cuda/include/thrust/detail/for_each.inl",
-        "cuda/include/thrust/detail/function.h",
-        "cuda/include/thrust/detail/functional.inl",
-        "cuda/include/thrust/detail/functional/actor.h",
-        "cuda/include/thrust/detail/functional/actor.inl",
-        "cuda/include/thrust/detail/functional/argument.h",
-        "cuda/include/thrust/detail/functional/composite.h",
-        "cuda/include/thrust/detail/functional/operators.h",
-        "cuda/include/thrust/detail/functional/operators/arithmetic_operators.h",
-        "cuda/include/thrust/detail/functional/operators/assignment_operator.h",
-        "cuda/include/thrust/detail/functional/operators/bitwise_operators.h",
-        "cuda/include/thrust/detail/functional/operators/compound_assignment_operators.h",
-        "cuda/include/thrust/detail/functional/operators/logical_operators.h",
-        "cuda/include/thrust/detail/functional/operators/operator_adaptors.h",
-        "cuda/include/thrust/detail/functional/operators/relational_operators.h",
-        "cuda/include/thrust/detail/functional/placeholder.h",
-        "cuda/include/thrust/detail/functional/value.h",
-        "cuda/include/thrust/detail/gather.inl",
-        "cuda/include/thrust/detail/generate.inl",
-        "cuda/include/thrust/detail/get_iterator_value.h",
-        "cuda/include/thrust/detail/host_vector.inl",
-        "cuda/include/thrust/detail/inner_product.inl",
-        "cuda/include/thrust/detail/integer_math.h",
-        "cuda/include/thrust/detail/integer_traits.h",
-        "cuda/include/thrust/detail/internal_functional.h",
-        "cuda/include/thrust/detail/logical.inl",
-        "cuda/include/thrust/detail/malloc_and_free.h",
-        "cuda/include/thrust/detail/merge.inl",
-        "cuda/include/thrust/detail/minmax.h",
-        "cuda/include/thrust/detail/mismatch.inl",
-        "cuda/include/thrust/detail/mpl/math.h",
-        "cuda/include/thrust/detail/numeric_traits.h",
-        "cuda/include/thrust/detail/overlapped_copy.h",
-        "cuda/include/thrust/detail/pair.inl",
-        "cuda/include/thrust/detail/partition.inl",
-        "cuda/include/thrust/detail/pointer.h",
-        "cuda/include/thrust/detail/pointer.inl",
-        "cuda/include/thrust/detail/range/head_flags.h",
-        "cuda/include/thrust/detail/range/tail_flags.h",
-        "cuda/include/thrust/detail/raw_pointer_cast.h",
-        "cuda/include/thrust/detail/raw_reference_cast.h",
-        "cuda/include/thrust/detail/reduce.inl",
-        "cuda/include/thrust/detail/reference.h",
-        "cuda/include/thrust/detail/reference.inl",
-        "cuda/include/thrust/detail/reference_forward_declaration.h",
-        "cuda/include/thrust/detail/remove.inl",
-        "cuda/include/thrust/detail/replace.inl",
-        "cuda/include/thrust/detail/reverse.inl",
-        "cuda/include/thrust/detail/scan.inl",
-        "cuda/include/thrust/detail/scatter.inl",
-        "cuda/include/thrust/detail/seq.h",
-        "cuda/include/thrust/detail/sequence.inl",
-        "cuda/include/thrust/detail/set_operations.inl",
-        "cuda/include/thrust/detail/sort.inl",
-        "cuda/include/thrust/detail/static_assert.h",
-        "cuda/include/thrust/detail/static_map.h",
-        "cuda/include/thrust/detail/swap.h",
-        "cuda/include/thrust/detail/swap.inl",
-        "cuda/include/thrust/detail/swap_ranges.inl",
-        "cuda/include/thrust/detail/tabulate.inl",
-        "cuda/include/thrust/detail/temporary_array.h",
-        "cuda/include/thrust/detail/temporary_array.inl",
-        "cuda/include/thrust/detail/temporary_buffer.h",
-        "cuda/include/thrust/detail/transform.inl",
-        "cuda/include/thrust/detail/transform_reduce.inl",
-        "cuda/include/thrust/detail/transform_scan.inl",
-        "cuda/include/thrust/detail/trivial_sequence.h",
-        "cuda/include/thrust/detail/tuple.inl",
-        "cuda/include/thrust/detail/tuple_meta_transform.h",
-        "cuda/include/thrust/detail/tuple_transform.h",
-        "cuda/include/thrust/detail/type_traits.h",
-        "cuda/include/thrust/detail/type_traits/algorithm/intermediate_type_from_function_and_iterators.h",
-        "cuda/include/thrust/detail/type_traits/function_traits.h",
-        "cuda/include/thrust/detail/type_traits/has_member_function.h",
-        "cuda/include/thrust/detail/type_traits/has_nested_type.h",
-        "cuda/include/thrust/detail/type_traits/has_trivial_assign.h",
-        "cuda/include/thrust/detail/type_traits/is_call_possible.h",
-        "cuda/include/thrust/detail/type_traits/is_metafunction_defined.h",
-        "cuda/include/thrust/detail/type_traits/iterator/is_discard_iterator.h",
-        "cuda/include/thrust/detail/type_traits/iterator/is_output_iterator.h",
-        "cuda/include/thrust/detail/type_traits/minimum_type.h",
-        "cuda/include/thrust/detail/type_traits/pointer_traits.h",
-        "cuda/include/thrust/detail/type_traits/result_of_adaptable_function.h",
-        "cuda/include/thrust/detail/uninitialized_copy.inl",
-        "cuda/include/thrust/detail/uninitialized_fill.inl",
-        "cuda/include/thrust/detail/unique.inl",
-        "cuda/include/thrust/detail/use_default.h",
-        "cuda/include/thrust/detail/util/align.h",
-        "cuda/include/thrust/detail/util/blocking.h",
-        "cuda/include/thrust/detail/vector_base.h",
-        "cuda/include/thrust/detail/vector_base.inl",
-        "cuda/include/thrust/device_allocator.h",
-        "cuda/include/thrust/device_delete.h",
-        "cuda/include/thrust/device_free.h",
-        "cuda/include/thrust/device_malloc.h",
-        "cuda/include/thrust/device_malloc_allocator.h",
-        "cuda/include/thrust/device_new.h",
-        "cuda/include/thrust/device_new_allocator.h",
-        "cuda/include/thrust/device_ptr.h",
-        "cuda/include/thrust/device_reference.h",
-        "cuda/include/thrust/device_vector.h",
-        "cuda/include/thrust/distance.h",
-        "cuda/include/thrust/equal.h",
-        "cuda/include/thrust/execution_policy.h",
-        "cuda/include/thrust/extrema.h",
-        "cuda/include/thrust/fill.h",
-        "cuda/include/thrust/find.h",
-        "cuda/include/thrust/for_each.h",
-        "cuda/include/thrust/functional.h",
-        "cuda/include/thrust/gather.h",
-        "cuda/include/thrust/generate.h",
-        "cuda/include/thrust/host_vector.h",
-        "cuda/include/thrust/inner_product.h",
-        "cuda/include/thrust/iterator/constant_iterator.h",
-        "cuda/include/thrust/iterator/counting_iterator.h",
-        "cuda/include/thrust/iterator/detail/any_assign.h",
-        "cuda/include/thrust/iterator/detail/any_system_tag.h",
-        "cuda/include/thrust/iterator/detail/constant_iterator_base.h",
-        "cuda/include/thrust/iterator/detail/counting_iterator.inl",
-        "cuda/include/thrust/iterator/detail/device_system_tag.h",
-        "cuda/include/thrust/iterator/detail/discard_iterator_base.h",
-        "cuda/include/thrust/iterator/detail/distance_from_result.h",
-        "cuda/include/thrust/iterator/detail/host_system_tag.h",
-        "cuda/include/thrust/iterator/detail/is_iterator_category.h",
-        "cuda/include/thrust/iterator/detail/is_trivial_iterator.h",
-        "cuda/include/thrust/iterator/detail/iterator_adaptor_base.h",
-        "cuda/include/thrust/iterator/detail/iterator_category_to_system.h",
-        "cuda/include/thrust/iterator/detail/iterator_category_to_traversal.h",
-        "cuda/include/thrust/iterator/detail/iterator_category_with_system_and_traversal.h",
-        "cuda/include/thrust/iterator/detail/iterator_facade_category.h",
-        "cuda/include/thrust/iterator/detail/iterator_traits.inl",
-        "cuda/include/thrust/iterator/detail/iterator_traversal_tags.h",
-        "cuda/include/thrust/iterator/detail/join_iterator.h",
-        "cuda/include/thrust/iterator/detail/minimum_category.h",
-        "cuda/include/thrust/iterator/detail/minimum_system.h",
-        "cuda/include/thrust/iterator/detail/normal_iterator.h",
-        "cuda/include/thrust/iterator/detail/permutation_iterator_base.h",
-        "cuda/include/thrust/iterator/detail/retag.h",
-        "cuda/include/thrust/iterator/detail/reverse_iterator.inl",
-        "cuda/include/thrust/iterator/detail/reverse_iterator_base.h",
-        "cuda/include/thrust/iterator/detail/tagged_iterator.h",
-        "cuda/include/thrust/iterator/detail/transform_iterator.inl",
-        "cuda/include/thrust/iterator/detail/transform_output_iterator.inl",
-        "cuda/include/thrust/iterator/detail/tuple_of_iterator_references.h",
-        "cuda/include/thrust/iterator/detail/universal_categories.h",
-        "cuda/include/thrust/iterator/detail/zip_iterator.inl",
-        "cuda/include/thrust/iterator/detail/zip_iterator_base.h",
-        "cuda/include/thrust/iterator/discard_iterator.h",
-        "cuda/include/thrust/iterator/iterator_adaptor.h",
-        "cuda/include/thrust/iterator/iterator_categories.h",
-        "cuda/include/thrust/iterator/iterator_facade.h",
-        "cuda/include/thrust/iterator/iterator_traits.h",
-        "cuda/include/thrust/iterator/permutation_iterator.h",
-        "cuda/include/thrust/iterator/retag.h",
-        "cuda/include/thrust/iterator/reverse_iterator.h",
-        "cuda/include/thrust/iterator/transform_iterator.h",
-        "cuda/include/thrust/iterator/transform_output_iterator.h",
-        "cuda/include/thrust/iterator/zip_iterator.h",
-        "cuda/include/thrust/logical.h",
-        "cuda/include/thrust/memory.h",
-        "cuda/include/thrust/merge.h",
-        "cuda/include/thrust/mismatch.h",
-        "cuda/include/thrust/pair.h",
-        "cuda/include/thrust/partition.h",
-        "cuda/include/thrust/random.h",
-        "cuda/include/thrust/random/detail/discard_block_engine.inl",
-        "cuda/include/thrust/random/detail/linear_congruential_engine.inl",
-        "cuda/include/thrust/random/detail/linear_congruential_engine_discard.h",
-        "cuda/include/thrust/random/detail/linear_feedback_shift_engine.inl",
-        "cuda/include/thrust/random/detail/linear_feedback_shift_engine_wordmask.h",
-        "cuda/include/thrust/random/detail/mod.h",
-        "cuda/include/thrust/random/detail/normal_distribution.inl",
-        "cuda/include/thrust/random/detail/normal_distribution_base.h",
-        "cuda/include/thrust/random/detail/random_core_access.h",
-        "cuda/include/thrust/random/detail/subtract_with_carry_engine.inl",
-        "cuda/include/thrust/random/detail/uniform_int_distribution.inl",
-        "cuda/include/thrust/random/detail/uniform_real_distribution.inl",
-        "cuda/include/thrust/random/detail/xor_combine_engine.inl",
-        "cuda/include/thrust/random/detail/xor_combine_engine_max.h",
-        "cuda/include/thrust/random/discard_block_engine.h",
-        "cuda/include/thrust/random/linear_congruential_engine.h",
-        "cuda/include/thrust/random/linear_feedback_shift_engine.h",
-        "cuda/include/thrust/random/normal_distribution.h",
-        "cuda/include/thrust/random/subtract_with_carry_engine.h",
-        "cuda/include/thrust/random/uniform_int_distribution.h",
-        "cuda/include/thrust/random/uniform_real_distribution.h",
-        "cuda/include/thrust/random/xor_combine_engine.h",
-        "cuda/include/thrust/reduce.h",
-        "cuda/include/thrust/remove.h",
-        "cuda/include/thrust/replace.h",
-        "cuda/include/thrust/reverse.h",
-        "cuda/include/thrust/scan.h",
-        "cuda/include/thrust/scatter.h",
-        "cuda/include/thrust/sequence.h",
-        "cuda/include/thrust/set_operations.h",
-        "cuda/include/thrust/sort.h",
-        "cuda/include/thrust/swap.h",
-        "cuda/include/thrust/system/cpp/detail/adjacent_difference.h",
-        "cuda/include/thrust/system/cpp/detail/assign_value.h",
-        "cuda/include/thrust/system/cpp/detail/binary_search.h",
-        "cuda/include/thrust/system/cpp/detail/copy.h",
-        "cuda/include/thrust/system/cpp/detail/copy_if.h",
-        "cuda/include/thrust/system/cpp/detail/count.h",
-        "cuda/include/thrust/system/cpp/detail/equal.h",
-        "cuda/include/thrust/system/cpp/detail/execution_policy.h",
-        "cuda/include/thrust/system/cpp/detail/extrema.h",
-        "cuda/include/thrust/system/cpp/detail/fill.h",
-        "cuda/include/thrust/system/cpp/detail/find.h",
-        "cuda/include/thrust/system/cpp/detail/for_each.h",
-        "cuda/include/thrust/system/cpp/detail/gather.h",
-        "cuda/include/thrust/system/cpp/detail/generate.h",
-        "cuda/include/thrust/system/cpp/detail/get_value.h",
-        "cuda/include/thrust/system/cpp/detail/inner_product.h",
-        "cuda/include/thrust/system/cpp/detail/iter_swap.h",
-        "cuda/include/thrust/system/cpp/detail/logical.h",
-        "cuda/include/thrust/system/cpp/detail/malloc_and_free.h",
-        "cuda/include/thrust/system/cpp/detail/memory.inl",
-        "cuda/include/thrust/system/cpp/detail/merge.h",
-        "cuda/include/thrust/system/cpp/detail/mismatch.h",
-        "cuda/include/thrust/system/cpp/detail/par.h",
-        "cuda/include/thrust/system/cpp/detail/partition.h",
-        "cuda/include/thrust/system/cpp/detail/reduce.h",
-        "cuda/include/thrust/system/cpp/detail/reduce_by_key.h",
-        "cuda/include/thrust/system/cpp/detail/remove.h",
-        "cuda/include/thrust/system/cpp/detail/replace.h",
-        "cuda/include/thrust/system/cpp/detail/reverse.h",
-        "cuda/include/thrust/system/cpp/detail/scan.h",
-        "cuda/include/thrust/system/cpp/detail/scan_by_key.h",
-        "cuda/include/thrust/system/cpp/detail/scatter.h",
-        "cuda/include/thrust/system/cpp/detail/sequence.h",
-        "cuda/include/thrust/system/cpp/detail/set_operations.h",
-        "cuda/include/thrust/system/cpp/detail/sort.h",
-        "cuda/include/thrust/system/cpp/detail/swap_ranges.h",
-        "cuda/include/thrust/system/cpp/detail/tabulate.h",
-        "cuda/include/thrust/system/cpp/detail/temporary_buffer.h",
-        "cuda/include/thrust/system/cpp/detail/transform.h",
-        "cuda/include/thrust/system/cpp/detail/transform_reduce.h",
-        "cuda/include/thrust/system/cpp/detail/transform_scan.h",
-        "cuda/include/thrust/system/cpp/detail/uninitialized_copy.h",
-        "cuda/include/thrust/system/cpp/detail/uninitialized_fill.h",
-        "cuda/include/thrust/system/cpp/detail/unique.h",
-        "cuda/include/thrust/system/cpp/detail/unique_by_key.h",
-        "cuda/include/thrust/system/cpp/detail/vector.inl",
-        "cuda/include/thrust/system/cpp/execution_policy.h",
-        "cuda/include/thrust/system/cpp/memory.h",
-        "cuda/include/thrust/system/cpp/vector.h",
-        "cuda/include/thrust/system/cuda/config.h",
-        "cuda/include/thrust/system/cuda/detail/adjacent_difference.h",
-        "cuda/include/thrust/system/cuda/detail/assign_value.h",
-        "cuda/include/thrust/system/cuda/detail/binary_search.h",
-        "cuda/include/thrust/system/cuda/detail/copy.h",
-        "cuda/include/thrust/system/cuda/detail/copy_if.h",
-        "cuda/include/thrust/system/cuda/detail/core/agent_launcher.h",
-        "cuda/include/thrust/system/cuda/detail/core/alignment.h",
-        "cuda/include/thrust/system/cuda/detail/core/triple_chevron_launch.h",
-        "cuda/include/thrust/system/cuda/detail/core/util.h",
-        "cuda/include/thrust/system/cuda/detail/count.h",
-        "cuda/include/thrust/system/cuda/detail/cross_system.h",
-        "cuda/include/thrust/system/cuda/detail/cub/agent/agent_histogram.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/agent/agent_radix_sort_downsweep.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/agent/agent_radix_sort_upsweep.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/agent/agent_reduce.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/agent/agent_reduce_by_key.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/agent/agent_rle.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/agent/agent_scan.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/agent/agent_segment_fixup.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/agent/agent_select_if.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/agent/agent_spmv_csrt.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/agent/agent_spmv_orig.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/agent/agent_spmv_row_based.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/agent/single_pass_scan_operators.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/block_adjacent_difference.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/block_discontinuity.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/block_exchange.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/block_histogram.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/block_load.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/block_radix_rank.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/block_radix_sort.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/block_raking_layout.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/block_reduce.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/block_scan.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/block_shuffle.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/block_store.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_histogram_atomic.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_histogram_sort.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_reduce_raking.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_reduce_raking_commutative_only.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_reduce_warp_reductions.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_scan_raking.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_scan_warp_scans.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_scan_warp_scans2.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_scan_warp_scans3.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/cub.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/device_histogram.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/device_partition.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/device_radix_sort.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/device_reduce.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/device_run_length_encode.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/device_scan.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/device_segmented_radix_sort.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/device_segmented_reduce.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/device_select.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/device_spmv.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_histogram.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_radix_sort.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_reduce.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_reduce_by_key.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_rle.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_scan.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_select_if.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_spmv_csrt.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_spmv_orig.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_spmv_row_based.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/grid/grid_barrier.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/grid/grid_even_share.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/grid/grid_mapping.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/grid/grid_queue.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/host/mutex.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/iterator/arg_index_input_iterator.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/iterator/cache_modified_input_iterator.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/iterator/cache_modified_output_iterator.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/iterator/constant_input_iterator.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/iterator/counting_input_iterator.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/iterator/discard_output_iterator.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/iterator/tex_obj_input_iterator.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/iterator/tex_ref_input_iterator.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/iterator/transform_input_iterator.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/thread/thread_load.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/thread/thread_operators.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/thread/thread_reduce.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/thread/thread_scan.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/thread/thread_search.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/thread/thread_store.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/util_allocator.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/util_arch.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/util_debug.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/util_device.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/util_macro.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/util_namespace.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/util_ptx.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/util_type.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/warp/specializations/warp_reduce_shfl.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/warp/specializations/warp_reduce_smem.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/warp/specializations/warp_scan_shfl.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/warp/specializations/warp_scan_smem.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/warp/warp_reduce.cuh",
-        "cuda/include/thrust/system/cuda/detail/cub/warp/warp_scan.cuh",
-        "cuda/include/thrust/system/cuda/detail/equal.h",
-        "cuda/include/thrust/system/cuda/detail/error.inl",
-        "cuda/include/thrust/system/cuda/detail/execution_policy.h",
-        "cuda/include/thrust/system/cuda/detail/extrema.h",
-        "cuda/include/thrust/system/cuda/detail/fill.h",
-        "cuda/include/thrust/system/cuda/detail/find.h",
-        "cuda/include/thrust/system/cuda/detail/for_each.h",
-        "cuda/include/thrust/system/cuda/detail/gather.h",
-        "cuda/include/thrust/system/cuda/detail/generate.h",
-        "cuda/include/thrust/system/cuda/detail/get_value.h",
-        "cuda/include/thrust/system/cuda/detail/guarded_cuda_runtime_api.h",
-        "cuda/include/thrust/system/cuda/detail/guarded_driver_types.h",
-        "cuda/include/thrust/system/cuda/detail/inner_product.h",
-        "cuda/include/thrust/system/cuda/detail/internal/copy_cross_system.h",
-        "cuda/include/thrust/system/cuda/detail/internal/copy_device_to_device.h",
-        "cuda/include/thrust/system/cuda/detail/iter_swap.h",
-        "cuda/include/thrust/system/cuda/detail/logical.h",
-        "cuda/include/thrust/system/cuda/detail/malloc_and_free.h",
-        "cuda/include/thrust/system/cuda/detail/memory.inl",
-        "cuda/include/thrust/system/cuda/detail/memory_buffer.h",
-        "cuda/include/thrust/system/cuda/detail/merge.h",
-        "cuda/include/thrust/system/cuda/detail/mismatch.h",
-        "cuda/include/thrust/system/cuda/detail/par.h",
-        "cuda/include/thrust/system/cuda/detail/par_to_seq.h",
-        "cuda/include/thrust/system/cuda/detail/parallel_for.h",
-        "cuda/include/thrust/system/cuda/detail/partition.h",
-        "cuda/include/thrust/system/cuda/detail/reduce.h",
-        "cuda/include/thrust/system/cuda/detail/reduce_by_key.h",
-        "cuda/include/thrust/system/cuda/detail/remove.h",
-        "cuda/include/thrust/system/cuda/detail/replace.h",
-        "cuda/include/thrust/system/cuda/detail/reverse.h",
-        "cuda/include/thrust/system/cuda/detail/scan.h",
-        "cuda/include/thrust/system/cuda/detail/scan_by_key.h",
-        "cuda/include/thrust/system/cuda/detail/scatter.h",
-        "cuda/include/thrust/system/cuda/detail/sequence.h",
-        "cuda/include/thrust/system/cuda/detail/set_operations.h",
-        "cuda/include/thrust/system/cuda/detail/sort.h",
-        "cuda/include/thrust/system/cuda/detail/swap_ranges.h",
-        "cuda/include/thrust/system/cuda/detail/tabulate.h",
-        "cuda/include/thrust/system/cuda/detail/temporary_buffer.h",
-        "cuda/include/thrust/system/cuda/detail/terminate.h",
-        "cuda/include/thrust/system/cuda/detail/transform.h",
-        "cuda/include/thrust/system/cuda/detail/transform_reduce.h",
-        "cuda/include/thrust/system/cuda/detail/transform_scan.h",
-        "cuda/include/thrust/system/cuda/detail/uninitialized_copy.h",
-        "cuda/include/thrust/system/cuda/detail/uninitialized_fill.h",
-        "cuda/include/thrust/system/cuda/detail/unique.h",
-        "cuda/include/thrust/system/cuda/detail/unique_by_key.h",
-        "cuda/include/thrust/system/cuda/detail/util.h",
-        "cuda/include/thrust/system/cuda/detail/vector.inl",
-        "cuda/include/thrust/system/cuda/error.h",
-        "cuda/include/thrust/system/cuda/execution_policy.h",
-        "cuda/include/thrust/system/cuda/experimental/pinned_allocator.h",
-        "cuda/include/thrust/system/cuda/memory.h",
-        "cuda/include/thrust/system/cuda/vector.h",
-        "cuda/include/thrust/system/detail/adl/adjacent_difference.h",
-        "cuda/include/thrust/system/detail/adl/assign_value.h",
-        "cuda/include/thrust/system/detail/adl/binary_search.h",
-        "cuda/include/thrust/system/detail/adl/copy.h",
-        "cuda/include/thrust/system/detail/adl/copy_if.h",
-        "cuda/include/thrust/system/detail/adl/count.h",
-        "cuda/include/thrust/system/detail/adl/equal.h",
-        "cuda/include/thrust/system/detail/adl/extrema.h",
-        "cuda/include/thrust/system/detail/adl/fill.h",
-        "cuda/include/thrust/system/detail/adl/find.h",
-        "cuda/include/thrust/system/detail/adl/for_each.h",
-        "cuda/include/thrust/system/detail/adl/gather.h",
-        "cuda/include/thrust/system/detail/adl/generate.h",
-        "cuda/include/thrust/system/detail/adl/get_value.h",
-        "cuda/include/thrust/system/detail/adl/inner_product.h",
-        "cuda/include/thrust/system/detail/adl/iter_swap.h",
-        "cuda/include/thrust/system/detail/adl/logical.h",
-        "cuda/include/thrust/system/detail/adl/malloc_and_free.h",
-        "cuda/include/thrust/system/detail/adl/merge.h",
-        "cuda/include/thrust/system/detail/adl/mismatch.h",
-        "cuda/include/thrust/system/detail/adl/partition.h",
-        "cuda/include/thrust/system/detail/adl/reduce.h",
-        "cuda/include/thrust/system/detail/adl/reduce_by_key.h",
-        "cuda/include/thrust/system/detail/adl/remove.h",
-        "cuda/include/thrust/system/detail/adl/replace.h",
-        "cuda/include/thrust/system/detail/adl/reverse.h",
-        "cuda/include/thrust/system/detail/adl/scan.h",
-        "cuda/include/thrust/system/detail/adl/scan_by_key.h",
-        "cuda/include/thrust/system/detail/adl/scatter.h",
-        "cuda/include/thrust/system/detail/adl/sequence.h",
-        "cuda/include/thrust/system/detail/adl/set_operations.h",
-        "cuda/include/thrust/system/detail/adl/sort.h",
-        "cuda/include/thrust/system/detail/adl/swap_ranges.h",
-        "cuda/include/thrust/system/detail/adl/tabulate.h",
-        "cuda/include/thrust/system/detail/adl/temporary_buffer.h",
-        "cuda/include/thrust/system/detail/adl/transform.h",
-        "cuda/include/thrust/system/detail/adl/transform_reduce.h",
-        "cuda/include/thrust/system/detail/adl/transform_scan.h",
-        "cuda/include/thrust/system/detail/adl/uninitialized_copy.h",
-        "cuda/include/thrust/system/detail/adl/uninitialized_fill.h",
-        "cuda/include/thrust/system/detail/adl/unique.h",
-        "cuda/include/thrust/system/detail/adl/unique_by_key.h",
-        "cuda/include/thrust/system/detail/bad_alloc.h",
-        "cuda/include/thrust/system/detail/errno.h",
-        "cuda/include/thrust/system/detail/error_category.inl",
-        "cuda/include/thrust/system/detail/error_code.inl",
-        "cuda/include/thrust/system/detail/error_condition.inl",
-        "cuda/include/thrust/system/detail/generic/adjacent_difference.h",
-        "cuda/include/thrust/system/detail/generic/adjacent_difference.inl",
-        "cuda/include/thrust/system/detail/generic/advance.h",
-        "cuda/include/thrust/system/detail/generic/advance.inl",
-        "cuda/include/thrust/system/detail/generic/binary_search.h",
-        "cuda/include/thrust/system/detail/generic/binary_search.inl",
-        "cuda/include/thrust/system/detail/generic/copy.h",
-        "cuda/include/thrust/system/detail/generic/copy.inl",
-        "cuda/include/thrust/system/detail/generic/copy_if.h",
-        "cuda/include/thrust/system/detail/generic/copy_if.inl",
-        "cuda/include/thrust/system/detail/generic/count.h",
-        "cuda/include/thrust/system/detail/generic/count.inl",
-        "cuda/include/thrust/system/detail/generic/distance.h",
-        "cuda/include/thrust/system/detail/generic/distance.inl",
-        "cuda/include/thrust/system/detail/generic/equal.h",
-        "cuda/include/thrust/system/detail/generic/equal.inl",
-        "cuda/include/thrust/system/detail/generic/extrema.h",
-        "cuda/include/thrust/system/detail/generic/extrema.inl",
-        "cuda/include/thrust/system/detail/generic/fill.h",
-        "cuda/include/thrust/system/detail/generic/find.h",
-        "cuda/include/thrust/system/detail/generic/find.inl",
-        "cuda/include/thrust/system/detail/generic/for_each.h",
-        "cuda/include/thrust/system/detail/generic/gather.h",
-        "cuda/include/thrust/system/detail/generic/gather.inl",
-        "cuda/include/thrust/system/detail/generic/generate.h",
-        "cuda/include/thrust/system/detail/generic/generate.inl",
-        "cuda/include/thrust/system/detail/generic/inner_product.h",
-        "cuda/include/thrust/system/detail/generic/inner_product.inl",
-        "cuda/include/thrust/system/detail/generic/logical.h",
-        "cuda/include/thrust/system/detail/generic/memory.h",
-        "cuda/include/thrust/system/detail/generic/memory.inl",
-        "cuda/include/thrust/system/detail/generic/merge.h",
-        "cuda/include/thrust/system/detail/generic/merge.inl",
-        "cuda/include/thrust/system/detail/generic/mismatch.h",
-        "cuda/include/thrust/system/detail/generic/mismatch.inl",
-        "cuda/include/thrust/system/detail/generic/partition.h",
-        "cuda/include/thrust/system/detail/generic/partition.inl",
-        "cuda/include/thrust/system/detail/generic/reduce.h",
-        "cuda/include/thrust/system/detail/generic/reduce.inl",
-        "cuda/include/thrust/system/detail/generic/reduce_by_key.h",
-        "cuda/include/thrust/system/detail/generic/reduce_by_key.inl",
-        "cuda/include/thrust/system/detail/generic/remove.h",
-        "cuda/include/thrust/system/detail/generic/remove.inl",
-        "cuda/include/thrust/system/detail/generic/replace.h",
-        "cuda/include/thrust/system/detail/generic/replace.inl",
-        "cuda/include/thrust/system/detail/generic/reverse.h",
-        "cuda/include/thrust/system/detail/generic/reverse.inl",
-        "cuda/include/thrust/system/detail/generic/scalar/binary_search.h",
-        "cuda/include/thrust/system/detail/generic/scalar/binary_search.inl",
-        "cuda/include/thrust/system/detail/generic/scan.h",
-        "cuda/include/thrust/system/detail/generic/scan.inl",
-        "cuda/include/thrust/system/detail/generic/scan_by_key.h",
-        "cuda/include/thrust/system/detail/generic/scan_by_key.inl",
-        "cuda/include/thrust/system/detail/generic/scatter.h",
-        "cuda/include/thrust/system/detail/generic/scatter.inl",
-        "cuda/include/thrust/system/detail/generic/select_system.h",
-        "cuda/include/thrust/system/detail/generic/sequence.h",
-        "cuda/include/thrust/system/detail/generic/sequence.inl",
-        "cuda/include/thrust/system/detail/generic/set_operations.h",
-        "cuda/include/thrust/system/detail/generic/set_operations.inl",
-        "cuda/include/thrust/system/detail/generic/sort.h",
-        "cuda/include/thrust/system/detail/generic/sort.inl",
-        "cuda/include/thrust/system/detail/generic/swap_ranges.h",
-        "cuda/include/thrust/system/detail/generic/swap_ranges.inl",
-        "cuda/include/thrust/system/detail/generic/tabulate.h",
-        "cuda/include/thrust/system/detail/generic/tabulate.inl",
-        "cuda/include/thrust/system/detail/generic/tag.h",
-        "cuda/include/thrust/system/detail/generic/temporary_buffer.h",
-        "cuda/include/thrust/system/detail/generic/temporary_buffer.inl",
-        "cuda/include/thrust/system/detail/generic/transform.h",
-        "cuda/include/thrust/system/detail/generic/transform.inl",
-        "cuda/include/thrust/system/detail/generic/transform_reduce.h",
-        "cuda/include/thrust/system/detail/generic/transform_reduce.inl",
-        "cuda/include/thrust/system/detail/generic/transform_scan.h",
-        "cuda/include/thrust/system/detail/generic/transform_scan.inl",
-        "cuda/include/thrust/system/detail/generic/type_traits.h",
-        "cuda/include/thrust/system/detail/generic/uninitialized_copy.h",
-        "cuda/include/thrust/system/detail/generic/uninitialized_copy.inl",
-        "cuda/include/thrust/system/detail/generic/uninitialized_fill.h",
-        "cuda/include/thrust/system/detail/generic/uninitialized_fill.inl",
-        "cuda/include/thrust/system/detail/generic/unique.h",
-        "cuda/include/thrust/system/detail/generic/unique.inl",
-        "cuda/include/thrust/system/detail/generic/unique_by_key.h",
-        "cuda/include/thrust/system/detail/generic/unique_by_key.inl",
-        "cuda/include/thrust/system/detail/internal/decompose.h",
-        "cuda/include/thrust/system/detail/sequential/adjacent_difference.h",
-        "cuda/include/thrust/system/detail/sequential/assign_value.h",
-        "cuda/include/thrust/system/detail/sequential/binary_search.h",
-        "cuda/include/thrust/system/detail/sequential/copy.h",
-        "cuda/include/thrust/system/detail/sequential/copy.inl",
-        "cuda/include/thrust/system/detail/sequential/copy_backward.h",
-        "cuda/include/thrust/system/detail/sequential/copy_if.h",
-        "cuda/include/thrust/system/detail/sequential/count.h",
-        "cuda/include/thrust/system/detail/sequential/equal.h",
-        "cuda/include/thrust/system/detail/sequential/execution_policy.h",
-        "cuda/include/thrust/system/detail/sequential/extrema.h",
-        "cuda/include/thrust/system/detail/sequential/fill.h",
-        "cuda/include/thrust/system/detail/sequential/find.h",
-        "cuda/include/thrust/system/detail/sequential/for_each.h",
-        "cuda/include/thrust/system/detail/sequential/gather.h",
-        "cuda/include/thrust/system/detail/sequential/general_copy.h",
-        "cuda/include/thrust/system/detail/sequential/generate.h",
-        "cuda/include/thrust/system/detail/sequential/get_value.h",
-        "cuda/include/thrust/system/detail/sequential/inner_product.h",
-        "cuda/include/thrust/system/detail/sequential/insertion_sort.h",
-        "cuda/include/thrust/system/detail/sequential/iter_swap.h",
-        "cuda/include/thrust/system/detail/sequential/logical.h",
-        "cuda/include/thrust/system/detail/sequential/malloc_and_free.h",
-        "cuda/include/thrust/system/detail/sequential/merge.h",
-        "cuda/include/thrust/system/detail/sequential/merge.inl",
-        "cuda/include/thrust/system/detail/sequential/mismatch.h",
-        "cuda/include/thrust/system/detail/sequential/partition.h",
-        "cuda/include/thrust/system/detail/sequential/reduce.h",
-        "cuda/include/thrust/system/detail/sequential/reduce_by_key.h",
-        "cuda/include/thrust/system/detail/sequential/remove.h",
-        "cuda/include/thrust/system/detail/sequential/replace.h",
-        "cuda/include/thrust/system/detail/sequential/reverse.h",
-        "cuda/include/thrust/system/detail/sequential/scan.h",
-        "cuda/include/thrust/system/detail/sequential/scan_by_key.h",
-        "cuda/include/thrust/system/detail/sequential/scatter.h",
-        "cuda/include/thrust/system/detail/sequential/sequence.h",
-        "cuda/include/thrust/system/detail/sequential/set_operations.h",
-        "cuda/include/thrust/system/detail/sequential/sort.h",
-        "cuda/include/thrust/system/detail/sequential/sort.inl",
-        "cuda/include/thrust/system/detail/sequential/stable_merge_sort.h",
-        "cuda/include/thrust/system/detail/sequential/stable_merge_sort.inl",
-        "cuda/include/thrust/system/detail/sequential/stable_primitive_sort.h",
-        "cuda/include/thrust/system/detail/sequential/stable_primitive_sort.inl",
-        "cuda/include/thrust/system/detail/sequential/stable_radix_sort.h",
-        "cuda/include/thrust/system/detail/sequential/stable_radix_sort.inl",
-        "cuda/include/thrust/system/detail/sequential/swap_ranges.h",
-        "cuda/include/thrust/system/detail/sequential/tabulate.h",
-        "cuda/include/thrust/system/detail/sequential/temporary_buffer.h",
-        "cuda/include/thrust/system/detail/sequential/transform.h",
-        "cuda/include/thrust/system/detail/sequential/transform_reduce.h",
-        "cuda/include/thrust/system/detail/sequential/transform_scan.h",
-        "cuda/include/thrust/system/detail/sequential/trivial_copy.h",
-        "cuda/include/thrust/system/detail/sequential/uninitialized_copy.h",
-        "cuda/include/thrust/system/detail/sequential/uninitialized_fill.h",
-        "cuda/include/thrust/system/detail/sequential/unique.h",
-        "cuda/include/thrust/system/detail/sequential/unique_by_key.h",
-        "cuda/include/thrust/system/detail/system_error.inl",
-        "cuda/include/thrust/system/error_code.h",
-        "cuda/include/thrust/system/omp/detail/adjacent_difference.h",
-        "cuda/include/thrust/system/omp/detail/assign_value.h",
-        "cuda/include/thrust/system/omp/detail/binary_search.h",
-        "cuda/include/thrust/system/omp/detail/copy.h",
-        "cuda/include/thrust/system/omp/detail/copy.inl",
-        "cuda/include/thrust/system/omp/detail/copy_if.h",
-        "cuda/include/thrust/system/omp/detail/copy_if.inl",
-        "cuda/include/thrust/system/omp/detail/count.h",
-        "cuda/include/thrust/system/omp/detail/default_decomposition.h",
-        "cuda/include/thrust/system/omp/detail/default_decomposition.inl",
-        "cuda/include/thrust/system/omp/detail/equal.h",
-        "cuda/include/thrust/system/omp/detail/execution_policy.h",
-        "cuda/include/thrust/system/omp/detail/extrema.h",
-        "cuda/include/thrust/system/omp/detail/fill.h",
-        "cuda/include/thrust/system/omp/detail/find.h",
-        "cuda/include/thrust/system/omp/detail/for_each.h",
-        "cuda/include/thrust/system/omp/detail/for_each.inl",
-        "cuda/include/thrust/system/omp/detail/gather.h",
-        "cuda/include/thrust/system/omp/detail/generate.h",
-        "cuda/include/thrust/system/omp/detail/get_value.h",
-        "cuda/include/thrust/system/omp/detail/inner_product.h",
-        "cuda/include/thrust/system/omp/detail/iter_swap.h",
-        "cuda/include/thrust/system/omp/detail/logical.h",
-        "cuda/include/thrust/system/omp/detail/malloc_and_free.h",
-        "cuda/include/thrust/system/omp/detail/memory.inl",
-        "cuda/include/thrust/system/omp/detail/merge.h",
-        "cuda/include/thrust/system/omp/detail/mismatch.h",
-        "cuda/include/thrust/system/omp/detail/par.h",
-        "cuda/include/thrust/system/omp/detail/partition.h",
-        "cuda/include/thrust/system/omp/detail/partition.inl",
-        "cuda/include/thrust/system/omp/detail/reduce.h",
-        "cuda/include/thrust/system/omp/detail/reduce.inl",
-        "cuda/include/thrust/system/omp/detail/reduce_by_key.h",
-        "cuda/include/thrust/system/omp/detail/reduce_by_key.inl",
-        "cuda/include/thrust/system/omp/detail/reduce_intervals.h",
-        "cuda/include/thrust/system/omp/detail/reduce_intervals.inl",
-        "cuda/include/thrust/system/omp/detail/remove.h",
-        "cuda/include/thrust/system/omp/detail/remove.inl",
-        "cuda/include/thrust/system/omp/detail/replace.h",
-        "cuda/include/thrust/system/omp/detail/reverse.h",
-        "cuda/include/thrust/system/omp/detail/scan.h",
-        "cuda/include/thrust/system/omp/detail/scan_by_key.h",
-        "cuda/include/thrust/system/omp/detail/scatter.h",
-        "cuda/include/thrust/system/omp/detail/sequence.h",
-        "cuda/include/thrust/system/omp/detail/set_operations.h",
-        "cuda/include/thrust/system/omp/detail/sort.h",
-        "cuda/include/thrust/system/omp/detail/sort.inl",
-        "cuda/include/thrust/system/omp/detail/swap_ranges.h",
-        "cuda/include/thrust/system/omp/detail/tabulate.h",
-        "cuda/include/thrust/system/omp/detail/temporary_buffer.h",
-        "cuda/include/thrust/system/omp/detail/transform.h",
-        "cuda/include/thrust/system/omp/detail/transform_reduce.h",
-        "cuda/include/thrust/system/omp/detail/transform_scan.h",
-        "cuda/include/thrust/system/omp/detail/uninitialized_copy.h",
-        "cuda/include/thrust/system/omp/detail/uninitialized_fill.h",
-        "cuda/include/thrust/system/omp/detail/unique.h",
-        "cuda/include/thrust/system/omp/detail/unique.inl",
-        "cuda/include/thrust/system/omp/detail/unique_by_key.h",
-        "cuda/include/thrust/system/omp/detail/unique_by_key.inl",
-        "cuda/include/thrust/system/omp/detail/vector.inl",
-        "cuda/include/thrust/system/omp/execution_policy.h",
-        "cuda/include/thrust/system/omp/memory.h",
-        "cuda/include/thrust/system/omp/vector.h",
-        "cuda/include/thrust/system/system_error.h",
-        "cuda/include/thrust/system/tbb/detail/adjacent_difference.h",
-        "cuda/include/thrust/system/tbb/detail/assign_value.h",
-        "cuda/include/thrust/system/tbb/detail/binary_search.h",
-        "cuda/include/thrust/system/tbb/detail/copy.h",
-        "cuda/include/thrust/system/tbb/detail/copy.inl",
-        "cuda/include/thrust/system/tbb/detail/copy_if.h",
-        "cuda/include/thrust/system/tbb/detail/copy_if.inl",
-        "cuda/include/thrust/system/tbb/detail/count.h",
-        "cuda/include/thrust/system/tbb/detail/equal.h",
-        "cuda/include/thrust/system/tbb/detail/execution_policy.h",
-        "cuda/include/thrust/system/tbb/detail/extrema.h",
-        "cuda/include/thrust/system/tbb/detail/fill.h",
-        "cuda/include/thrust/system/tbb/detail/find.h",
-        "cuda/include/thrust/system/tbb/detail/for_each.h",
-        "cuda/include/thrust/system/tbb/detail/for_each.inl",
-        "cuda/include/thrust/system/tbb/detail/gather.h",
-        "cuda/include/thrust/system/tbb/detail/generate.h",
-        "cuda/include/thrust/system/tbb/detail/get_value.h",
-        "cuda/include/thrust/system/tbb/detail/inner_product.h",
-        "cuda/include/thrust/system/tbb/detail/iter_swap.h",
-        "cuda/include/thrust/system/tbb/detail/logical.h",
-        "cuda/include/thrust/system/tbb/detail/malloc_and_free.h",
-        "cuda/include/thrust/system/tbb/detail/memory.inl",
-        "cuda/include/thrust/system/tbb/detail/merge.h",
-        "cuda/include/thrust/system/tbb/detail/merge.inl",
-        "cuda/include/thrust/system/tbb/detail/mismatch.h",
-        "cuda/include/thrust/system/tbb/detail/par.h",
-        "cuda/include/thrust/system/tbb/detail/partition.h",
-        "cuda/include/thrust/system/tbb/detail/partition.inl",
-        "cuda/include/thrust/system/tbb/detail/reduce.h",
-        "cuda/include/thrust/system/tbb/detail/reduce.inl",
-        "cuda/include/thrust/system/tbb/detail/reduce_by_key.h",
-        "cuda/include/thrust/system/tbb/detail/reduce_by_key.inl",
-        "cuda/include/thrust/system/tbb/detail/reduce_intervals.h",
-        "cuda/include/thrust/system/tbb/detail/remove.h",
-        "cuda/include/thrust/system/tbb/detail/remove.inl",
-        "cuda/include/thrust/system/tbb/detail/replace.h",
-        "cuda/include/thrust/system/tbb/detail/reverse.h",
-        "cuda/include/thrust/system/tbb/detail/scan.h",
-        "cuda/include/thrust/system/tbb/detail/scan.inl",
-        "cuda/include/thrust/system/tbb/detail/scan_by_key.h",
-        "cuda/include/thrust/system/tbb/detail/scatter.h",
-        "cuda/include/thrust/system/tbb/detail/sequence.h",
-        "cuda/include/thrust/system/tbb/detail/set_operations.h",
-        "cuda/include/thrust/system/tbb/detail/sort.h",
-        "cuda/include/thrust/system/tbb/detail/sort.inl",
-        "cuda/include/thrust/system/tbb/detail/swap_ranges.h",
-        "cuda/include/thrust/system/tbb/detail/tabulate.h",
-        "cuda/include/thrust/system/tbb/detail/temporary_buffer.h",
-        "cuda/include/thrust/system/tbb/detail/transform.h",
-        "cuda/include/thrust/system/tbb/detail/transform_reduce.h",
-        "cuda/include/thrust/system/tbb/detail/transform_scan.h",
-        "cuda/include/thrust/system/tbb/detail/uninitialized_copy.h",
-        "cuda/include/thrust/system/tbb/detail/uninitialized_fill.h",
-        "cuda/include/thrust/system/tbb/detail/unique.h",
-        "cuda/include/thrust/system/tbb/detail/unique.inl",
-        "cuda/include/thrust/system/tbb/detail/unique_by_key.h",
-        "cuda/include/thrust/system/tbb/detail/unique_by_key.inl",
-        "cuda/include/thrust/system/tbb/detail/vector.inl",
-        "cuda/include/thrust/system/tbb/execution_policy.h",
-        "cuda/include/thrust/system/tbb/memory.h",
-        "cuda/include/thrust/system/tbb/vector.h",
-        "cuda/include/thrust/system_error.h",
-        "cuda/include/thrust/tabulate.h",
-        "cuda/include/thrust/transform.h",
-        "cuda/include/thrust/transform_reduce.h",
-        "cuda/include/thrust/transform_scan.h",
-        "cuda/include/thrust/tuple.h",
-        "cuda/include/thrust/uninitialized_copy.h",
-        "cuda/include/thrust/uninitialized_fill.h",
-        "cuda/include/thrust/unique.h",
-        "cuda/include/thrust/version.h",
-        "cuda/include/vector_functions.h",
-        "cuda/include/vector_functions.hpp",
-        "cuda/include/vector_types.h",
-    ],
-    cmd = """
-if [ -d "$(@D)/extras" ]; then rm $(@D)/extras -drf; fi && if [ -d "$(@D)/include" ]; then rm $(@D)/include -drf; fi && if [ -d "$(@D)/lib" ]; then rm $(@D)/lib -drf; fi && if [ -d "$(@D)/nvvm" ]; then rm $(@D)/nvvm -drf; fi && cp "/usr/local/cuda-9.0/include/CL/cl.h" "$(@D)/cuda/include/CL/cl.h" && cp "/usr/local/cuda-9.0/include/CL/cl.hpp" "$(@D)/cuda/include/CL/cl.hpp" && cp "/usr/local/cuda-9.0/include/CL/cl_egl.h" "$(@D)/cuda/include/CL/cl_egl.h" && cp "/usr/local/cuda-9.0/include/CL/cl_ext.h" "$(@D)/cuda/include/CL/cl_ext.h" && cp "/usr/local/cuda-9.0/include/CL/cl_gl.h" "$(@D)/cuda/include/CL/cl_gl.h" && cp "/usr/local/cuda-9.0/include/CL/cl_gl_ext.h" "$(@D)/cuda/include/CL/cl_gl_ext.h" && cp "/usr/local/cuda-9.0/include/CL/cl_platform.h" "$(@D)/cuda/include/CL/cl_platform.h" && cp "/usr/local/cuda-9.0/include/CL/opencl.h" "$(@D)/cuda/include/CL/opencl.h" && cp "/usr/local/cuda-9.0/include/builtin_types.h" "$(@D)/cuda/include/builtin_types.h" && cp "/usr/local/cuda-9.0/include/channel_descriptor.h" "$(@D)/cuda/include/channel_descriptor.h" && cp "/usr/local/cuda-9.0/include/common_functions.h" "$(@D)/cuda/include/common_functions.h" && cp "/usr/local/cuda-9.0/include/cooperative_groups.h" "$(@D)/cuda/include/cooperative_groups.h" && cp "/usr/local/cuda-9.0/include/cooperative_groups_helpers.h" "$(@D)/cuda/include/cooperative_groups_helpers.h" && cp "/usr/local/cuda-9.0/include/crt/common_functions.h" "$(@D)/cuda/include/crt/common_functions.h" && cp "/usr/local/cuda-9.0/include/crt/device_double_functions.h" "$(@D)/cuda/include/crt/device_double_functions.h" && cp "/usr/local/cuda-9.0/include/crt/device_double_functions.hpp" "$(@D)/cuda/include/crt/device_double_functions.hpp" && cp "/usr/local/cuda-9.0/include/crt/device_functions.h" "$(@D)/cuda/include/crt/device_functions.h" && cp "/usr/local/cuda-9.0/include/crt/device_functions.hpp" "$(@D)/cuda/include/crt/device_functions.hpp" && cp "/usr/local/cuda-9.0/include/crt/func_macro.h" "$(@D)/cuda/include/crt/func_macro.h" && cp "/usr/local/cuda-9.0/include/crt/host_config.h" "$(@D)/cuda/include/crt/host_config.h" && cp "/usr/local/cuda-9.0/include/crt/host_defines.h" "$(@D)/cuda/include/crt/host_defines.h" && cp "/usr/local/cuda-9.0/include/crt/host_runtime.h" "$(@D)/cuda/include/crt/host_runtime.h" && cp "/usr/local/cuda-9.0/include/crt/math_functions.h" "$(@D)/cuda/include/crt/math_functions.h" && cp "/usr/local/cuda-9.0/include/crt/math_functions.hpp" "$(@D)/cuda/include/crt/math_functions.hpp" && cp "/usr/local/cuda-9.0/include/crt/mma.h" "$(@D)/cuda/include/crt/mma.h" && cp "/usr/local/cuda-9.0/include/crt/mma.hpp" "$(@D)/cuda/include/crt/mma.hpp" && cp "/usr/local/cuda-9.0/include/crt/nvfunctional" "$(@D)/cuda/include/crt/nvfunctional" && cp "/usr/local/cuda-9.0/include/crt/sm_70_rt.h" "$(@D)/cuda/include/crt/sm_70_rt.h" && cp "/usr/local/cuda-9.0/include/crt/sm_70_rt.hpp" "$(@D)/cuda/include/crt/sm_70_rt.hpp" && cp "/usr/local/cuda-9.0/include/crt/storage_class.h" "$(@D)/cuda/include/crt/storage_class.h" && cp "/usr/local/cuda-9.0/include/cuComplex.h" "$(@D)/cuda/include/cuComplex.h" && cp "/usr/local/cuda-9.0/include/cublas.h" "$(@D)/cuda/include/cublas.h" && cp "/usr/local/cuda-9.0/include/cublasXt.h" "$(@D)/cuda/include/cublasXt.h" && cp "/usr/local/cuda-9.0/include/cublas_api.h" "$(@D)/cuda/include/cublas_api.h" && cp "/usr/local/cuda-9.0/include/cublas_v2.h" "$(@D)/cuda/include/cublas_v2.h" && cp "/usr/local/cuda-9.0/include/cuda.h" "$(@D)/cuda/include/cuda.h" && cp "/usr/local/cuda-9.0/include/cudaEGL.h" "$(@D)/cuda/include/cudaEGL.h" && cp "/usr/local/cuda-9.0/include/cudaGL.h" "$(@D)/cuda/include/cudaGL.h" && cp "/usr/local/cuda-9.0/include/cudaProfiler.h" "$(@D)/cuda/include/cudaProfiler.h" && cp "/usr/local/cuda-9.0/include/cudaVDPAU.h" "$(@D)/cuda/include/cudaVDPAU.h" && cp "/usr/local/cuda-9.0/include/cuda_device_runtime_api.h" "$(@D)/cuda/include/cuda_device_runtime_api.h" && cp "/usr/local/cuda-9.0/include/cuda_fp16.h" "$(@D)/cuda/include/cuda_fp16.h" && cp "/usr/local/cuda-9.0/include/cuda_fp16.hpp" "$(@D)/cuda/include/cuda_fp16.hpp" && cp "/usr/local/cuda-9.0/include/cuda_gl_interop.h" "$(@D)/cuda/include/cuda_gl_interop.h" && cp "/usr/local/cuda-9.0/include/cuda_occupancy.h" "$(@D)/cuda/include/cuda_occupancy.h" && cp "/usr/local/cuda-9.0/include/cuda_profiler_api.h" "$(@D)/cuda/include/cuda_profiler_api.h" && cp "/usr/local/cuda-9.0/include/cuda_runtime.h" "$(@D)/cuda/include/cuda_runtime.h" && cp "/usr/local/cuda-9.0/include/cuda_runtime_api.h" "$(@D)/cuda/include/cuda_runtime_api.h" && cp "/usr/local/cuda-9.0/include/cuda_surface_types.h" "$(@D)/cuda/include/cuda_surface_types.h" && cp "/usr/local/cuda-9.0/include/cuda_texture_types.h" "$(@D)/cuda/include/cuda_texture_types.h" && cp "/usr/local/cuda-9.0/include/cuda_vdpau_interop.h" "$(@D)/cuda/include/cuda_vdpau_interop.h" && cp "/usr/local/cuda-9.0/include/cudalibxt.h" "$(@D)/cuda/include/cudalibxt.h" && cp "/usr/local/cuda-9.0/include/cudnn.h" "$(@D)/cuda/include/cudnn.h" && cp "/usr/local/cuda-9.0/include/cufft.h" "$(@D)/cuda/include/cufft.h" && cp "/usr/local/cuda-9.0/include/cufftXt.h" "$(@D)/cuda/include/cufftXt.h" && cp "/usr/local/cuda-9.0/include/cufftw.h" "$(@D)/cuda/include/cufftw.h" && cp "/usr/local/cuda-9.0/include/curand.h" "$(@D)/cuda/include/curand.h" && cp "/usr/local/cuda-9.0/include/curand_discrete.h" "$(@D)/cuda/include/curand_discrete.h" && cp "/usr/local/cuda-9.0/include/curand_discrete2.h" "$(@D)/cuda/include/curand_discrete2.h" && cp "/usr/local/cuda-9.0/include/curand_globals.h" "$(@D)/cuda/include/curand_globals.h" && cp "/usr/local/cuda-9.0/include/curand_kernel.h" "$(@D)/cuda/include/curand_kernel.h" && cp "/usr/local/cuda-9.0/include/curand_lognormal.h" "$(@D)/cuda/include/curand_lognormal.h" && cp "/usr/local/cuda-9.0/include/curand_mrg32k3a.h" "$(@D)/cuda/include/curand_mrg32k3a.h" && cp "/usr/local/cuda-9.0/include/curand_mtgp32.h" "$(@D)/cuda/include/curand_mtgp32.h" && cp "/usr/local/cuda-9.0/include/curand_mtgp32_host.h" "$(@D)/cuda/include/curand_mtgp32_host.h" && cp "/usr/local/cuda-9.0/include/curand_mtgp32_kernel.h" "$(@D)/cuda/include/curand_mtgp32_kernel.h" && cp "/usr/local/cuda-9.0/include/curand_mtgp32dc_p_11213.h" "$(@D)/cuda/include/curand_mtgp32dc_p_11213.h" && cp "/usr/local/cuda-9.0/include/curand_normal.h" "$(@D)/cuda/include/curand_normal.h" && cp "/usr/local/cuda-9.0/include/curand_normal_static.h" "$(@D)/cuda/include/curand_normal_static.h" && cp "/usr/local/cuda-9.0/include/curand_philox4x32_x.h" "$(@D)/cuda/include/curand_philox4x32_x.h" && cp "/usr/local/cuda-9.0/include/curand_poisson.h" "$(@D)/cuda/include/curand_poisson.h" && cp "/usr/local/cuda-9.0/include/curand_precalc.h" "$(@D)/cuda/include/curand_precalc.h" && cp "/usr/local/cuda-9.0/include/curand_uniform.h" "$(@D)/cuda/include/curand_uniform.h" && cp "/usr/local/cuda-9.0/include/cusolverDn.h" "$(@D)/cuda/include/cusolverDn.h" && cp "/usr/local/cuda-9.0/include/cusolverRf.h" "$(@D)/cuda/include/cusolverRf.h" && cp "/usr/local/cuda-9.0/include/cusolverSp.h" "$(@D)/cuda/include/cusolverSp.h" && cp "/usr/local/cuda-9.0/include/cusolverSp_LOWLEVEL_PREVIEW.h" "$(@D)/cuda/include/cusolverSp_LOWLEVEL_PREVIEW.h" && cp "/usr/local/cuda-9.0/include/cusolver_common.h" "$(@D)/cuda/include/cusolver_common.h" && cp "/usr/local/cuda-9.0/include/cusparse.h" "$(@D)/cuda/include/cusparse.h" && cp "/usr/local/cuda-9.0/include/cusparse_v2.h" "$(@D)/cuda/include/cusparse_v2.h" && cp "/usr/local/cuda-9.0/include/device_atomic_functions.h" "$(@D)/cuda/include/device_atomic_functions.h" && cp "/usr/local/cuda-9.0/include/device_atomic_functions.hpp" "$(@D)/cuda/include/device_atomic_functions.hpp" && cp "/usr/local/cuda-9.0/include/device_double_functions.h" "$(@D)/cuda/include/device_double_functions.h" && cp "/usr/local/cuda-9.0/include/device_double_functions.hpp" "$(@D)/cuda/include/device_double_functions.hpp" && cp "/usr/local/cuda-9.0/include/device_functions.h" "$(@D)/cuda/include/device_functions.h" && cp "/usr/local/cuda-9.0/include/device_functions.hpp" "$(@D)/cuda/include/device_functions.hpp" && cp "/usr/local/cuda-9.0/include/device_functions_decls.h" "$(@D)/cuda/include/device_functions_decls.h" && cp "/usr/local/cuda-9.0/include/device_launch_parameters.h" "$(@D)/cuda/include/device_launch_parameters.h" && cp "/usr/local/cuda-9.0/include/device_types.h" "$(@D)/cuda/include/device_types.h" && cp "/usr/local/cuda-9.0/include/driver_functions.h" "$(@D)/cuda/include/driver_functions.h" && cp "/usr/local/cuda-9.0/include/driver_types.h" "$(@D)/cuda/include/driver_types.h" && cp "/usr/local/cuda-9.0/include/dynlink_cuda.h" "$(@D)/cuda/include/dynlink_cuda.h" && cp "/usr/local/cuda-9.0/include/dynlink_cuda_cuda.h" "$(@D)/cuda/include/dynlink_cuda_cuda.h" && cp "/usr/local/cuda-9.0/include/dynlink_cuviddec.h" "$(@D)/cuda/include/dynlink_cuviddec.h" && cp "/usr/local/cuda-9.0/include/dynlink_nvcuvid.h" "$(@D)/cuda/include/dynlink_nvcuvid.h" && cp "/usr/local/cuda-9.0/include/fatBinaryCtl.h" "$(@D)/cuda/include/fatBinaryCtl.h" && cp "/usr/local/cuda-9.0/include/fatbinary.h" "$(@D)/cuda/include/fatbinary.h" && cp "/usr/local/cuda-9.0/include/host_config.h" "$(@D)/cuda/include/host_config.h" && cp "/usr/local/cuda-9.0/include/host_defines.h" "$(@D)/cuda/include/host_defines.h" && cp "/usr/local/cuda-9.0/include/library_types.h" "$(@D)/cuda/include/library_types.h" && cp "/usr/local/cuda-9.0/include/math_constants.h" "$(@D)/cuda/include/math_constants.h" && cp "/usr/local/cuda-9.0/include/math_functions.h" "$(@D)/cuda/include/math_functions.h" && cp "/usr/local/cuda-9.0/include/math_functions.hpp" "$(@D)/cuda/include/math_functions.hpp" && cp "/usr/local/cuda-9.0/include/math_functions_dbl_ptx3.h" "$(@D)/cuda/include/math_functions_dbl_ptx3.h" && cp "/usr/local/cuda-9.0/include/math_functions_dbl_ptx3.hpp" "$(@D)/cuda/include/math_functions_dbl_ptx3.hpp" && cp "/usr/local/cuda-9.0/include/mma.h" "$(@D)/cuda/include/mma.h" && cp "/usr/local/cuda-9.0/include/npp.h" "$(@D)/cuda/include/npp.h" && cp "/usr/local/cuda-9.0/include/nppcore.h" "$(@D)/cuda/include/nppcore.h" && cp "/usr/local/cuda-9.0/include/nppdefs.h" "$(@D)/cuda/include/nppdefs.h" && cp "/usr/local/cuda-9.0/include/nppi.h" "$(@D)/cuda/include/nppi.h" && cp "/usr/local/cuda-9.0/include/nppi_arithmetic_and_logical_operations.h" "$(@D)/cuda/include/nppi_arithmetic_and_logical_operations.h" && cp "/usr/local/cuda-9.0/include/nppi_color_conversion.h" "$(@D)/cuda/include/nppi_color_conversion.h" && cp "/usr/local/cuda-9.0/include/nppi_compression_functions.h" "$(@D)/cuda/include/nppi_compression_functions.h" && cp "/usr/local/cuda-9.0/include/nppi_computer_vision.h" "$(@D)/cuda/include/nppi_computer_vision.h" && cp "/usr/local/cuda-9.0/include/nppi_data_exchange_and_initialization.h" "$(@D)/cuda/include/nppi_data_exchange_and_initialization.h" && cp "/usr/local/cuda-9.0/include/nppi_filtering_functions.h" "$(@D)/cuda/include/nppi_filtering_functions.h" && cp "/usr/local/cuda-9.0/include/nppi_geometry_transforms.h" "$(@D)/cuda/include/nppi_geometry_transforms.h" && cp "/usr/local/cuda-9.0/include/nppi_linear_transforms.h" "$(@D)/cuda/include/nppi_linear_transforms.h" && cp "/usr/local/cuda-9.0/include/nppi_morphological_operations.h" "$(@D)/cuda/include/nppi_morphological_operations.h" && cp "/usr/local/cuda-9.0/include/nppi_statistics_functions.h" "$(@D)/cuda/include/nppi_statistics_functions.h" && cp "/usr/local/cuda-9.0/include/nppi_support_functions.h" "$(@D)/cuda/include/nppi_support_functions.h" && cp "/usr/local/cuda-9.0/include/nppi_threshold_and_compare_operations.h" "$(@D)/cuda/include/nppi_threshold_and_compare_operations.h" && cp "/usr/local/cuda-9.0/include/npps.h" "$(@D)/cuda/include/npps.h" && cp "/usr/local/cuda-9.0/include/npps_arithmetic_and_logical_operations.h" "$(@D)/cuda/include/npps_arithmetic_and_logical_operations.h" && cp "/usr/local/cuda-9.0/include/npps_conversion_functions.h" "$(@D)/cuda/include/npps_conversion_functions.h" && cp "/usr/local/cuda-9.0/include/npps_filtering_functions.h" "$(@D)/cuda/include/npps_filtering_functions.h" && cp "/usr/local/cuda-9.0/include/npps_initialization.h" "$(@D)/cuda/include/npps_initialization.h" && cp "/usr/local/cuda-9.0/include/npps_statistics_functions.h" "$(@D)/cuda/include/npps_statistics_functions.h" && cp "/usr/local/cuda-9.0/include/npps_support_functions.h" "$(@D)/cuda/include/npps_support_functions.h" && cp "/usr/local/cuda-9.0/include/nppversion.h" "$(@D)/cuda/include/nppversion.h" && cp "/usr/local/cuda-9.0/include/nvToolsExt.h" "$(@D)/cuda/include/nvToolsExt.h" && cp "/usr/local/cuda-9.0/include/nvToolsExtCuda.h" "$(@D)/cuda/include/nvToolsExtCuda.h" && cp "/usr/local/cuda-9.0/include/nvToolsExtCudaRt.h" "$(@D)/cuda/include/nvToolsExtCudaRt.h" && cp "/usr/local/cuda-9.0/include/nvToolsExtMeta.h" "$(@D)/cuda/include/nvToolsExtMeta.h" && cp "/usr/local/cuda-9.0/include/nvToolsExtSync.h" "$(@D)/cuda/include/nvToolsExtSync.h" && cp "/usr/local/cuda-9.0/include/nvblas.h" "$(@D)/cuda/include/nvblas.h" && cp "/usr/local/cuda-9.0/include/nvfunctional" "$(@D)/cuda/include/nvfunctional" && cp "/usr/local/cuda-9.0/include/nvgraph.h" "$(@D)/cuda/include/nvgraph.h" && cp "/usr/local/cuda-9.0/include/nvml.h" "$(@D)/cuda/include/nvml.h" && cp "/usr/local/cuda-9.0/include/nvrtc.h" "$(@D)/cuda/include/nvrtc.h" && cp "/usr/local/cuda-9.0/include/sm_20_atomic_functions.h" "$(@D)/cuda/include/sm_20_atomic_functions.h" && cp "/usr/local/cuda-9.0/include/sm_20_atomic_functions.hpp" "$(@D)/cuda/include/sm_20_atomic_functions.hpp" && cp "/usr/local/cuda-9.0/include/sm_20_intrinsics.h" "$(@D)/cuda/include/sm_20_intrinsics.h" && cp "/usr/local/cuda-9.0/include/sm_20_intrinsics.hpp" "$(@D)/cuda/include/sm_20_intrinsics.hpp" && cp "/usr/local/cuda-9.0/include/sm_30_intrinsics.h" "$(@D)/cuda/include/sm_30_intrinsics.h" && cp "/usr/local/cuda-9.0/include/sm_30_intrinsics.hpp" "$(@D)/cuda/include/sm_30_intrinsics.hpp" && cp "/usr/local/cuda-9.0/include/sm_32_atomic_functions.h" "$(@D)/cuda/include/sm_32_atomic_functions.h" && cp "/usr/local/cuda-9.0/include/sm_32_atomic_functions.hpp" "$(@D)/cuda/include/sm_32_atomic_functions.hpp" && cp "/usr/local/cuda-9.0/include/sm_32_intrinsics.h" "$(@D)/cuda/include/sm_32_intrinsics.h" && cp "/usr/local/cuda-9.0/include/sm_32_intrinsics.hpp" "$(@D)/cuda/include/sm_32_intrinsics.hpp" && cp "/usr/local/cuda-9.0/include/sm_35_atomic_functions.h" "$(@D)/cuda/include/sm_35_atomic_functions.h" && cp "/usr/local/cuda-9.0/include/sm_35_intrinsics.h" "$(@D)/cuda/include/sm_35_intrinsics.h" && cp "/usr/local/cuda-9.0/include/sm_60_atomic_functions.h" "$(@D)/cuda/include/sm_60_atomic_functions.h" && cp "/usr/local/cuda-9.0/include/sm_60_atomic_functions.hpp" "$(@D)/cuda/include/sm_60_atomic_functions.hpp" && cp "/usr/local/cuda-9.0/include/sm_61_intrinsics.h" "$(@D)/cuda/include/sm_61_intrinsics.h" && cp "/usr/local/cuda-9.0/include/sm_61_intrinsics.hpp" "$(@D)/cuda/include/sm_61_intrinsics.hpp" && cp "/usr/local/cuda-9.0/include/sobol_direction_vectors.h" "$(@D)/cuda/include/sobol_direction_vectors.h" && cp "/usr/local/cuda-9.0/include/surface_functions.h" "$(@D)/cuda/include/surface_functions.h" && cp "/usr/local/cuda-9.0/include/surface_functions.hpp" "$(@D)/cuda/include/surface_functions.hpp" && cp "/usr/local/cuda-9.0/include/surface_indirect_functions.h" "$(@D)/cuda/include/surface_indirect_functions.h" && cp "/usr/local/cuda-9.0/include/surface_indirect_functions.hpp" "$(@D)/cuda/include/surface_indirect_functions.hpp" && cp "/usr/local/cuda-9.0/include/surface_types.h" "$(@D)/cuda/include/surface_types.h" && cp "/usr/local/cuda-9.0/include/texture_fetch_functions.h" "$(@D)/cuda/include/texture_fetch_functions.h" && cp "/usr/local/cuda-9.0/include/texture_fetch_functions.hpp" "$(@D)/cuda/include/texture_fetch_functions.hpp" && cp "/usr/local/cuda-9.0/include/texture_indirect_functions.h" "$(@D)/cuda/include/texture_indirect_functions.h" && cp "/usr/local/cuda-9.0/include/texture_indirect_functions.hpp" "$(@D)/cuda/include/texture_indirect_functions.hpp" && cp "/usr/local/cuda-9.0/include/texture_types.h" "$(@D)/cuda/include/texture_types.h" && cp "/usr/local/cuda-9.0/include/thrust/adjacent_difference.h" "$(@D)/cuda/include/thrust/adjacent_difference.h" && cp "/usr/local/cuda-9.0/include/thrust/advance.h" "$(@D)/cuda/include/thrust/advance.h" && cp "/usr/local/cuda-9.0/include/thrust/binary_search.h" "$(@D)/cuda/include/thrust/binary_search.h" && cp "/usr/local/cuda-9.0/include/thrust/complex.h" "$(@D)/cuda/include/thrust/complex.h" && cp "/usr/local/cuda-9.0/include/thrust/copy.h" "$(@D)/cuda/include/thrust/copy.h" && cp "/usr/local/cuda-9.0/include/thrust/count.h" "$(@D)/cuda/include/thrust/count.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/adjacent_difference.inl" "$(@D)/cuda/include/thrust/detail/adjacent_difference.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/advance.inl" "$(@D)/cuda/include/thrust/detail/advance.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/allocator_traits.h" "$(@D)/cuda/include/thrust/detail/allocator/allocator_traits.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/allocator_traits.inl" "$(@D)/cuda/include/thrust/detail/allocator/allocator_traits.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/copy_construct_range.h" "$(@D)/cuda/include/thrust/detail/allocator/copy_construct_range.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/copy_construct_range.inl" "$(@D)/cuda/include/thrust/detail/allocator/copy_construct_range.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/default_construct_range.h" "$(@D)/cuda/include/thrust/detail/allocator/default_construct_range.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/default_construct_range.inl" "$(@D)/cuda/include/thrust/detail/allocator/default_construct_range.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/destroy_range.h" "$(@D)/cuda/include/thrust/detail/allocator/destroy_range.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/destroy_range.inl" "$(@D)/cuda/include/thrust/detail/allocator/destroy_range.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/fill_construct_range.h" "$(@D)/cuda/include/thrust/detail/allocator/fill_construct_range.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/fill_construct_range.inl" "$(@D)/cuda/include/thrust/detail/allocator/fill_construct_range.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/malloc_allocator.h" "$(@D)/cuda/include/thrust/detail/allocator/malloc_allocator.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/malloc_allocator.inl" "$(@D)/cuda/include/thrust/detail/allocator/malloc_allocator.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/no_throw_allocator.h" "$(@D)/cuda/include/thrust/detail/allocator/no_throw_allocator.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/tagged_allocator.h" "$(@D)/cuda/include/thrust/detail/allocator/tagged_allocator.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/tagged_allocator.inl" "$(@D)/cuda/include/thrust/detail/allocator/tagged_allocator.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/temporary_allocator.h" "$(@D)/cuda/include/thrust/detail/allocator/temporary_allocator.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/allocator/temporary_allocator.inl" "$(@D)/cuda/include/thrust/detail/allocator/temporary_allocator.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/binary_search.inl" "$(@D)/cuda/include/thrust/detail/binary_search.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/arithmetic.h" "$(@D)/cuda/include/thrust/detail/complex/arithmetic.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/c99math.h" "$(@D)/cuda/include/thrust/detail/complex/c99math.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/catrig.h" "$(@D)/cuda/include/thrust/detail/complex/catrig.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/catrigf.h" "$(@D)/cuda/include/thrust/detail/complex/catrigf.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/ccosh.h" "$(@D)/cuda/include/thrust/detail/complex/ccosh.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/ccoshf.h" "$(@D)/cuda/include/thrust/detail/complex/ccoshf.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/cexp.h" "$(@D)/cuda/include/thrust/detail/complex/cexp.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/cexpf.h" "$(@D)/cuda/include/thrust/detail/complex/cexpf.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/clog.h" "$(@D)/cuda/include/thrust/detail/complex/clog.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/clogf.h" "$(@D)/cuda/include/thrust/detail/complex/clogf.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/complex.inl" "$(@D)/cuda/include/thrust/detail/complex/complex.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/cpow.h" "$(@D)/cuda/include/thrust/detail/complex/cpow.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/cpowf.h" "$(@D)/cuda/include/thrust/detail/complex/cpowf.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/cproj.h" "$(@D)/cuda/include/thrust/detail/complex/cproj.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/csinh.h" "$(@D)/cuda/include/thrust/detail/complex/csinh.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/csinhf.h" "$(@D)/cuda/include/thrust/detail/complex/csinhf.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/csqrt.h" "$(@D)/cuda/include/thrust/detail/complex/csqrt.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/csqrtf.h" "$(@D)/cuda/include/thrust/detail/complex/csqrtf.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/ctanh.h" "$(@D)/cuda/include/thrust/detail/complex/ctanh.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/ctanhf.h" "$(@D)/cuda/include/thrust/detail/complex/ctanhf.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/math_private.h" "$(@D)/cuda/include/thrust/detail/complex/math_private.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/complex/stream.h" "$(@D)/cuda/include/thrust/detail/complex/stream.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/config.h" "$(@D)/cuda/include/thrust/detail/config.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/config/compiler.h" "$(@D)/cuda/include/thrust/detail/config/compiler.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/config/compiler_fence.h" "$(@D)/cuda/include/thrust/detail/config/compiler_fence.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/config/config.h" "$(@D)/cuda/include/thrust/detail/config/config.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/config/debug.h" "$(@D)/cuda/include/thrust/detail/config/debug.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/config/device_system.h" "$(@D)/cuda/include/thrust/detail/config/device_system.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/config/exec_check_disable.h" "$(@D)/cuda/include/thrust/detail/config/exec_check_disable.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/config/forceinline.h" "$(@D)/cuda/include/thrust/detail/config/forceinline.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/config/global_workarounds.h" "$(@D)/cuda/include/thrust/detail/config/global_workarounds.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/config/host_device.h" "$(@D)/cuda/include/thrust/detail/config/host_device.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/config/host_system.h" "$(@D)/cuda/include/thrust/detail/config/host_system.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/config/simple_defines.h" "$(@D)/cuda/include/thrust/detail/config/simple_defines.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/contiguous_storage.h" "$(@D)/cuda/include/thrust/detail/contiguous_storage.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/contiguous_storage.inl" "$(@D)/cuda/include/thrust/detail/contiguous_storage.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/copy.h" "$(@D)/cuda/include/thrust/detail/copy.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/copy.inl" "$(@D)/cuda/include/thrust/detail/copy.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/copy_if.h" "$(@D)/cuda/include/thrust/detail/copy_if.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/copy_if.inl" "$(@D)/cuda/include/thrust/detail/copy_if.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/count.inl" "$(@D)/cuda/include/thrust/detail/count.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/cstdint.h" "$(@D)/cuda/include/thrust/detail/cstdint.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/device_delete.inl" "$(@D)/cuda/include/thrust/detail/device_delete.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/device_free.inl" "$(@D)/cuda/include/thrust/detail/device_free.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/device_malloc.inl" "$(@D)/cuda/include/thrust/detail/device_malloc.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/device_new.inl" "$(@D)/cuda/include/thrust/detail/device_new.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/device_ptr.inl" "$(@D)/cuda/include/thrust/detail/device_ptr.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/device_reference.inl" "$(@D)/cuda/include/thrust/detail/device_reference.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/device_vector.inl" "$(@D)/cuda/include/thrust/detail/device_vector.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/dispatch/is_trivial_copy.h" "$(@D)/cuda/include/thrust/detail/dispatch/is_trivial_copy.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/distance.inl" "$(@D)/cuda/include/thrust/detail/distance.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/equal.inl" "$(@D)/cuda/include/thrust/detail/equal.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/execute_with_allocator.h" "$(@D)/cuda/include/thrust/detail/execute_with_allocator.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/execution_policy.h" "$(@D)/cuda/include/thrust/detail/execution_policy.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/extrema.inl" "$(@D)/cuda/include/thrust/detail/extrema.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/fill.inl" "$(@D)/cuda/include/thrust/detail/fill.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/find.inl" "$(@D)/cuda/include/thrust/detail/find.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/for_each.inl" "$(@D)/cuda/include/thrust/detail/for_each.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/function.h" "$(@D)/cuda/include/thrust/detail/function.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/functional.inl" "$(@D)/cuda/include/thrust/detail/functional.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/functional/actor.h" "$(@D)/cuda/include/thrust/detail/functional/actor.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/functional/actor.inl" "$(@D)/cuda/include/thrust/detail/functional/actor.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/functional/argument.h" "$(@D)/cuda/include/thrust/detail/functional/argument.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/functional/composite.h" "$(@D)/cuda/include/thrust/detail/functional/composite.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/functional/operators.h" "$(@D)/cuda/include/thrust/detail/functional/operators.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/functional/operators/arithmetic_operators.h" "$(@D)/cuda/include/thrust/detail/functional/operators/arithmetic_operators.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/functional/operators/assignment_operator.h" "$(@D)/cuda/include/thrust/detail/functional/operators/assignment_operator.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/functional/operators/bitwise_operators.h" "$(@D)/cuda/include/thrust/detail/functional/operators/bitwise_operators.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/functional/operators/compound_assignment_operators.h" "$(@D)/cuda/include/thrust/detail/functional/operators/compound_assignment_operators.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/functional/operators/logical_operators.h" "$(@D)/cuda/include/thrust/detail/functional/operators/logical_operators.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/functional/operators/operator_adaptors.h" "$(@D)/cuda/include/thrust/detail/functional/operators/operator_adaptors.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/functional/operators/relational_operators.h" "$(@D)/cuda/include/thrust/detail/functional/operators/relational_operators.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/functional/placeholder.h" "$(@D)/cuda/include/thrust/detail/functional/placeholder.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/functional/value.h" "$(@D)/cuda/include/thrust/detail/functional/value.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/gather.inl" "$(@D)/cuda/include/thrust/detail/gather.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/generate.inl" "$(@D)/cuda/include/thrust/detail/generate.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/get_iterator_value.h" "$(@D)/cuda/include/thrust/detail/get_iterator_value.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/host_vector.inl" "$(@D)/cuda/include/thrust/detail/host_vector.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/inner_product.inl" "$(@D)/cuda/include/thrust/detail/inner_product.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/integer_math.h" "$(@D)/cuda/include/thrust/detail/integer_math.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/integer_traits.h" "$(@D)/cuda/include/thrust/detail/integer_traits.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/internal_functional.h" "$(@D)/cuda/include/thrust/detail/internal_functional.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/logical.inl" "$(@D)/cuda/include/thrust/detail/logical.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/malloc_and_free.h" "$(@D)/cuda/include/thrust/detail/malloc_and_free.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/merge.inl" "$(@D)/cuda/include/thrust/detail/merge.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/minmax.h" "$(@D)/cuda/include/thrust/detail/minmax.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/mismatch.inl" "$(@D)/cuda/include/thrust/detail/mismatch.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/mpl/math.h" "$(@D)/cuda/include/thrust/detail/mpl/math.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/numeric_traits.h" "$(@D)/cuda/include/thrust/detail/numeric_traits.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/overlapped_copy.h" "$(@D)/cuda/include/thrust/detail/overlapped_copy.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/pair.inl" "$(@D)/cuda/include/thrust/detail/pair.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/partition.inl" "$(@D)/cuda/include/thrust/detail/partition.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/pointer.h" "$(@D)/cuda/include/thrust/detail/pointer.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/pointer.inl" "$(@D)/cuda/include/thrust/detail/pointer.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/range/head_flags.h" "$(@D)/cuda/include/thrust/detail/range/head_flags.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/range/tail_flags.h" "$(@D)/cuda/include/thrust/detail/range/tail_flags.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/raw_pointer_cast.h" "$(@D)/cuda/include/thrust/detail/raw_pointer_cast.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/raw_reference_cast.h" "$(@D)/cuda/include/thrust/detail/raw_reference_cast.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/reduce.inl" "$(@D)/cuda/include/thrust/detail/reduce.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/reference.h" "$(@D)/cuda/include/thrust/detail/reference.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/reference.inl" "$(@D)/cuda/include/thrust/detail/reference.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/reference_forward_declaration.h" "$(@D)/cuda/include/thrust/detail/reference_forward_declaration.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/remove.inl" "$(@D)/cuda/include/thrust/detail/remove.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/replace.inl" "$(@D)/cuda/include/thrust/detail/replace.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/reverse.inl" "$(@D)/cuda/include/thrust/detail/reverse.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/scan.inl" "$(@D)/cuda/include/thrust/detail/scan.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/scatter.inl" "$(@D)/cuda/include/thrust/detail/scatter.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/seq.h" "$(@D)/cuda/include/thrust/detail/seq.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/sequence.inl" "$(@D)/cuda/include/thrust/detail/sequence.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/set_operations.inl" "$(@D)/cuda/include/thrust/detail/set_operations.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/sort.inl" "$(@D)/cuda/include/thrust/detail/sort.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/static_assert.h" "$(@D)/cuda/include/thrust/detail/static_assert.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/static_map.h" "$(@D)/cuda/include/thrust/detail/static_map.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/swap.h" "$(@D)/cuda/include/thrust/detail/swap.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/swap.inl" "$(@D)/cuda/include/thrust/detail/swap.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/swap_ranges.inl" "$(@D)/cuda/include/thrust/detail/swap_ranges.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/tabulate.inl" "$(@D)/cuda/include/thrust/detail/tabulate.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/temporary_array.h" "$(@D)/cuda/include/thrust/detail/temporary_array.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/temporary_array.inl" "$(@D)/cuda/include/thrust/detail/temporary_array.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/temporary_buffer.h" "$(@D)/cuda/include/thrust/detail/temporary_buffer.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/transform.inl" "$(@D)/cuda/include/thrust/detail/transform.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/transform_reduce.inl" "$(@D)/cuda/include/thrust/detail/transform_reduce.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/transform_scan.inl" "$(@D)/cuda/include/thrust/detail/transform_scan.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/trivial_sequence.h" "$(@D)/cuda/include/thrust/detail/trivial_sequence.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/tuple.inl" "$(@D)/cuda/include/thrust/detail/tuple.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/tuple_meta_transform.h" "$(@D)/cuda/include/thrust/detail/tuple_meta_transform.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/tuple_transform.h" "$(@D)/cuda/include/thrust/detail/tuple_transform.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/type_traits.h" "$(@D)/cuda/include/thrust/detail/type_traits.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/type_traits/algorithm/intermediate_type_from_function_and_iterators.h" "$(@D)/cuda/include/thrust/detail/type_traits/algorithm/intermediate_type_from_function_and_iterators.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/type_traits/function_traits.h" "$(@D)/cuda/include/thrust/detail/type_traits/function_traits.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/type_traits/has_member_function.h" "$(@D)/cuda/include/thrust/detail/type_traits/has_member_function.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/type_traits/has_nested_type.h" "$(@D)/cuda/include/thrust/detail/type_traits/has_nested_type.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/type_traits/has_trivial_assign.h" "$(@D)/cuda/include/thrust/detail/type_traits/has_trivial_assign.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/type_traits/is_call_possible.h" "$(@D)/cuda/include/thrust/detail/type_traits/is_call_possible.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/type_traits/is_metafunction_defined.h" "$(@D)/cuda/include/thrust/detail/type_traits/is_metafunction_defined.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/type_traits/iterator/is_discard_iterator.h" "$(@D)/cuda/include/thrust/detail/type_traits/iterator/is_discard_iterator.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/type_traits/iterator/is_output_iterator.h" "$(@D)/cuda/include/thrust/detail/type_traits/iterator/is_output_iterator.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/type_traits/minimum_type.h" "$(@D)/cuda/include/thrust/detail/type_traits/minimum_type.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/type_traits/pointer_traits.h" "$(@D)/cuda/include/thrust/detail/type_traits/pointer_traits.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/type_traits/result_of_adaptable_function.h" "$(@D)/cuda/include/thrust/detail/type_traits/result_of_adaptable_function.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/uninitialized_copy.inl" "$(@D)/cuda/include/thrust/detail/uninitialized_copy.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/uninitialized_fill.inl" "$(@D)/cuda/include/thrust/detail/uninitialized_fill.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/unique.inl" "$(@D)/cuda/include/thrust/detail/unique.inl" && cp "/usr/local/cuda-9.0/include/thrust/detail/use_default.h" "$(@D)/cuda/include/thrust/detail/use_default.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/util/align.h" "$(@D)/cuda/include/thrust/detail/util/align.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/util/blocking.h" "$(@D)/cuda/include/thrust/detail/util/blocking.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/vector_base.h" "$(@D)/cuda/include/thrust/detail/vector_base.h" && cp "/usr/local/cuda-9.0/include/thrust/detail/vector_base.inl" "$(@D)/cuda/include/thrust/detail/vector_base.inl" && cp "/usr/local/cuda-9.0/include/thrust/device_allocator.h" "$(@D)/cuda/include/thrust/device_allocator.h" && cp "/usr/local/cuda-9.0/include/thrust/device_delete.h" "$(@D)/cuda/include/thrust/device_delete.h" && cp "/usr/local/cuda-9.0/include/thrust/device_free.h" "$(@D)/cuda/include/thrust/device_free.h" && cp "/usr/local/cuda-9.0/include/thrust/device_malloc.h" "$(@D)/cuda/include/thrust/device_malloc.h" && cp "/usr/local/cuda-9.0/include/thrust/device_malloc_allocator.h" "$(@D)/cuda/include/thrust/device_malloc_allocator.h" && cp "/usr/local/cuda-9.0/include/thrust/device_new.h" "$(@D)/cuda/include/thrust/device_new.h" && cp "/usr/local/cuda-9.0/include/thrust/device_new_allocator.h" "$(@D)/cuda/include/thrust/device_new_allocator.h" && cp "/usr/local/cuda-9.0/include/thrust/device_ptr.h" "$(@D)/cuda/include/thrust/device_ptr.h" && cp "/usr/local/cuda-9.0/include/thrust/device_reference.h" "$(@D)/cuda/include/thrust/device_reference.h" && cp "/usr/local/cuda-9.0/include/thrust/device_vector.h" "$(@D)/cuda/include/thrust/device_vector.h" && cp "/usr/local/cuda-9.0/include/thrust/distance.h" "$(@D)/cuda/include/thrust/distance.h" && cp "/usr/local/cuda-9.0/include/thrust/equal.h" "$(@D)/cuda/include/thrust/equal.h" && cp "/usr/local/cuda-9.0/include/thrust/execution_policy.h" "$(@D)/cuda/include/thrust/execution_policy.h" && cp "/usr/local/cuda-9.0/include/thrust/extrema.h" "$(@D)/cuda/include/thrust/extrema.h" && cp "/usr/local/cuda-9.0/include/thrust/fill.h" "$(@D)/cuda/include/thrust/fill.h" && cp "/usr/local/cuda-9.0/include/thrust/find.h" "$(@D)/cuda/include/thrust/find.h" && cp "/usr/local/cuda-9.0/include/thrust/for_each.h" "$(@D)/cuda/include/thrust/for_each.h" && cp "/usr/local/cuda-9.0/include/thrust/functional.h" "$(@D)/cuda/include/thrust/functional.h" && cp "/usr/local/cuda-9.0/include/thrust/gather.h" "$(@D)/cuda/include/thrust/gather.h" && cp "/usr/local/cuda-9.0/include/thrust/generate.h" "$(@D)/cuda/include/thrust/generate.h" && cp "/usr/local/cuda-9.0/include/thrust/host_vector.h" "$(@D)/cuda/include/thrust/host_vector.h" && cp "/usr/local/cuda-9.0/include/thrust/inner_product.h" "$(@D)/cuda/include/thrust/inner_product.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/constant_iterator.h" "$(@D)/cuda/include/thrust/iterator/constant_iterator.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/counting_iterator.h" "$(@D)/cuda/include/thrust/iterator/counting_iterator.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/any_assign.h" "$(@D)/cuda/include/thrust/iterator/detail/any_assign.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/any_system_tag.h" "$(@D)/cuda/include/thrust/iterator/detail/any_system_tag.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/constant_iterator_base.h" "$(@D)/cuda/include/thrust/iterator/detail/constant_iterator_base.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/counting_iterator.inl" "$(@D)/cuda/include/thrust/iterator/detail/counting_iterator.inl" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/device_system_tag.h" "$(@D)/cuda/include/thrust/iterator/detail/device_system_tag.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/discard_iterator_base.h" "$(@D)/cuda/include/thrust/iterator/detail/discard_iterator_base.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/distance_from_result.h" "$(@D)/cuda/include/thrust/iterator/detail/distance_from_result.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/host_system_tag.h" "$(@D)/cuda/include/thrust/iterator/detail/host_system_tag.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/is_iterator_category.h" "$(@D)/cuda/include/thrust/iterator/detail/is_iterator_category.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/is_trivial_iterator.h" "$(@D)/cuda/include/thrust/iterator/detail/is_trivial_iterator.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/iterator_adaptor_base.h" "$(@D)/cuda/include/thrust/iterator/detail/iterator_adaptor_base.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/iterator_category_to_system.h" "$(@D)/cuda/include/thrust/iterator/detail/iterator_category_to_system.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/iterator_category_to_traversal.h" "$(@D)/cuda/include/thrust/iterator/detail/iterator_category_to_traversal.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/iterator_category_with_system_and_traversal.h" "$(@D)/cuda/include/thrust/iterator/detail/iterator_category_with_system_and_traversal.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/iterator_facade_category.h" "$(@D)/cuda/include/thrust/iterator/detail/iterator_facade_category.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/iterator_traits.inl" "$(@D)/cuda/include/thrust/iterator/detail/iterator_traits.inl" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/iterator_traversal_tags.h" "$(@D)/cuda/include/thrust/iterator/detail/iterator_traversal_tags.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/join_iterator.h" "$(@D)/cuda/include/thrust/iterator/detail/join_iterator.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/minimum_category.h" "$(@D)/cuda/include/thrust/iterator/detail/minimum_category.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/minimum_system.h" "$(@D)/cuda/include/thrust/iterator/detail/minimum_system.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/normal_iterator.h" "$(@D)/cuda/include/thrust/iterator/detail/normal_iterator.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/permutation_iterator_base.h" "$(@D)/cuda/include/thrust/iterator/detail/permutation_iterator_base.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/retag.h" "$(@D)/cuda/include/thrust/iterator/detail/retag.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/reverse_iterator.inl" "$(@D)/cuda/include/thrust/iterator/detail/reverse_iterator.inl" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/reverse_iterator_base.h" "$(@D)/cuda/include/thrust/iterator/detail/reverse_iterator_base.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/tagged_iterator.h" "$(@D)/cuda/include/thrust/iterator/detail/tagged_iterator.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/transform_iterator.inl" "$(@D)/cuda/include/thrust/iterator/detail/transform_iterator.inl" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/transform_output_iterator.inl" "$(@D)/cuda/include/thrust/iterator/detail/transform_output_iterator.inl" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/tuple_of_iterator_references.h" "$(@D)/cuda/include/thrust/iterator/detail/tuple_of_iterator_references.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/universal_categories.h" "$(@D)/cuda/include/thrust/iterator/detail/universal_categories.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/zip_iterator.inl" "$(@D)/cuda/include/thrust/iterator/detail/zip_iterator.inl" && cp "/usr/local/cuda-9.0/include/thrust/iterator/detail/zip_iterator_base.h" "$(@D)/cuda/include/thrust/iterator/detail/zip_iterator_base.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/discard_iterator.h" "$(@D)/cuda/include/thrust/iterator/discard_iterator.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/iterator_adaptor.h" "$(@D)/cuda/include/thrust/iterator/iterator_adaptor.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/iterator_categories.h" "$(@D)/cuda/include/thrust/iterator/iterator_categories.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/iterator_facade.h" "$(@D)/cuda/include/thrust/iterator/iterator_facade.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/iterator_traits.h" "$(@D)/cuda/include/thrust/iterator/iterator_traits.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/permutation_iterator.h" "$(@D)/cuda/include/thrust/iterator/permutation_iterator.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/retag.h" "$(@D)/cuda/include/thrust/iterator/retag.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/reverse_iterator.h" "$(@D)/cuda/include/thrust/iterator/reverse_iterator.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/transform_iterator.h" "$(@D)/cuda/include/thrust/iterator/transform_iterator.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/transform_output_iterator.h" "$(@D)/cuda/include/thrust/iterator/transform_output_iterator.h" && cp "/usr/local/cuda-9.0/include/thrust/iterator/zip_iterator.h" "$(@D)/cuda/include/thrust/iterator/zip_iterator.h" && cp "/usr/local/cuda-9.0/include/thrust/logical.h" "$(@D)/cuda/include/thrust/logical.h" && cp "/usr/local/cuda-9.0/include/thrust/memory.h" "$(@D)/cuda/include/thrust/memory.h" && cp "/usr/local/cuda-9.0/include/thrust/merge.h" "$(@D)/cuda/include/thrust/merge.h" && cp "/usr/local/cuda-9.0/include/thrust/mismatch.h" "$(@D)/cuda/include/thrust/mismatch.h" && cp "/usr/local/cuda-9.0/include/thrust/pair.h" "$(@D)/cuda/include/thrust/pair.h" && cp "/usr/local/cuda-9.0/include/thrust/partition.h" "$(@D)/cuda/include/thrust/partition.h" && cp "/usr/local/cuda-9.0/include/thrust/random.h" "$(@D)/cuda/include/thrust/random.h" && cp "/usr/local/cuda-9.0/include/thrust/random/detail/discard_block_engine.inl" "$(@D)/cuda/include/thrust/random/detail/discard_block_engine.inl" && cp "/usr/local/cuda-9.0/include/thrust/random/detail/linear_congruential_engine.inl" "$(@D)/cuda/include/thrust/random/detail/linear_congruential_engine.inl" && cp "/usr/local/cuda-9.0/include/thrust/random/detail/linear_congruential_engine_discard.h" "$(@D)/cuda/include/thrust/random/detail/linear_congruential_engine_discard.h" && cp "/usr/local/cuda-9.0/include/thrust/random/detail/linear_feedback_shift_engine.inl" "$(@D)/cuda/include/thrust/random/detail/linear_feedback_shift_engine.inl" && cp "/usr/local/cuda-9.0/include/thrust/random/detail/linear_feedback_shift_engine_wordmask.h" "$(@D)/cuda/include/thrust/random/detail/linear_feedback_shift_engine_wordmask.h" && cp "/usr/local/cuda-9.0/include/thrust/random/detail/mod.h" "$(@D)/cuda/include/thrust/random/detail/mod.h" && cp "/usr/local/cuda-9.0/include/thrust/random/detail/normal_distribution.inl" "$(@D)/cuda/include/thrust/random/detail/normal_distribution.inl" && cp "/usr/local/cuda-9.0/include/thrust/random/detail/normal_distribution_base.h" "$(@D)/cuda/include/thrust/random/detail/normal_distribution_base.h" && cp "/usr/local/cuda-9.0/include/thrust/random/detail/random_core_access.h" "$(@D)/cuda/include/thrust/random/detail/random_core_access.h" && cp "/usr/local/cuda-9.0/include/thrust/random/detail/subtract_with_carry_engine.inl" "$(@D)/cuda/include/thrust/random/detail/subtract_with_carry_engine.inl" && cp "/usr/local/cuda-9.0/include/thrust/random/detail/uniform_int_distribution.inl" "$(@D)/cuda/include/thrust/random/detail/uniform_int_distribution.inl" && cp "/usr/local/cuda-9.0/include/thrust/random/detail/uniform_real_distribution.inl" "$(@D)/cuda/include/thrust/random/detail/uniform_real_distribution.inl" && cp "/usr/local/cuda-9.0/include/thrust/random/detail/xor_combine_engine.inl" "$(@D)/cuda/include/thrust/random/detail/xor_combine_engine.inl" && cp "/usr/local/cuda-9.0/include/thrust/random/detail/xor_combine_engine_max.h" "$(@D)/cuda/include/thrust/random/detail/xor_combine_engine_max.h" && cp "/usr/local/cuda-9.0/include/thrust/random/discard_block_engine.h" "$(@D)/cuda/include/thrust/random/discard_block_engine.h" && cp "/usr/local/cuda-9.0/include/thrust/random/linear_congruential_engine.h" "$(@D)/cuda/include/thrust/random/linear_congruential_engine.h" && cp "/usr/local/cuda-9.0/include/thrust/random/linear_feedback_shift_engine.h" "$(@D)/cuda/include/thrust/random/linear_feedback_shift_engine.h" && cp "/usr/local/cuda-9.0/include/thrust/random/normal_distribution.h" "$(@D)/cuda/include/thrust/random/normal_distribution.h" && cp "/usr/local/cuda-9.0/include/thrust/random/subtract_with_carry_engine.h" "$(@D)/cuda/include/thrust/random/subtract_with_carry_engine.h" && cp "/usr/local/cuda-9.0/include/thrust/random/uniform_int_distribution.h" "$(@D)/cuda/include/thrust/random/uniform_int_distribution.h" && cp "/usr/local/cuda-9.0/include/thrust/random/uniform_real_distribution.h" "$(@D)/cuda/include/thrust/random/uniform_real_distribution.h" && cp "/usr/local/cuda-9.0/include/thrust/random/xor_combine_engine.h" "$(@D)/cuda/include/thrust/random/xor_combine_engine.h" && cp "/usr/local/cuda-9.0/include/thrust/reduce.h" "$(@D)/cuda/include/thrust/reduce.h" && cp "/usr/local/cuda-9.0/include/thrust/remove.h" "$(@D)/cuda/include/thrust/remove.h" && cp "/usr/local/cuda-9.0/include/thrust/replace.h" "$(@D)/cuda/include/thrust/replace.h" && cp "/usr/local/cuda-9.0/include/thrust/reverse.h" "$(@D)/cuda/include/thrust/reverse.h" && cp "/usr/local/cuda-9.0/include/thrust/scan.h" "$(@D)/cuda/include/thrust/scan.h" && cp "/usr/local/cuda-9.0/include/thrust/scatter.h" "$(@D)/cuda/include/thrust/scatter.h" && cp "/usr/local/cuda-9.0/include/thrust/sequence.h" "$(@D)/cuda/include/thrust/sequence.h" && cp "/usr/local/cuda-9.0/include/thrust/set_operations.h" "$(@D)/cuda/include/thrust/set_operations.h" && cp "/usr/local/cuda-9.0/include/thrust/sort.h" "$(@D)/cuda/include/thrust/sort.h" && cp "/usr/local/cuda-9.0/include/thrust/swap.h" "$(@D)/cuda/include/thrust/swap.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/adjacent_difference.h" "$(@D)/cuda/include/thrust/system/cpp/detail/adjacent_difference.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/assign_value.h" "$(@D)/cuda/include/thrust/system/cpp/detail/assign_value.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/binary_search.h" "$(@D)/cuda/include/thrust/system/cpp/detail/binary_search.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/copy.h" "$(@D)/cuda/include/thrust/system/cpp/detail/copy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/copy_if.h" "$(@D)/cuda/include/thrust/system/cpp/detail/copy_if.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/count.h" "$(@D)/cuda/include/thrust/system/cpp/detail/count.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/equal.h" "$(@D)/cuda/include/thrust/system/cpp/detail/equal.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/execution_policy.h" "$(@D)/cuda/include/thrust/system/cpp/detail/execution_policy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/extrema.h" "$(@D)/cuda/include/thrust/system/cpp/detail/extrema.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/fill.h" "$(@D)/cuda/include/thrust/system/cpp/detail/fill.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/find.h" "$(@D)/cuda/include/thrust/system/cpp/detail/find.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/for_each.h" "$(@D)/cuda/include/thrust/system/cpp/detail/for_each.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/gather.h" "$(@D)/cuda/include/thrust/system/cpp/detail/gather.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/generate.h" "$(@D)/cuda/include/thrust/system/cpp/detail/generate.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/get_value.h" "$(@D)/cuda/include/thrust/system/cpp/detail/get_value.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/inner_product.h" "$(@D)/cuda/include/thrust/system/cpp/detail/inner_product.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/iter_swap.h" "$(@D)/cuda/include/thrust/system/cpp/detail/iter_swap.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/logical.h" "$(@D)/cuda/include/thrust/system/cpp/detail/logical.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/malloc_and_free.h" "$(@D)/cuda/include/thrust/system/cpp/detail/malloc_and_free.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/memory.inl" "$(@D)/cuda/include/thrust/system/cpp/detail/memory.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/merge.h" "$(@D)/cuda/include/thrust/system/cpp/detail/merge.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/mismatch.h" "$(@D)/cuda/include/thrust/system/cpp/detail/mismatch.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/par.h" "$(@D)/cuda/include/thrust/system/cpp/detail/par.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/partition.h" "$(@D)/cuda/include/thrust/system/cpp/detail/partition.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/reduce.h" "$(@D)/cuda/include/thrust/system/cpp/detail/reduce.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/reduce_by_key.h" "$(@D)/cuda/include/thrust/system/cpp/detail/reduce_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/remove.h" "$(@D)/cuda/include/thrust/system/cpp/detail/remove.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/replace.h" "$(@D)/cuda/include/thrust/system/cpp/detail/replace.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/reverse.h" "$(@D)/cuda/include/thrust/system/cpp/detail/reverse.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/scan.h" "$(@D)/cuda/include/thrust/system/cpp/detail/scan.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/scan_by_key.h" "$(@D)/cuda/include/thrust/system/cpp/detail/scan_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/scatter.h" "$(@D)/cuda/include/thrust/system/cpp/detail/scatter.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/sequence.h" "$(@D)/cuda/include/thrust/system/cpp/detail/sequence.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/set_operations.h" "$(@D)/cuda/include/thrust/system/cpp/detail/set_operations.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/sort.h" "$(@D)/cuda/include/thrust/system/cpp/detail/sort.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/swap_ranges.h" "$(@D)/cuda/include/thrust/system/cpp/detail/swap_ranges.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/tabulate.h" "$(@D)/cuda/include/thrust/system/cpp/detail/tabulate.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/temporary_buffer.h" "$(@D)/cuda/include/thrust/system/cpp/detail/temporary_buffer.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/transform.h" "$(@D)/cuda/include/thrust/system/cpp/detail/transform.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/transform_reduce.h" "$(@D)/cuda/include/thrust/system/cpp/detail/transform_reduce.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/transform_scan.h" "$(@D)/cuda/include/thrust/system/cpp/detail/transform_scan.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/uninitialized_copy.h" "$(@D)/cuda/include/thrust/system/cpp/detail/uninitialized_copy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/uninitialized_fill.h" "$(@D)/cuda/include/thrust/system/cpp/detail/uninitialized_fill.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/unique.h" "$(@D)/cuda/include/thrust/system/cpp/detail/unique.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/unique_by_key.h" "$(@D)/cuda/include/thrust/system/cpp/detail/unique_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/detail/vector.inl" "$(@D)/cuda/include/thrust/system/cpp/detail/vector.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/execution_policy.h" "$(@D)/cuda/include/thrust/system/cpp/execution_policy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/memory.h" "$(@D)/cuda/include/thrust/system/cpp/memory.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cpp/vector.h" "$(@D)/cuda/include/thrust/system/cpp/vector.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/config.h" "$(@D)/cuda/include/thrust/system/cuda/config.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/adjacent_difference.h" "$(@D)/cuda/include/thrust/system/cuda/detail/adjacent_difference.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/assign_value.h" "$(@D)/cuda/include/thrust/system/cuda/detail/assign_value.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/binary_search.h" "$(@D)/cuda/include/thrust/system/cuda/detail/binary_search.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/copy.h" "$(@D)/cuda/include/thrust/system/cuda/detail/copy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/copy_if.h" "$(@D)/cuda/include/thrust/system/cuda/detail/copy_if.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/core/agent_launcher.h" "$(@D)/cuda/include/thrust/system/cuda/detail/core/agent_launcher.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/core/alignment.h" "$(@D)/cuda/include/thrust/system/cuda/detail/core/alignment.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/core/triple_chevron_launch.h" "$(@D)/cuda/include/thrust/system/cuda/detail/core/triple_chevron_launch.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/core/util.h" "$(@D)/cuda/include/thrust/system/cuda/detail/core/util.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/count.h" "$(@D)/cuda/include/thrust/system/cuda/detail/count.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cross_system.h" "$(@D)/cuda/include/thrust/system/cuda/detail/cross_system.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/agent/agent_histogram.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/agent/agent_histogram.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/agent/agent_radix_sort_downsweep.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/agent/agent_radix_sort_downsweep.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/agent/agent_radix_sort_upsweep.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/agent/agent_radix_sort_upsweep.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/agent/agent_reduce.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/agent/agent_reduce.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/agent/agent_reduce_by_key.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/agent/agent_reduce_by_key.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/agent/agent_rle.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/agent/agent_rle.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/agent/agent_scan.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/agent/agent_scan.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/agent/agent_segment_fixup.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/agent/agent_segment_fixup.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/agent/agent_select_if.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/agent/agent_select_if.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/agent/agent_spmv_csrt.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/agent/agent_spmv_csrt.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/agent/agent_spmv_orig.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/agent/agent_spmv_orig.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/agent/agent_spmv_row_based.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/agent/agent_spmv_row_based.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/agent/single_pass_scan_operators.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/agent/single_pass_scan_operators.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/block_adjacent_difference.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/block_adjacent_difference.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/block_discontinuity.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/block_discontinuity.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/block_exchange.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/block_exchange.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/block_histogram.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/block_histogram.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/block_load.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/block_load.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/block_radix_rank.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/block_radix_rank.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/block_radix_sort.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/block_radix_sort.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/block_raking_layout.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/block_raking_layout.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/block_reduce.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/block_reduce.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/block_scan.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/block_scan.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/block_shuffle.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/block_shuffle.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/block_store.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/block_store.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/specializations/block_histogram_atomic.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_histogram_atomic.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/specializations/block_histogram_sort.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_histogram_sort.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/specializations/block_reduce_raking.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_reduce_raking.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/specializations/block_reduce_raking_commutative_only.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_reduce_raking_commutative_only.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/specializations/block_reduce_warp_reductions.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_reduce_warp_reductions.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/specializations/block_scan_raking.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_scan_raking.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/specializations/block_scan_warp_scans.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_scan_warp_scans.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/specializations/block_scan_warp_scans2.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_scan_warp_scans2.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/block/specializations/block_scan_warp_scans3.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/block/specializations/block_scan_warp_scans3.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/cub.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/cub.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/device_histogram.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/device_histogram.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/device_partition.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/device_partition.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/device_radix_sort.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/device_radix_sort.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/device_reduce.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/device_reduce.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/device_run_length_encode.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/device_run_length_encode.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/device_scan.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/device_scan.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/device_segmented_radix_sort.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/device_segmented_radix_sort.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/device_segmented_reduce.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/device_segmented_reduce.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/device_select.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/device_select.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/device_spmv.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/device_spmv.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_histogram.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_histogram.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_radix_sort.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_radix_sort.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_reduce.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_reduce.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_reduce_by_key.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_reduce_by_key.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_rle.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_rle.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_scan.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_scan.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_select_if.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_select_if.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_spmv_csrt.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_spmv_csrt.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_spmv_orig.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_spmv_orig.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_spmv_row_based.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_spmv_row_based.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/grid/grid_barrier.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/grid/grid_barrier.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/grid/grid_even_share.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/grid/grid_even_share.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/grid/grid_mapping.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/grid/grid_mapping.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/grid/grid_queue.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/grid/grid_queue.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/host/mutex.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/host/mutex.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/iterator/arg_index_input_iterator.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/iterator/arg_index_input_iterator.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/iterator/cache_modified_input_iterator.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/iterator/cache_modified_input_iterator.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/iterator/cache_modified_output_iterator.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/iterator/cache_modified_output_iterator.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/iterator/constant_input_iterator.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/iterator/constant_input_iterator.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/iterator/counting_input_iterator.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/iterator/counting_input_iterator.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/iterator/discard_output_iterator.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/iterator/discard_output_iterator.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/iterator/tex_obj_input_iterator.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/iterator/tex_obj_input_iterator.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/iterator/tex_ref_input_iterator.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/iterator/tex_ref_input_iterator.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/iterator/transform_input_iterator.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/iterator/transform_input_iterator.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/thread/thread_load.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/thread/thread_load.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/thread/thread_operators.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/thread/thread_operators.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/thread/thread_reduce.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/thread/thread_reduce.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/thread/thread_scan.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/thread/thread_scan.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/thread/thread_search.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/thread/thread_search.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/thread/thread_store.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/thread/thread_store.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/util_allocator.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/util_allocator.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/util_arch.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/util_arch.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/util_debug.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/util_debug.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/util_device.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/util_device.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/util_macro.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/util_macro.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/util_namespace.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/util_namespace.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/util_ptx.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/util_ptx.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/util_type.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/util_type.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/warp/specializations/warp_reduce_shfl.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/warp/specializations/warp_reduce_shfl.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/warp/specializations/warp_reduce_smem.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/warp/specializations/warp_reduce_smem.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/warp/specializations/warp_scan_shfl.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/warp/specializations/warp_scan_shfl.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/warp/specializations/warp_scan_smem.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/warp/specializations/warp_scan_smem.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/warp/warp_reduce.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/warp/warp_reduce.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/cub/warp/warp_scan.cuh" "$(@D)/cuda/include/thrust/system/cuda/detail/cub/warp/warp_scan.cuh" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/equal.h" "$(@D)/cuda/include/thrust/system/cuda/detail/equal.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/error.inl" "$(@D)/cuda/include/thrust/system/cuda/detail/error.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/execution_policy.h" "$(@D)/cuda/include/thrust/system/cuda/detail/execution_policy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/extrema.h" "$(@D)/cuda/include/thrust/system/cuda/detail/extrema.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/fill.h" "$(@D)/cuda/include/thrust/system/cuda/detail/fill.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/find.h" "$(@D)/cuda/include/thrust/system/cuda/detail/find.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/for_each.h" "$(@D)/cuda/include/thrust/system/cuda/detail/for_each.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/gather.h" "$(@D)/cuda/include/thrust/system/cuda/detail/gather.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/generate.h" "$(@D)/cuda/include/thrust/system/cuda/detail/generate.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/get_value.h" "$(@D)/cuda/include/thrust/system/cuda/detail/get_value.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/guarded_cuda_runtime_api.h" "$(@D)/cuda/include/thrust/system/cuda/detail/guarded_cuda_runtime_api.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/guarded_driver_types.h" "$(@D)/cuda/include/thrust/system/cuda/detail/guarded_driver_types.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/inner_product.h" "$(@D)/cuda/include/thrust/system/cuda/detail/inner_product.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/internal/copy_cross_system.h" "$(@D)/cuda/include/thrust/system/cuda/detail/internal/copy_cross_system.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/internal/copy_device_to_device.h" "$(@D)/cuda/include/thrust/system/cuda/detail/internal/copy_device_to_device.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/iter_swap.h" "$(@D)/cuda/include/thrust/system/cuda/detail/iter_swap.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/logical.h" "$(@D)/cuda/include/thrust/system/cuda/detail/logical.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/malloc_and_free.h" "$(@D)/cuda/include/thrust/system/cuda/detail/malloc_and_free.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/memory.inl" "$(@D)/cuda/include/thrust/system/cuda/detail/memory.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/memory_buffer.h" "$(@D)/cuda/include/thrust/system/cuda/detail/memory_buffer.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/merge.h" "$(@D)/cuda/include/thrust/system/cuda/detail/merge.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/mismatch.h" "$(@D)/cuda/include/thrust/system/cuda/detail/mismatch.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/par.h" "$(@D)/cuda/include/thrust/system/cuda/detail/par.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/par_to_seq.h" "$(@D)/cuda/include/thrust/system/cuda/detail/par_to_seq.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/parallel_for.h" "$(@D)/cuda/include/thrust/system/cuda/detail/parallel_for.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/partition.h" "$(@D)/cuda/include/thrust/system/cuda/detail/partition.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/reduce.h" "$(@D)/cuda/include/thrust/system/cuda/detail/reduce.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/reduce_by_key.h" "$(@D)/cuda/include/thrust/system/cuda/detail/reduce_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/remove.h" "$(@D)/cuda/include/thrust/system/cuda/detail/remove.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/replace.h" "$(@D)/cuda/include/thrust/system/cuda/detail/replace.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/reverse.h" "$(@D)/cuda/include/thrust/system/cuda/detail/reverse.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/scan.h" "$(@D)/cuda/include/thrust/system/cuda/detail/scan.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/scan_by_key.h" "$(@D)/cuda/include/thrust/system/cuda/detail/scan_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/scatter.h" "$(@D)/cuda/include/thrust/system/cuda/detail/scatter.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/sequence.h" "$(@D)/cuda/include/thrust/system/cuda/detail/sequence.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/set_operations.h" "$(@D)/cuda/include/thrust/system/cuda/detail/set_operations.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/sort.h" "$(@D)/cuda/include/thrust/system/cuda/detail/sort.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/swap_ranges.h" "$(@D)/cuda/include/thrust/system/cuda/detail/swap_ranges.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/tabulate.h" "$(@D)/cuda/include/thrust/system/cuda/detail/tabulate.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/temporary_buffer.h" "$(@D)/cuda/include/thrust/system/cuda/detail/temporary_buffer.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/terminate.h" "$(@D)/cuda/include/thrust/system/cuda/detail/terminate.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/transform.h" "$(@D)/cuda/include/thrust/system/cuda/detail/transform.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/transform_reduce.h" "$(@D)/cuda/include/thrust/system/cuda/detail/transform_reduce.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/transform_scan.h" "$(@D)/cuda/include/thrust/system/cuda/detail/transform_scan.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/uninitialized_copy.h" "$(@D)/cuda/include/thrust/system/cuda/detail/uninitialized_copy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/uninitialized_fill.h" "$(@D)/cuda/include/thrust/system/cuda/detail/uninitialized_fill.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/unique.h" "$(@D)/cuda/include/thrust/system/cuda/detail/unique.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/unique_by_key.h" "$(@D)/cuda/include/thrust/system/cuda/detail/unique_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/util.h" "$(@D)/cuda/include/thrust/system/cuda/detail/util.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/detail/vector.inl" "$(@D)/cuda/include/thrust/system/cuda/detail/vector.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/error.h" "$(@D)/cuda/include/thrust/system/cuda/error.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/execution_policy.h" "$(@D)/cuda/include/thrust/system/cuda/execution_policy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/experimental/pinned_allocator.h" "$(@D)/cuda/include/thrust/system/cuda/experimental/pinned_allocator.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/memory.h" "$(@D)/cuda/include/thrust/system/cuda/memory.h" && cp "/usr/local/cuda-9.0/include/thrust/system/cuda/vector.h" "$(@D)/cuda/include/thrust/system/cuda/vector.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/adjacent_difference.h" "$(@D)/cuda/include/thrust/system/detail/adl/adjacent_difference.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/assign_value.h" "$(@D)/cuda/include/thrust/system/detail/adl/assign_value.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/binary_search.h" "$(@D)/cuda/include/thrust/system/detail/adl/binary_search.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/copy.h" "$(@D)/cuda/include/thrust/system/detail/adl/copy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/copy_if.h" "$(@D)/cuda/include/thrust/system/detail/adl/copy_if.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/count.h" "$(@D)/cuda/include/thrust/system/detail/adl/count.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/equal.h" "$(@D)/cuda/include/thrust/system/detail/adl/equal.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/extrema.h" "$(@D)/cuda/include/thrust/system/detail/adl/extrema.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/fill.h" "$(@D)/cuda/include/thrust/system/detail/adl/fill.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/find.h" "$(@D)/cuda/include/thrust/system/detail/adl/find.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/for_each.h" "$(@D)/cuda/include/thrust/system/detail/adl/for_each.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/gather.h" "$(@D)/cuda/include/thrust/system/detail/adl/gather.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/generate.h" "$(@D)/cuda/include/thrust/system/detail/adl/generate.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/get_value.h" "$(@D)/cuda/include/thrust/system/detail/adl/get_value.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/inner_product.h" "$(@D)/cuda/include/thrust/system/detail/adl/inner_product.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/iter_swap.h" "$(@D)/cuda/include/thrust/system/detail/adl/iter_swap.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/logical.h" "$(@D)/cuda/include/thrust/system/detail/adl/logical.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/malloc_and_free.h" "$(@D)/cuda/include/thrust/system/detail/adl/malloc_and_free.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/merge.h" "$(@D)/cuda/include/thrust/system/detail/adl/merge.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/mismatch.h" "$(@D)/cuda/include/thrust/system/detail/adl/mismatch.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/partition.h" "$(@D)/cuda/include/thrust/system/detail/adl/partition.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/reduce.h" "$(@D)/cuda/include/thrust/system/detail/adl/reduce.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/reduce_by_key.h" "$(@D)/cuda/include/thrust/system/detail/adl/reduce_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/remove.h" "$(@D)/cuda/include/thrust/system/detail/adl/remove.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/replace.h" "$(@D)/cuda/include/thrust/system/detail/adl/replace.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/reverse.h" "$(@D)/cuda/include/thrust/system/detail/adl/reverse.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/scan.h" "$(@D)/cuda/include/thrust/system/detail/adl/scan.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/scan_by_key.h" "$(@D)/cuda/include/thrust/system/detail/adl/scan_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/scatter.h" "$(@D)/cuda/include/thrust/system/detail/adl/scatter.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/sequence.h" "$(@D)/cuda/include/thrust/system/detail/adl/sequence.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/set_operations.h" "$(@D)/cuda/include/thrust/system/detail/adl/set_operations.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/sort.h" "$(@D)/cuda/include/thrust/system/detail/adl/sort.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/swap_ranges.h" "$(@D)/cuda/include/thrust/system/detail/adl/swap_ranges.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/tabulate.h" "$(@D)/cuda/include/thrust/system/detail/adl/tabulate.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/temporary_buffer.h" "$(@D)/cuda/include/thrust/system/detail/adl/temporary_buffer.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/transform.h" "$(@D)/cuda/include/thrust/system/detail/adl/transform.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/transform_reduce.h" "$(@D)/cuda/include/thrust/system/detail/adl/transform_reduce.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/transform_scan.h" "$(@D)/cuda/include/thrust/system/detail/adl/transform_scan.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/uninitialized_copy.h" "$(@D)/cuda/include/thrust/system/detail/adl/uninitialized_copy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/uninitialized_fill.h" "$(@D)/cuda/include/thrust/system/detail/adl/uninitialized_fill.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/unique.h" "$(@D)/cuda/include/thrust/system/detail/adl/unique.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/adl/unique_by_key.h" "$(@D)/cuda/include/thrust/system/detail/adl/unique_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/bad_alloc.h" "$(@D)/cuda/include/thrust/system/detail/bad_alloc.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/errno.h" "$(@D)/cuda/include/thrust/system/detail/errno.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/error_category.inl" "$(@D)/cuda/include/thrust/system/detail/error_category.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/error_code.inl" "$(@D)/cuda/include/thrust/system/detail/error_code.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/error_condition.inl" "$(@D)/cuda/include/thrust/system/detail/error_condition.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/adjacent_difference.h" "$(@D)/cuda/include/thrust/system/detail/generic/adjacent_difference.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/adjacent_difference.inl" "$(@D)/cuda/include/thrust/system/detail/generic/adjacent_difference.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/advance.h" "$(@D)/cuda/include/thrust/system/detail/generic/advance.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/advance.inl" "$(@D)/cuda/include/thrust/system/detail/generic/advance.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/binary_search.h" "$(@D)/cuda/include/thrust/system/detail/generic/binary_search.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/binary_search.inl" "$(@D)/cuda/include/thrust/system/detail/generic/binary_search.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/copy.h" "$(@D)/cuda/include/thrust/system/detail/generic/copy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/copy.inl" "$(@D)/cuda/include/thrust/system/detail/generic/copy.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/copy_if.h" "$(@D)/cuda/include/thrust/system/detail/generic/copy_if.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/copy_if.inl" "$(@D)/cuda/include/thrust/system/detail/generic/copy_if.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/count.h" "$(@D)/cuda/include/thrust/system/detail/generic/count.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/count.inl" "$(@D)/cuda/include/thrust/system/detail/generic/count.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/distance.h" "$(@D)/cuda/include/thrust/system/detail/generic/distance.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/distance.inl" "$(@D)/cuda/include/thrust/system/detail/generic/distance.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/equal.h" "$(@D)/cuda/include/thrust/system/detail/generic/equal.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/equal.inl" "$(@D)/cuda/include/thrust/system/detail/generic/equal.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/extrema.h" "$(@D)/cuda/include/thrust/system/detail/generic/extrema.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/extrema.inl" "$(@D)/cuda/include/thrust/system/detail/generic/extrema.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/fill.h" "$(@D)/cuda/include/thrust/system/detail/generic/fill.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/find.h" "$(@D)/cuda/include/thrust/system/detail/generic/find.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/find.inl" "$(@D)/cuda/include/thrust/system/detail/generic/find.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/for_each.h" "$(@D)/cuda/include/thrust/system/detail/generic/for_each.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/gather.h" "$(@D)/cuda/include/thrust/system/detail/generic/gather.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/gather.inl" "$(@D)/cuda/include/thrust/system/detail/generic/gather.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/generate.h" "$(@D)/cuda/include/thrust/system/detail/generic/generate.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/generate.inl" "$(@D)/cuda/include/thrust/system/detail/generic/generate.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/inner_product.h" "$(@D)/cuda/include/thrust/system/detail/generic/inner_product.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/inner_product.inl" "$(@D)/cuda/include/thrust/system/detail/generic/inner_product.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/logical.h" "$(@D)/cuda/include/thrust/system/detail/generic/logical.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/memory.h" "$(@D)/cuda/include/thrust/system/detail/generic/memory.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/memory.inl" "$(@D)/cuda/include/thrust/system/detail/generic/memory.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/merge.h" "$(@D)/cuda/include/thrust/system/detail/generic/merge.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/merge.inl" "$(@D)/cuda/include/thrust/system/detail/generic/merge.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/mismatch.h" "$(@D)/cuda/include/thrust/system/detail/generic/mismatch.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/mismatch.inl" "$(@D)/cuda/include/thrust/system/detail/generic/mismatch.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/partition.h" "$(@D)/cuda/include/thrust/system/detail/generic/partition.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/partition.inl" "$(@D)/cuda/include/thrust/system/detail/generic/partition.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/reduce.h" "$(@D)/cuda/include/thrust/system/detail/generic/reduce.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/reduce.inl" "$(@D)/cuda/include/thrust/system/detail/generic/reduce.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/reduce_by_key.h" "$(@D)/cuda/include/thrust/system/detail/generic/reduce_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/reduce_by_key.inl" "$(@D)/cuda/include/thrust/system/detail/generic/reduce_by_key.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/remove.h" "$(@D)/cuda/include/thrust/system/detail/generic/remove.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/remove.inl" "$(@D)/cuda/include/thrust/system/detail/generic/remove.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/replace.h" "$(@D)/cuda/include/thrust/system/detail/generic/replace.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/replace.inl" "$(@D)/cuda/include/thrust/system/detail/generic/replace.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/reverse.h" "$(@D)/cuda/include/thrust/system/detail/generic/reverse.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/reverse.inl" "$(@D)/cuda/include/thrust/system/detail/generic/reverse.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/scalar/binary_search.h" "$(@D)/cuda/include/thrust/system/detail/generic/scalar/binary_search.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/scalar/binary_search.inl" "$(@D)/cuda/include/thrust/system/detail/generic/scalar/binary_search.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/scan.h" "$(@D)/cuda/include/thrust/system/detail/generic/scan.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/scan.inl" "$(@D)/cuda/include/thrust/system/detail/generic/scan.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/scan_by_key.h" "$(@D)/cuda/include/thrust/system/detail/generic/scan_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/scan_by_key.inl" "$(@D)/cuda/include/thrust/system/detail/generic/scan_by_key.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/scatter.h" "$(@D)/cuda/include/thrust/system/detail/generic/scatter.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/scatter.inl" "$(@D)/cuda/include/thrust/system/detail/generic/scatter.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/select_system.h" "$(@D)/cuda/include/thrust/system/detail/generic/select_system.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/sequence.h" "$(@D)/cuda/include/thrust/system/detail/generic/sequence.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/sequence.inl" "$(@D)/cuda/include/thrust/system/detail/generic/sequence.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/set_operations.h" "$(@D)/cuda/include/thrust/system/detail/generic/set_operations.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/set_operations.inl" "$(@D)/cuda/include/thrust/system/detail/generic/set_operations.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/sort.h" "$(@D)/cuda/include/thrust/system/detail/generic/sort.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/sort.inl" "$(@D)/cuda/include/thrust/system/detail/generic/sort.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/swap_ranges.h" "$(@D)/cuda/include/thrust/system/detail/generic/swap_ranges.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/swap_ranges.inl" "$(@D)/cuda/include/thrust/system/detail/generic/swap_ranges.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/tabulate.h" "$(@D)/cuda/include/thrust/system/detail/generic/tabulate.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/tabulate.inl" "$(@D)/cuda/include/thrust/system/detail/generic/tabulate.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/tag.h" "$(@D)/cuda/include/thrust/system/detail/generic/tag.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/temporary_buffer.h" "$(@D)/cuda/include/thrust/system/detail/generic/temporary_buffer.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/temporary_buffer.inl" "$(@D)/cuda/include/thrust/system/detail/generic/temporary_buffer.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/transform.h" "$(@D)/cuda/include/thrust/system/detail/generic/transform.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/transform.inl" "$(@D)/cuda/include/thrust/system/detail/generic/transform.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/transform_reduce.h" "$(@D)/cuda/include/thrust/system/detail/generic/transform_reduce.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/transform_reduce.inl" "$(@D)/cuda/include/thrust/system/detail/generic/transform_reduce.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/transform_scan.h" "$(@D)/cuda/include/thrust/system/detail/generic/transform_scan.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/transform_scan.inl" "$(@D)/cuda/include/thrust/system/detail/generic/transform_scan.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/type_traits.h" "$(@D)/cuda/include/thrust/system/detail/generic/type_traits.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/uninitialized_copy.h" "$(@D)/cuda/include/thrust/system/detail/generic/uninitialized_copy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/uninitialized_copy.inl" "$(@D)/cuda/include/thrust/system/detail/generic/uninitialized_copy.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/uninitialized_fill.h" "$(@D)/cuda/include/thrust/system/detail/generic/uninitialized_fill.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/uninitialized_fill.inl" "$(@D)/cuda/include/thrust/system/detail/generic/uninitialized_fill.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/unique.h" "$(@D)/cuda/include/thrust/system/detail/generic/unique.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/unique.inl" "$(@D)/cuda/include/thrust/system/detail/generic/unique.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/unique_by_key.h" "$(@D)/cuda/include/thrust/system/detail/generic/unique_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/generic/unique_by_key.inl" "$(@D)/cuda/include/thrust/system/detail/generic/unique_by_key.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/internal/decompose.h" "$(@D)/cuda/include/thrust/system/detail/internal/decompose.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/adjacent_difference.h" "$(@D)/cuda/include/thrust/system/detail/sequential/adjacent_difference.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/assign_value.h" "$(@D)/cuda/include/thrust/system/detail/sequential/assign_value.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/binary_search.h" "$(@D)/cuda/include/thrust/system/detail/sequential/binary_search.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/copy.h" "$(@D)/cuda/include/thrust/system/detail/sequential/copy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/copy.inl" "$(@D)/cuda/include/thrust/system/detail/sequential/copy.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/copy_backward.h" "$(@D)/cuda/include/thrust/system/detail/sequential/copy_backward.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/copy_if.h" "$(@D)/cuda/include/thrust/system/detail/sequential/copy_if.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/count.h" "$(@D)/cuda/include/thrust/system/detail/sequential/count.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/equal.h" "$(@D)/cuda/include/thrust/system/detail/sequential/equal.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/execution_policy.h" "$(@D)/cuda/include/thrust/system/detail/sequential/execution_policy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/extrema.h" "$(@D)/cuda/include/thrust/system/detail/sequential/extrema.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/fill.h" "$(@D)/cuda/include/thrust/system/detail/sequential/fill.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/find.h" "$(@D)/cuda/include/thrust/system/detail/sequential/find.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/for_each.h" "$(@D)/cuda/include/thrust/system/detail/sequential/for_each.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/gather.h" "$(@D)/cuda/include/thrust/system/detail/sequential/gather.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/general_copy.h" "$(@D)/cuda/include/thrust/system/detail/sequential/general_copy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/generate.h" "$(@D)/cuda/include/thrust/system/detail/sequential/generate.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/get_value.h" "$(@D)/cuda/include/thrust/system/detail/sequential/get_value.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/inner_product.h" "$(@D)/cuda/include/thrust/system/detail/sequential/inner_product.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/insertion_sort.h" "$(@D)/cuda/include/thrust/system/detail/sequential/insertion_sort.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/iter_swap.h" "$(@D)/cuda/include/thrust/system/detail/sequential/iter_swap.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/logical.h" "$(@D)/cuda/include/thrust/system/detail/sequential/logical.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/malloc_and_free.h" "$(@D)/cuda/include/thrust/system/detail/sequential/malloc_and_free.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/merge.h" "$(@D)/cuda/include/thrust/system/detail/sequential/merge.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/merge.inl" "$(@D)/cuda/include/thrust/system/detail/sequential/merge.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/mismatch.h" "$(@D)/cuda/include/thrust/system/detail/sequential/mismatch.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/partition.h" "$(@D)/cuda/include/thrust/system/detail/sequential/partition.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/reduce.h" "$(@D)/cuda/include/thrust/system/detail/sequential/reduce.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/reduce_by_key.h" "$(@D)/cuda/include/thrust/system/detail/sequential/reduce_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/remove.h" "$(@D)/cuda/include/thrust/system/detail/sequential/remove.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/replace.h" "$(@D)/cuda/include/thrust/system/detail/sequential/replace.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/reverse.h" "$(@D)/cuda/include/thrust/system/detail/sequential/reverse.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/scan.h" "$(@D)/cuda/include/thrust/system/detail/sequential/scan.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/scan_by_key.h" "$(@D)/cuda/include/thrust/system/detail/sequential/scan_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/scatter.h" "$(@D)/cuda/include/thrust/system/detail/sequential/scatter.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/sequence.h" "$(@D)/cuda/include/thrust/system/detail/sequential/sequence.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/set_operations.h" "$(@D)/cuda/include/thrust/system/detail/sequential/set_operations.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/sort.h" "$(@D)/cuda/include/thrust/system/detail/sequential/sort.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/sort.inl" "$(@D)/cuda/include/thrust/system/detail/sequential/sort.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/stable_merge_sort.h" "$(@D)/cuda/include/thrust/system/detail/sequential/stable_merge_sort.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/stable_merge_sort.inl" "$(@D)/cuda/include/thrust/system/detail/sequential/stable_merge_sort.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/stable_primitive_sort.h" "$(@D)/cuda/include/thrust/system/detail/sequential/stable_primitive_sort.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/stable_primitive_sort.inl" "$(@D)/cuda/include/thrust/system/detail/sequential/stable_primitive_sort.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/stable_radix_sort.h" "$(@D)/cuda/include/thrust/system/detail/sequential/stable_radix_sort.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/stable_radix_sort.inl" "$(@D)/cuda/include/thrust/system/detail/sequential/stable_radix_sort.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/swap_ranges.h" "$(@D)/cuda/include/thrust/system/detail/sequential/swap_ranges.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/tabulate.h" "$(@D)/cuda/include/thrust/system/detail/sequential/tabulate.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/temporary_buffer.h" "$(@D)/cuda/include/thrust/system/detail/sequential/temporary_buffer.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/transform.h" "$(@D)/cuda/include/thrust/system/detail/sequential/transform.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/transform_reduce.h" "$(@D)/cuda/include/thrust/system/detail/sequential/transform_reduce.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/transform_scan.h" "$(@D)/cuda/include/thrust/system/detail/sequential/transform_scan.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/trivial_copy.h" "$(@D)/cuda/include/thrust/system/detail/sequential/trivial_copy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/uninitialized_copy.h" "$(@D)/cuda/include/thrust/system/detail/sequential/uninitialized_copy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/uninitialized_fill.h" "$(@D)/cuda/include/thrust/system/detail/sequential/uninitialized_fill.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/unique.h" "$(@D)/cuda/include/thrust/system/detail/sequential/unique.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/sequential/unique_by_key.h" "$(@D)/cuda/include/thrust/system/detail/sequential/unique_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/detail/system_error.inl" "$(@D)/cuda/include/thrust/system/detail/system_error.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/error_code.h" "$(@D)/cuda/include/thrust/system/error_code.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/adjacent_difference.h" "$(@D)/cuda/include/thrust/system/omp/detail/adjacent_difference.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/assign_value.h" "$(@D)/cuda/include/thrust/system/omp/detail/assign_value.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/binary_search.h" "$(@D)/cuda/include/thrust/system/omp/detail/binary_search.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/copy.h" "$(@D)/cuda/include/thrust/system/omp/detail/copy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/copy.inl" "$(@D)/cuda/include/thrust/system/omp/detail/copy.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/copy_if.h" "$(@D)/cuda/include/thrust/system/omp/detail/copy_if.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/copy_if.inl" "$(@D)/cuda/include/thrust/system/omp/detail/copy_if.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/count.h" "$(@D)/cuda/include/thrust/system/omp/detail/count.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/default_decomposition.h" "$(@D)/cuda/include/thrust/system/omp/detail/default_decomposition.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/default_decomposition.inl" "$(@D)/cuda/include/thrust/system/omp/detail/default_decomposition.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/equal.h" "$(@D)/cuda/include/thrust/system/omp/detail/equal.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/execution_policy.h" "$(@D)/cuda/include/thrust/system/omp/detail/execution_policy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/extrema.h" "$(@D)/cuda/include/thrust/system/omp/detail/extrema.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/fill.h" "$(@D)/cuda/include/thrust/system/omp/detail/fill.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/find.h" "$(@D)/cuda/include/thrust/system/omp/detail/find.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/for_each.h" "$(@D)/cuda/include/thrust/system/omp/detail/for_each.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/for_each.inl" "$(@D)/cuda/include/thrust/system/omp/detail/for_each.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/gather.h" "$(@D)/cuda/include/thrust/system/omp/detail/gather.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/generate.h" "$(@D)/cuda/include/thrust/system/omp/detail/generate.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/get_value.h" "$(@D)/cuda/include/thrust/system/omp/detail/get_value.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/inner_product.h" "$(@D)/cuda/include/thrust/system/omp/detail/inner_product.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/iter_swap.h" "$(@D)/cuda/include/thrust/system/omp/detail/iter_swap.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/logical.h" "$(@D)/cuda/include/thrust/system/omp/detail/logical.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/malloc_and_free.h" "$(@D)/cuda/include/thrust/system/omp/detail/malloc_and_free.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/memory.inl" "$(@D)/cuda/include/thrust/system/omp/detail/memory.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/merge.h" "$(@D)/cuda/include/thrust/system/omp/detail/merge.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/mismatch.h" "$(@D)/cuda/include/thrust/system/omp/detail/mismatch.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/par.h" "$(@D)/cuda/include/thrust/system/omp/detail/par.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/partition.h" "$(@D)/cuda/include/thrust/system/omp/detail/partition.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/partition.inl" "$(@D)/cuda/include/thrust/system/omp/detail/partition.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/reduce.h" "$(@D)/cuda/include/thrust/system/omp/detail/reduce.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/reduce.inl" "$(@D)/cuda/include/thrust/system/omp/detail/reduce.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/reduce_by_key.h" "$(@D)/cuda/include/thrust/system/omp/detail/reduce_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/reduce_by_key.inl" "$(@D)/cuda/include/thrust/system/omp/detail/reduce_by_key.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/reduce_intervals.h" "$(@D)/cuda/include/thrust/system/omp/detail/reduce_intervals.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/reduce_intervals.inl" "$(@D)/cuda/include/thrust/system/omp/detail/reduce_intervals.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/remove.h" "$(@D)/cuda/include/thrust/system/omp/detail/remove.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/remove.inl" "$(@D)/cuda/include/thrust/system/omp/detail/remove.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/replace.h" "$(@D)/cuda/include/thrust/system/omp/detail/replace.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/reverse.h" "$(@D)/cuda/include/thrust/system/omp/detail/reverse.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/scan.h" "$(@D)/cuda/include/thrust/system/omp/detail/scan.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/scan_by_key.h" "$(@D)/cuda/include/thrust/system/omp/detail/scan_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/scatter.h" "$(@D)/cuda/include/thrust/system/omp/detail/scatter.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/sequence.h" "$(@D)/cuda/include/thrust/system/omp/detail/sequence.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/set_operations.h" "$(@D)/cuda/include/thrust/system/omp/detail/set_operations.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/sort.h" "$(@D)/cuda/include/thrust/system/omp/detail/sort.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/sort.inl" "$(@D)/cuda/include/thrust/system/omp/detail/sort.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/swap_ranges.h" "$(@D)/cuda/include/thrust/system/omp/detail/swap_ranges.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/tabulate.h" "$(@D)/cuda/include/thrust/system/omp/detail/tabulate.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/temporary_buffer.h" "$(@D)/cuda/include/thrust/system/omp/detail/temporary_buffer.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/transform.h" "$(@D)/cuda/include/thrust/system/omp/detail/transform.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/transform_reduce.h" "$(@D)/cuda/include/thrust/system/omp/detail/transform_reduce.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/transform_scan.h" "$(@D)/cuda/include/thrust/system/omp/detail/transform_scan.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/uninitialized_copy.h" "$(@D)/cuda/include/thrust/system/omp/detail/uninitialized_copy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/uninitialized_fill.h" "$(@D)/cuda/include/thrust/system/omp/detail/uninitialized_fill.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/unique.h" "$(@D)/cuda/include/thrust/system/omp/detail/unique.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/unique.inl" "$(@D)/cuda/include/thrust/system/omp/detail/unique.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/unique_by_key.h" "$(@D)/cuda/include/thrust/system/omp/detail/unique_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/unique_by_key.inl" "$(@D)/cuda/include/thrust/system/omp/detail/unique_by_key.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/detail/vector.inl" "$(@D)/cuda/include/thrust/system/omp/detail/vector.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/execution_policy.h" "$(@D)/cuda/include/thrust/system/omp/execution_policy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/memory.h" "$(@D)/cuda/include/thrust/system/omp/memory.h" && cp "/usr/local/cuda-9.0/include/thrust/system/omp/vector.h" "$(@D)/cuda/include/thrust/system/omp/vector.h" && cp "/usr/local/cuda-9.0/include/thrust/system/system_error.h" "$(@D)/cuda/include/thrust/system/system_error.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/adjacent_difference.h" "$(@D)/cuda/include/thrust/system/tbb/detail/adjacent_difference.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/assign_value.h" "$(@D)/cuda/include/thrust/system/tbb/detail/assign_value.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/binary_search.h" "$(@D)/cuda/include/thrust/system/tbb/detail/binary_search.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/copy.h" "$(@D)/cuda/include/thrust/system/tbb/detail/copy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/copy.inl" "$(@D)/cuda/include/thrust/system/tbb/detail/copy.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/copy_if.h" "$(@D)/cuda/include/thrust/system/tbb/detail/copy_if.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/copy_if.inl" "$(@D)/cuda/include/thrust/system/tbb/detail/copy_if.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/count.h" "$(@D)/cuda/include/thrust/system/tbb/detail/count.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/equal.h" "$(@D)/cuda/include/thrust/system/tbb/detail/equal.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/execution_policy.h" "$(@D)/cuda/include/thrust/system/tbb/detail/execution_policy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/extrema.h" "$(@D)/cuda/include/thrust/system/tbb/detail/extrema.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/fill.h" "$(@D)/cuda/include/thrust/system/tbb/detail/fill.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/find.h" "$(@D)/cuda/include/thrust/system/tbb/detail/find.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/for_each.h" "$(@D)/cuda/include/thrust/system/tbb/detail/for_each.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/for_each.inl" "$(@D)/cuda/include/thrust/system/tbb/detail/for_each.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/gather.h" "$(@D)/cuda/include/thrust/system/tbb/detail/gather.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/generate.h" "$(@D)/cuda/include/thrust/system/tbb/detail/generate.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/get_value.h" "$(@D)/cuda/include/thrust/system/tbb/detail/get_value.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/inner_product.h" "$(@D)/cuda/include/thrust/system/tbb/detail/inner_product.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/iter_swap.h" "$(@D)/cuda/include/thrust/system/tbb/detail/iter_swap.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/logical.h" "$(@D)/cuda/include/thrust/system/tbb/detail/logical.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/malloc_and_free.h" "$(@D)/cuda/include/thrust/system/tbb/detail/malloc_and_free.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/memory.inl" "$(@D)/cuda/include/thrust/system/tbb/detail/memory.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/merge.h" "$(@D)/cuda/include/thrust/system/tbb/detail/merge.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/merge.inl" "$(@D)/cuda/include/thrust/system/tbb/detail/merge.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/mismatch.h" "$(@D)/cuda/include/thrust/system/tbb/detail/mismatch.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/par.h" "$(@D)/cuda/include/thrust/system/tbb/detail/par.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/partition.h" "$(@D)/cuda/include/thrust/system/tbb/detail/partition.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/partition.inl" "$(@D)/cuda/include/thrust/system/tbb/detail/partition.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/reduce.h" "$(@D)/cuda/include/thrust/system/tbb/detail/reduce.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/reduce.inl" "$(@D)/cuda/include/thrust/system/tbb/detail/reduce.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/reduce_by_key.h" "$(@D)/cuda/include/thrust/system/tbb/detail/reduce_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/reduce_by_key.inl" "$(@D)/cuda/include/thrust/system/tbb/detail/reduce_by_key.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/reduce_intervals.h" "$(@D)/cuda/include/thrust/system/tbb/detail/reduce_intervals.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/remove.h" "$(@D)/cuda/include/thrust/system/tbb/detail/remove.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/remove.inl" "$(@D)/cuda/include/thrust/system/tbb/detail/remove.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/replace.h" "$(@D)/cuda/include/thrust/system/tbb/detail/replace.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/reverse.h" "$(@D)/cuda/include/thrust/system/tbb/detail/reverse.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/scan.h" "$(@D)/cuda/include/thrust/system/tbb/detail/scan.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/scan.inl" "$(@D)/cuda/include/thrust/system/tbb/detail/scan.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/scan_by_key.h" "$(@D)/cuda/include/thrust/system/tbb/detail/scan_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/scatter.h" "$(@D)/cuda/include/thrust/system/tbb/detail/scatter.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/sequence.h" "$(@D)/cuda/include/thrust/system/tbb/detail/sequence.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/set_operations.h" "$(@D)/cuda/include/thrust/system/tbb/detail/set_operations.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/sort.h" "$(@D)/cuda/include/thrust/system/tbb/detail/sort.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/sort.inl" "$(@D)/cuda/include/thrust/system/tbb/detail/sort.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/swap_ranges.h" "$(@D)/cuda/include/thrust/system/tbb/detail/swap_ranges.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/tabulate.h" "$(@D)/cuda/include/thrust/system/tbb/detail/tabulate.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/temporary_buffer.h" "$(@D)/cuda/include/thrust/system/tbb/detail/temporary_buffer.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/transform.h" "$(@D)/cuda/include/thrust/system/tbb/detail/transform.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/transform_reduce.h" "$(@D)/cuda/include/thrust/system/tbb/detail/transform_reduce.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/transform_scan.h" "$(@D)/cuda/include/thrust/system/tbb/detail/transform_scan.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/uninitialized_copy.h" "$(@D)/cuda/include/thrust/system/tbb/detail/uninitialized_copy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/uninitialized_fill.h" "$(@D)/cuda/include/thrust/system/tbb/detail/uninitialized_fill.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/unique.h" "$(@D)/cuda/include/thrust/system/tbb/detail/unique.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/unique.inl" "$(@D)/cuda/include/thrust/system/tbb/detail/unique.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/unique_by_key.h" "$(@D)/cuda/include/thrust/system/tbb/detail/unique_by_key.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/unique_by_key.inl" "$(@D)/cuda/include/thrust/system/tbb/detail/unique_by_key.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/detail/vector.inl" "$(@D)/cuda/include/thrust/system/tbb/detail/vector.inl" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/execution_policy.h" "$(@D)/cuda/include/thrust/system/tbb/execution_policy.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/memory.h" "$(@D)/cuda/include/thrust/system/tbb/memory.h" && cp "/usr/local/cuda-9.0/include/thrust/system/tbb/vector.h" "$(@D)/cuda/include/thrust/system/tbb/vector.h" && cp "/usr/local/cuda-9.0/include/thrust/system_error.h" "$(@D)/cuda/include/thrust/system_error.h" && cp "/usr/local/cuda-9.0/include/thrust/tabulate.h" "$(@D)/cuda/include/thrust/tabulate.h" && cp "/usr/local/cuda-9.0/include/thrust/transform.h" "$(@D)/cuda/include/thrust/transform.h" && cp "/usr/local/cuda-9.0/include/thrust/transform_reduce.h" "$(@D)/cuda/include/thrust/transform_reduce.h" && cp "/usr/local/cuda-9.0/include/thrust/transform_scan.h" "$(@D)/cuda/include/thrust/transform_scan.h" && cp "/usr/local/cuda-9.0/include/thrust/tuple.h" "$(@D)/cuda/include/thrust/tuple.h" && cp "/usr/local/cuda-9.0/include/thrust/uninitialized_copy.h" "$(@D)/cuda/include/thrust/uninitialized_copy.h" && cp "/usr/local/cuda-9.0/include/thrust/uninitialized_fill.h" "$(@D)/cuda/include/thrust/uninitialized_fill.h" && cp "/usr/local/cuda-9.0/include/thrust/unique.h" "$(@D)/cuda/include/thrust/unique.h" && cp "/usr/local/cuda-9.0/include/thrust/version.h" "$(@D)/cuda/include/thrust/version.h" && cp "/usr/local/cuda-9.0/include/vector_functions.h" "$(@D)/cuda/include/vector_functions.h" && cp "/usr/local/cuda-9.0/include/vector_functions.hpp" "$(@D)/cuda/include/vector_functions.hpp" && cp "/usr/local/cuda-9.0/include/vector_types.h" "$(@D)/cuda/include/vector_types.h"
-   """,
-)
-
-genrule(
-    name = "cuda-nvvm",
-    outs = [
-        "cuda/nvvm/bin/cicc",
-        "cuda/nvvm/include/nvvm.h",
-        "cuda/nvvm/lib64/libnvvm.so",
-        "cuda/nvvm/lib64/libnvvm.so.3",
-        "cuda/nvvm/lib64/libnvvm.so.3.2.0",
-        "cuda/nvvm/libdevice/libdevice.10.bc",
-        "cuda/nvvm/libnvvm-samples/CMakeLists.txt",
-        "cuda/nvvm/libnvvm-samples/README.txt",
-        "cuda/nvvm/libnvvm-samples/build.bat",
-        "cuda/nvvm/libnvvm-samples/build.sh",
-        "cuda/nvvm/libnvvm-samples/common/include/DDSWriter.h",
-        "cuda/nvvm/libnvvm-samples/common/include/drvapi_error_string.h",
-        "cuda/nvvm/libnvvm-samples/cuda-c-linking/CMakeLists.txt",
-        "cuda/nvvm/libnvvm-samples/cuda-c-linking/README.txt",
-        "cuda/nvvm/libnvvm-samples/cuda-c-linking/cuda-c-linking.cpp",
-        "cuda/nvvm/libnvvm-samples/cuda-c-linking/math-funcs.cu",
-        "cuda/nvvm/libnvvm-samples/ptxgen/CMakeLists.txt",
-        "cuda/nvvm/libnvvm-samples/ptxgen/README.txt",
-        "cuda/nvvm/libnvvm-samples/ptxgen/ptxgen.c",
-        "cuda/nvvm/libnvvm-samples/simple/CMakeLists.txt",
-        "cuda/nvvm/libnvvm-samples/simple/README.txt",
-        "cuda/nvvm/libnvvm-samples/simple/simple-gpu.ll",
-        "cuda/nvvm/libnvvm-samples/simple/simple-gpu64.ll",
-        "cuda/nvvm/libnvvm-samples/simple/simple.c",
-    ],
-    cmd = """
-if [ -d "$(@D)/extras" ]; then rm $(@D)/extras -drf; fi && if [ -d "$(@D)/include" ]; then rm $(@D)/include -drf; fi && if [ -d "$(@D)/lib" ]; then rm $(@D)/lib -drf; fi && if [ -d "$(@D)/nvvm" ]; then rm $(@D)/nvvm -drf; fi && cp "/usr/local/cuda-9.0/nvvm/bin/cicc" "$(@D)/cuda/nvvm/bin/cicc" && cp "/usr/local/cuda-9.0/nvvm/include/nvvm.h" "$(@D)/cuda/nvvm/include/nvvm.h" && cp "/usr/local/cuda-9.0/nvvm/lib64/libnvvm.so" "$(@D)/cuda/nvvm/lib64/libnvvm.so" && cp "/usr/local/cuda-9.0/nvvm/lib64/libnvvm.so.3" "$(@D)/cuda/nvvm/lib64/libnvvm.so.3" && cp "/usr/local/cuda-9.0/nvvm/lib64/libnvvm.so.3.2.0" "$(@D)/cuda/nvvm/lib64/libnvvm.so.3.2.0" && cp "/usr/local/cuda-9.0/nvvm/libdevice/libdevice.10.bc" "$(@D)/cuda/nvvm/libdevice/libdevice.10.bc" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/CMakeLists.txt" "$(@D)/cuda/nvvm/libnvvm-samples/CMakeLists.txt" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/README.txt" "$(@D)/cuda/nvvm/libnvvm-samples/README.txt" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/build.bat" "$(@D)/cuda/nvvm/libnvvm-samples/build.bat" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/build.sh" "$(@D)/cuda/nvvm/libnvvm-samples/build.sh" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/common/include/DDSWriter.h" "$(@D)/cuda/nvvm/libnvvm-samples/common/include/DDSWriter.h" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/common/include/drvapi_error_string.h" "$(@D)/cuda/nvvm/libnvvm-samples/common/include/drvapi_error_string.h" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/cuda-c-linking/CMakeLists.txt" "$(@D)/cuda/nvvm/libnvvm-samples/cuda-c-linking/CMakeLists.txt" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/cuda-c-linking/README.txt" "$(@D)/cuda/nvvm/libnvvm-samples/cuda-c-linking/README.txt" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/cuda-c-linking/cuda-c-linking.cpp" "$(@D)/cuda/nvvm/libnvvm-samples/cuda-c-linking/cuda-c-linking.cpp" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/cuda-c-linking/math-funcs.cu" "$(@D)/cuda/nvvm/libnvvm-samples/cuda-c-linking/math-funcs.cu" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/ptxgen/CMakeLists.txt" "$(@D)/cuda/nvvm/libnvvm-samples/ptxgen/CMakeLists.txt" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/ptxgen/README.txt" "$(@D)/cuda/nvvm/libnvvm-samples/ptxgen/README.txt" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/ptxgen/ptxgen.c" "$(@D)/cuda/nvvm/libnvvm-samples/ptxgen/ptxgen.c" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/simple/CMakeLists.txt" "$(@D)/cuda/nvvm/libnvvm-samples/simple/CMakeLists.txt" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/simple/README.txt" "$(@D)/cuda/nvvm/libnvvm-samples/simple/README.txt" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/simple/simple-gpu.ll" "$(@D)/cuda/nvvm/libnvvm-samples/simple/simple-gpu.ll" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/simple/simple-gpu64.ll" "$(@D)/cuda/nvvm/libnvvm-samples/simple/simple-gpu64.ll" && cp "/usr/local/cuda-9.0/nvvm/libnvvm-samples/simple/simple.c" "$(@D)/cuda/nvvm/libnvvm-samples/simple/simple.c"
-   """,
-)
-
-genrule(
-    name = "cuda-extras",
-    outs = [
-        "cuda/extras/CUPTI/include/GL/gl.h",
-        "cuda/extras/CUPTI/include/GL/glew.h",
-        "cuda/extras/CUPTI/include/GL/glext.h",
-        "cuda/extras/CUPTI/include/GL/glu.h",
-        "cuda/extras/CUPTI/include/GL/glut.h",
-        "cuda/extras/CUPTI/include/GL/glx.h",
-        "cuda/extras/CUPTI/include/GL/glxext.h",
-        "cuda/extras/CUPTI/include/GL/wglew.h",
-        "cuda/extras/CUPTI/include/GL/wglext.h",
-        "cuda/extras/CUPTI/include/cuda_stdint.h",
-        "cuda/extras/CUPTI/include/cupti.h",
-        "cuda/extras/CUPTI/include/cupti_activity.h",
-        "cuda/extras/CUPTI/include/cupti_callbacks.h",
-        "cuda/extras/CUPTI/include/cupti_driver_cbid.h",
-        "cuda/extras/CUPTI/include/cupti_events.h",
-        "cuda/extras/CUPTI/include/cupti_metrics.h",
-        "cuda/extras/CUPTI/include/cupti_nvtx_cbid.h",
-        "cuda/extras/CUPTI/include/cupti_result.h",
-        "cuda/extras/CUPTI/include/cupti_runtime_cbid.h",
-        "cuda/extras/CUPTI/include/cupti_version.h",
-        "cuda/extras/CUPTI/include/generated_cudaGL_meta.h",
-        "cuda/extras/CUPTI/include/generated_cudaVDPAU_meta.h",
-        "cuda/extras/CUPTI/include/generated_cuda_gl_interop_meta.h",
-        "cuda/extras/CUPTI/include/generated_cuda_meta.h",
-        "cuda/extras/CUPTI/include/generated_cuda_runtime_api_meta.h",
-        "cuda/extras/CUPTI/include/generated_cuda_vdpau_interop_meta.h",
-        "cuda/extras/CUPTI/include/generated_nvtx_meta.h",
-        "cuda/extras/CUPTI/include/openacc/cupti_openacc.h",
-    ],
-    cmd = """
-if [ -d "$(@D)/extras" ]; then rm $(@D)/extras -drf; fi && if [ -d "$(@D)/include" ]; then rm $(@D)/include -drf; fi && if [ -d "$(@D)/lib" ]; then rm $(@D)/lib -drf; fi && if [ -d "$(@D)/nvvm" ]; then rm $(@D)/nvvm -drf; fi && cp "/usr/local/cuda-9.0/extras/CUPTI/include/GL/gl.h" "$(@D)/cuda/extras/CUPTI/include/GL/gl.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/GL/glew.h" "$(@D)/cuda/extras/CUPTI/include/GL/glew.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/GL/glext.h" "$(@D)/cuda/extras/CUPTI/include/GL/glext.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/GL/glu.h" "$(@D)/cuda/extras/CUPTI/include/GL/glu.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/GL/glut.h" "$(@D)/cuda/extras/CUPTI/include/GL/glut.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/GL/glx.h" "$(@D)/cuda/extras/CUPTI/include/GL/glx.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/GL/glxext.h" "$(@D)/cuda/extras/CUPTI/include/GL/glxext.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/GL/wglew.h" "$(@D)/cuda/extras/CUPTI/include/GL/wglew.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/GL/wglext.h" "$(@D)/cuda/extras/CUPTI/include/GL/wglext.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/cuda_stdint.h" "$(@D)/cuda/extras/CUPTI/include/cuda_stdint.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/cupti.h" "$(@D)/cuda/extras/CUPTI/include/cupti.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/cupti_activity.h" "$(@D)/cuda/extras/CUPTI/include/cupti_activity.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/cupti_callbacks.h" "$(@D)/cuda/extras/CUPTI/include/cupti_callbacks.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/cupti_driver_cbid.h" "$(@D)/cuda/extras/CUPTI/include/cupti_driver_cbid.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/cupti_events.h" "$(@D)/cuda/extras/CUPTI/include/cupti_events.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/cupti_metrics.h" "$(@D)/cuda/extras/CUPTI/include/cupti_metrics.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/cupti_nvtx_cbid.h" "$(@D)/cuda/extras/CUPTI/include/cupti_nvtx_cbid.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/cupti_result.h" "$(@D)/cuda/extras/CUPTI/include/cupti_result.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/cupti_runtime_cbid.h" "$(@D)/cuda/extras/CUPTI/include/cupti_runtime_cbid.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/cupti_version.h" "$(@D)/cuda/extras/CUPTI/include/cupti_version.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/generated_cudaGL_meta.h" "$(@D)/cuda/extras/CUPTI/include/generated_cudaGL_meta.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/generated_cudaVDPAU_meta.h" "$(@D)/cuda/extras/CUPTI/include/generated_cudaVDPAU_meta.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/generated_cuda_gl_interop_meta.h" "$(@D)/cuda/extras/CUPTI/include/generated_cuda_gl_interop_meta.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/generated_cuda_meta.h" "$(@D)/cuda/extras/CUPTI/include/generated_cuda_meta.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/generated_cuda_runtime_api_meta.h" "$(@D)/cuda/extras/CUPTI/include/generated_cuda_runtime_api_meta.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/generated_cuda_vdpau_interop_meta.h" "$(@D)/cuda/extras/CUPTI/include/generated_cuda_vdpau_interop_meta.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/generated_nvtx_meta.h" "$(@D)/cuda/extras/CUPTI/include/generated_nvtx_meta.h" && cp "/usr/local/cuda-9.0/extras/CUPTI/include/openacc/cupti_openacc.h" "$(@D)/cuda/extras/CUPTI/include/openacc/cupti_openacc.h"
-   """,
-)
-
-genrule(
-    name = "cuda-lib",
-    outs = [
-        "cuda/lib/libcuda.so",
-        "cuda/lib/libcudart.so.9.0",
-        "cuda/lib/libcudart_static.a",
-        "cuda/lib/libcublas.so.9.0",
-        "cuda/lib/libcusolver.so.9.0",
-        "cuda/lib/libcurand.so.9.0",
-        "cuda/lib/libcufft.so.9.0",
-        "cuda/lib/libcudnn.so.7",
-        "cuda/lib/libcupti.so.9.0",
-    ],
-    cmd = """
-if [ -d "$(@D)/extras" ]; then rm $(@D)/extras -drf; fi && if [ -d "$(@D)/include" ]; then rm $(@D)/include -drf; fi && if [ -d "$(@D)/lib" ]; then rm $(@D)/lib -drf; fi && if [ -d "$(@D)/nvvm" ]; then rm $(@D)/nvvm -drf; fi && cp "/usr/local/cuda-9.0/targets/x86_64-linux/lib/stubs/libcuda.so" "$(@D)/cuda/lib/libcuda.so" && cp "/usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudart.so.9.0" "$(@D)/cuda/lib/libcudart.so.9.0" && cp "/usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudart_static.a" "$(@D)/cuda/lib/libcudart_static.a" && cp "/usr/local/cuda-9.0/targets/x86_64-linux/lib/libcublas.so.9.0" "$(@D)/cuda/lib/libcublas.so.9.0" && cp "/usr/local/cuda-9.0/targets/x86_64-linux/lib/libcusolver.so.9.0" "$(@D)/cuda/lib/libcusolver.so.9.0" && cp "/usr/local/cuda-9.0/targets/x86_64-linux/lib/libcurand.so.9.0" "$(@D)/cuda/lib/libcurand.so.9.0" && cp "/usr/local/cuda-9.0/targets/x86_64-linux/lib/libcufft.so.9.0" "$(@D)/cuda/lib/libcufft.so.9.0" && cp "/usr/lib/x86_64-linux-gnu/libcudnn.so.7" "$(@D)/cuda/lib/libcudnn.so.7" && cp "/usr/local/cuda-9.0/extras/CUPTI/lib64/libcupti.so.9.0" "$(@D)/cuda/lib/libcupti.so.9.0"
-   """,
-)
-
-filegroup(
-    name = "cudnn-include",
-    srcs = [],
-)
diff --git a/third_party/toolchains/gpus/cuda/build_defs.bzl b/third_party/toolchains/gpus/cuda/build_defs.bzl
deleted file mode 100644
index badaf43..0000000
--- a/third_party/toolchains/gpus/cuda/build_defs.bzl
+++ /dev/null
@@ -1,37 +0,0 @@
-# Macros for building CUDA code used with Bazel remote
-# execution service.
-# DO NOT EDIT: automatically generated file
-
-def if_cuda(if_true, if_false = []):
-    """Shorthand for select()'ing on whether we're building with CUDA.
-
-    Returns a select statement which evaluates to if_true if we're building
-    with CUDA enabled.  Otherwise, the select statement evaluates to if_false.
-
-    """
-    return select({
-        "@local_config_cuda//cuda:using_nvcc": if_true,
-        "@local_config_cuda//cuda:using_clang": if_true,
-        "//conditions:default": if_false
-    })
-
-
-def cuda_default_copts():
-    """Default options for all CUDA compilations."""
-    return if_cuda(["-x", "cuda", "-DGOOGLE_CUDA=1"] + ["--cuda-gpu-arch=sm_30"])
-
-
-def cuda_is_configured():
-    """Returns true if CUDA was enabled during the configure process."""
-    return True
-
-def if_cuda_is_configured(x):
-    """Tests if the CUDA was enabled during the configure process.
-
-    Unlike if_cuda(), this does not require that we are building with
-    --config=cuda. Used to allow non-CUDA code to depend on CUDA libraries.
-    """
-    if cuda_is_configured():
-      return x
-    return []
-
diff --git a/third_party/toolchains/gpus/cuda/cuda/cuda_config.h b/third_party/toolchains/gpus/cuda/cuda/cuda_config.h
deleted file mode 100644
index f666227..0000000
--- a/third_party/toolchains/gpus/cuda/cuda/cuda_config.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-==============================================================================*/
-
-// DO NOT EDIT: automatically generated file
-#ifndef CUDA_CUDA_CONFIG_H_
-#define CUDA_CUDA_CONFIG_H_
-
-#define TF_CUDA_CAPABILITIES CudaVersion("3.0")
-
-#define TF_CUDA_VERSION "8.0"
-#define TF_CUDNN_VERSION "5"
-
-#define TF_CUDA_TOOLKIT_PATH "/usr/local/cuda-8.0"
-
-#endif  // CUDA_CUDA_CONFIG_H_
diff --git a/third_party/toolchains/gpus/py/BUILD b/third_party/toolchains/gpus/py/BUILD
deleted file mode 100644
index 2d5ace9..0000000
--- a/third_party/toolchains/gpus/py/BUILD
+++ /dev/null
@@ -1,171 +0,0 @@
-# A build file to configure python remote repository used with Bazel remote
-# execution service
-# DO NOT EDIT: automatically generated BUILD file
-
-licenses(["restricted"])
-
-package(default_visibility = ["//visibility:public"])
-
-cc_library(
-    name = "python_headers",
-    hdrs = [":python_include"],
-    data = select({
-        ":windows": [":python_import_lib"],
-        "//conditions:default": [],
-    }),
-    includes = ["python_include"],
-    linkopts = select({
-        # TODO(pcloudy): Ideally, this should just go into deps after resolving
-        # https://github.com/bazelbuild/bazel/issues/3237,
-        ":windows": ["$(locations :python_import_lib)"],
-        "//conditions:default": [],
-    }),
-)
-
-cc_library(
-    name = "numpy_headers",
-    hdrs = [":numpy_include"],
-    includes = ["numpy_include"],
-)
-
-config_setting(
-    name = "windows",
-    values = {"cpu": "x64_windows"},
-    visibility = ["//visibility:public"],
-)
-
-genrule(
-    name = "python_include",
-    outs = [
-        "python_include/Python-ast.h",
-        "python_include/Python.h",
-        "python_include/abstract.h",
-        "python_include/asdl.h",
-        "python_include/ast.h",
-        "python_include/bitset.h",
-        "python_include/boolobject.h",
-        "python_include/bufferobject.h",
-        "python_include/bytearrayobject.h",
-        "python_include/bytes_methods.h",
-        "python_include/bytesobject.h",
-        "python_include/cStringIO.h",
-        "python_include/cellobject.h",
-        "python_include/ceval.h",
-        "python_include/classobject.h",
-        "python_include/cobject.h",
-        "python_include/code.h",
-        "python_include/codecs.h",
-        "python_include/compile.h",
-        "python_include/complexobject.h",
-        "python_include/datetime.h",
-        "python_include/descrobject.h",
-        "python_include/dictobject.h",
-        "python_include/dtoa.h",
-        "python_include/enumobject.h",
-        "python_include/errcode.h",
-        "python_include/eval.h",
-        "python_include/fileobject.h",
-        "python_include/floatobject.h",
-        "python_include/frameobject.h",
-        "python_include/funcobject.h",
-        "python_include/genobject.h",
-        "python_include/graminit.h",
-        "python_include/grammar.h",
-        "python_include/import.h",
-        "python_include/intobject.h",
-        "python_include/intrcheck.h",
-        "python_include/iterobject.h",
-        "python_include/listobject.h",
-        "python_include/longintrepr.h",
-        "python_include/longobject.h",
-        "python_include/marshal.h",
-        "python_include/memoryobject.h",
-        "python_include/metagrammar.h",
-        "python_include/methodobject.h",
-        "python_include/modsupport.h",
-        "python_include/moduleobject.h",
-        "python_include/node.h",
-        "python_include/object.h",
-        "python_include/objimpl.h",
-        "python_include/opcode.h",
-        "python_include/osdefs.h",
-        "python_include/parsetok.h",
-        "python_include/patchlevel.h",
-        "python_include/pgen.h",
-        "python_include/pgenheaders.h",
-        "python_include/py_curses.h",
-        "python_include/pyarena.h",
-        "python_include/pycapsule.h",
-        "python_include/pyconfig.h",
-        "python_include/pyctype.h",
-        "python_include/pydebug.h",
-        "python_include/pyerrors.h",
-        "python_include/pyexpat.h",
-        "python_include/pyfpe.h",
-        "python_include/pygetopt.h",
-        "python_include/pymacconfig.h",
-        "python_include/pymactoolbox.h",
-        "python_include/pymath.h",
-        "python_include/pymem.h",
-        "python_include/pyport.h",
-        "python_include/pystate.h",
-        "python_include/pystrcmp.h",
-        "python_include/pystrtod.h",
-        "python_include/pythonrun.h",
-        "python_include/pythread.h",
-        "python_include/rangeobject.h",
-        "python_include/setobject.h",
-        "python_include/sliceobject.h",
-        "python_include/stringobject.h",
-        "python_include/structmember.h",
-        "python_include/structseq.h",
-        "python_include/symtable.h",
-        "python_include/sysmodule.h",
-        "python_include/timefuncs.h",
-        "python_include/token.h",
-        "python_include/traceback.h",
-        "python_include/tupleobject.h",
-        "python_include/ucnhash.h",
-        "python_include/unicodeobject.h",
-        "python_include/warnings.h",
-        "python_include/weakrefobject.h",
-    ],
-    cmd = """
-cp "/usr/include/python2.7/Python-ast.h" "$(@D)/python_include/Python-ast.h" && cp "/usr/include/python2.7/Python.h" "$(@D)/python_include/Python.h" && cp "/usr/include/python2.7/abstract.h" "$(@D)/python_include/abstract.h" && cp "/usr/include/python2.7/asdl.h" "$(@D)/python_include/asdl.h" && cp "/usr/include/python2.7/ast.h" "$(@D)/python_include/ast.h" && cp "/usr/include/python2.7/bitset.h" "$(@D)/python_include/bitset.h" && cp "/usr/include/python2.7/boolobject.h" "$(@D)/python_include/boolobject.h" && cp "/usr/include/python2.7/bufferobject.h" "$(@D)/python_include/bufferobject.h" && cp "/usr/include/python2.7/bytearrayobject.h" "$(@D)/python_include/bytearrayobject.h" && cp "/usr/include/python2.7/bytes_methods.h" "$(@D)/python_include/bytes_methods.h" && cp "/usr/include/python2.7/bytesobject.h" "$(@D)/python_include/bytesobject.h" && cp "/usr/include/python2.7/cStringIO.h" "$(@D)/python_include/cStringIO.h" && cp "/usr/include/python2.7/cellobject.h" "$(@D)/python_include/cellobject.h" && cp "/usr/include/python2.7/ceval.h" "$(@D)/python_include/ceval.h" && cp "/usr/include/python2.7/classobject.h" "$(@D)/python_include/classobject.h" && cp "/usr/include/python2.7/cobject.h" "$(@D)/python_include/cobject.h" && cp "/usr/include/python2.7/code.h" "$(@D)/python_include/code.h" && cp "/usr/include/python2.7/codecs.h" "$(@D)/python_include/codecs.h" && cp "/usr/include/python2.7/compile.h" "$(@D)/python_include/compile.h" && cp "/usr/include/python2.7/complexobject.h" "$(@D)/python_include/complexobject.h" && cp "/usr/include/python2.7/datetime.h" "$(@D)/python_include/datetime.h" && cp "/usr/include/python2.7/descrobject.h" "$(@D)/python_include/descrobject.h" && cp "/usr/include/python2.7/dictobject.h" "$(@D)/python_include/dictobject.h" && cp "/usr/include/python2.7/dtoa.h" "$(@D)/python_include/dtoa.h" && cp "/usr/include/python2.7/enumobject.h" "$(@D)/python_include/enumobject.h" && cp "/usr/include/python2.7/errcode.h" "$(@D)/python_include/errcode.h" && cp "/usr/include/python2.7/eval.h" "$(@D)/python_include/eval.h" && cp "/usr/include/python2.7/fileobject.h" "$(@D)/python_include/fileobject.h" && cp "/usr/include/python2.7/floatobject.h" "$(@D)/python_include/floatobject.h" && cp "/usr/include/python2.7/frameobject.h" "$(@D)/python_include/frameobject.h" && cp "/usr/include/python2.7/funcobject.h" "$(@D)/python_include/funcobject.h" && cp "/usr/include/python2.7/genobject.h" "$(@D)/python_include/genobject.h" && cp "/usr/include/python2.7/graminit.h" "$(@D)/python_include/graminit.h" && cp "/usr/include/python2.7/grammar.h" "$(@D)/python_include/grammar.h" && cp "/usr/include/python2.7/import.h" "$(@D)/python_include/import.h" && cp "/usr/include/python2.7/intobject.h" "$(@D)/python_include/intobject.h" && cp "/usr/include/python2.7/intrcheck.h" "$(@D)/python_include/intrcheck.h" && cp "/usr/include/python2.7/iterobject.h" "$(@D)/python_include/iterobject.h" && cp "/usr/include/python2.7/listobject.h" "$(@D)/python_include/listobject.h" && cp "/usr/include/python2.7/longintrepr.h" "$(@D)/python_include/longintrepr.h" && cp "/usr/include/python2.7/longobject.h" "$(@D)/python_include/longobject.h" && cp "/usr/include/python2.7/marshal.h" "$(@D)/python_include/marshal.h" && cp "/usr/include/python2.7/memoryobject.h" "$(@D)/python_include/memoryobject.h" && cp "/usr/include/python2.7/metagrammar.h" "$(@D)/python_include/metagrammar.h" && cp "/usr/include/python2.7/methodobject.h" "$(@D)/python_include/methodobject.h" && cp "/usr/include/python2.7/modsupport.h" "$(@D)/python_include/modsupport.h" && cp "/usr/include/python2.7/moduleobject.h" "$(@D)/python_include/moduleobject.h" && cp "/usr/include/python2.7/node.h" "$(@D)/python_include/node.h" && cp "/usr/include/python2.7/object.h" "$(@D)/python_include/object.h" && cp "/usr/include/python2.7/objimpl.h" "$(@D)/python_include/objimpl.h" && cp "/usr/include/python2.7/opcode.h" "$(@D)/python_include/opcode.h" && cp "/usr/include/python2.7/osdefs.h" "$(@D)/python_include/osdefs.h" && cp "/usr/include/python2.7/parsetok.h" "$(@D)/python_include/parsetok.h" && cp "/usr/include/python2.7/patchlevel.h" "$(@D)/python_include/patchlevel.h" && cp "/usr/include/python2.7/pgen.h" "$(@D)/python_include/pgen.h" && cp "/usr/include/python2.7/pgenheaders.h" "$(@D)/python_include/pgenheaders.h" && cp "/usr/include/python2.7/py_curses.h" "$(@D)/python_include/py_curses.h" && cp "/usr/include/python2.7/pyarena.h" "$(@D)/python_include/pyarena.h" && cp "/usr/include/python2.7/pycapsule.h" "$(@D)/python_include/pycapsule.h" && cp "/usr/include/python2.7/pyconfig.h" "$(@D)/python_include/pyconfig.h" && cp "/usr/include/python2.7/pyctype.h" "$(@D)/python_include/pyctype.h" && cp "/usr/include/python2.7/pydebug.h" "$(@D)/python_include/pydebug.h" && cp "/usr/include/python2.7/pyerrors.h" "$(@D)/python_include/pyerrors.h" && cp "/usr/include/python2.7/pyexpat.h" "$(@D)/python_include/pyexpat.h" && cp "/usr/include/python2.7/pyfpe.h" "$(@D)/python_include/pyfpe.h" && cp "/usr/include/python2.7/pygetopt.h" "$(@D)/python_include/pygetopt.h" && cp "/usr/include/python2.7/pymacconfig.h" "$(@D)/python_include/pymacconfig.h" && cp "/usr/include/python2.7/pymactoolbox.h" "$(@D)/python_include/pymactoolbox.h" && cp "/usr/include/python2.7/pymath.h" "$(@D)/python_include/pymath.h" && cp "/usr/include/python2.7/pymem.h" "$(@D)/python_include/pymem.h" && cp "/usr/include/python2.7/pyport.h" "$(@D)/python_include/pyport.h" && cp "/usr/include/python2.7/pystate.h" "$(@D)/python_include/pystate.h" && cp "/usr/include/python2.7/pystrcmp.h" "$(@D)/python_include/pystrcmp.h" && cp "/usr/include/python2.7/pystrtod.h" "$(@D)/python_include/pystrtod.h" && cp "/usr/include/python2.7/pythonrun.h" "$(@D)/python_include/pythonrun.h" && cp "/usr/include/python2.7/pythread.h" "$(@D)/python_include/pythread.h" && cp "/usr/include/python2.7/rangeobject.h" "$(@D)/python_include/rangeobject.h" && cp "/usr/include/python2.7/setobject.h" "$(@D)/python_include/setobject.h" && cp "/usr/include/python2.7/sliceobject.h" "$(@D)/python_include/sliceobject.h" && cp "/usr/include/python2.7/stringobject.h" "$(@D)/python_include/stringobject.h" && cp "/usr/include/python2.7/structmember.h" "$(@D)/python_include/structmember.h" && cp "/usr/include/python2.7/structseq.h" "$(@D)/python_include/structseq.h" && cp "/usr/include/python2.7/symtable.h" "$(@D)/python_include/symtable.h" && cp "/usr/include/python2.7/sysmodule.h" "$(@D)/python_include/sysmodule.h" && cp "/usr/include/python2.7/timefuncs.h" "$(@D)/python_include/timefuncs.h" && cp "/usr/include/python2.7/token.h" "$(@D)/python_include/token.h" && cp "/usr/include/python2.7/traceback.h" "$(@D)/python_include/traceback.h" && cp "/usr/include/python2.7/tupleobject.h" "$(@D)/python_include/tupleobject.h" && cp "/usr/include/python2.7/ucnhash.h" "$(@D)/python_include/ucnhash.h" && cp "/usr/include/python2.7/unicodeobject.h" "$(@D)/python_include/unicodeobject.h" && cp "/usr/include/python2.7/warnings.h" "$(@D)/python_include/warnings.h" && cp "/usr/include/python2.7/weakrefobject.h" "$(@D)/python_include/weakrefobject.h"
-   """,
-)
-
-genrule(
-    name = "numpy_include",
-    outs = [
-        "numpy_include/numpy/__multiarray_api.h",
-        "numpy_include/numpy/__ufunc_api.h",
-        "numpy_include/numpy/_neighborhood_iterator_imp.h",
-        "numpy_include/numpy/_numpyconfig.h",
-        "numpy_include/numpy/arrayobject.h",
-        "numpy_include/numpy/arrayscalars.h",
-        "numpy_include/numpy/halffloat.h",
-        "numpy_include/numpy/multiarray_api.txt",
-        "numpy_include/numpy/ndarrayobject.h",
-        "numpy_include/numpy/ndarraytypes.h",
-        "numpy_include/numpy/noprefix.h",
-        "numpy_include/numpy/npy_1_7_deprecated_api.h",
-        "numpy_include/numpy/npy_3kcompat.h",
-        "numpy_include/numpy/npy_common.h",
-        "numpy_include/numpy/npy_cpu.h",
-        "numpy_include/numpy/npy_endian.h",
-        "numpy_include/numpy/npy_interrupt.h",
-        "numpy_include/numpy/npy_math.h",
-        "numpy_include/numpy/npy_no_deprecated_api.h",
-        "numpy_include/numpy/npy_os.h",
-        "numpy_include/numpy/numpyconfig.h",
-        "numpy_include/numpy/old_defines.h",
-        "numpy_include/numpy/oldnumeric.h",
-        "numpy_include/numpy/ufunc_api.txt",
-        "numpy_include/numpy/ufuncobject.h",
-        "numpy_include/numpy/utils.h",
-    ],
-    cmd = """
-cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/__multiarray_api.h" "$(@D)/numpy_include/numpy/__multiarray_api.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/__ufunc_api.h" "$(@D)/numpy_include/numpy/__ufunc_api.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/_neighborhood_iterator_imp.h" "$(@D)/numpy_include/numpy/_neighborhood_iterator_imp.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/_numpyconfig.h" "$(@D)/numpy_include/numpy/_numpyconfig.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h" "$(@D)/numpy_include/numpy/arrayobject.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayscalars.h" "$(@D)/numpy_include/numpy/arrayscalars.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/halffloat.h" "$(@D)/numpy_include/numpy/halffloat.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/multiarray_api.txt" "$(@D)/numpy_include/numpy/multiarray_api.txt" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h" "$(@D)/numpy_include/numpy/ndarrayobject.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h" "$(@D)/numpy_include/numpy/ndarraytypes.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/noprefix.h" "$(@D)/numpy_include/numpy/noprefix.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h" "$(@D)/numpy_include/numpy/npy_1_7_deprecated_api.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_3kcompat.h" "$(@D)/numpy_include/numpy/npy_3kcompat.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_common.h" "$(@D)/numpy_include/numpy/npy_common.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_cpu.h" "$(@D)/numpy_include/numpy/npy_cpu.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_endian.h" "$(@D)/numpy_include/numpy/npy_endian.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_interrupt.h" "$(@D)/numpy_include/numpy/npy_interrupt.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_math.h" "$(@D)/numpy_include/numpy/npy_math.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_no_deprecated_api.h" "$(@D)/numpy_include/numpy/npy_no_deprecated_api.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_os.h" "$(@D)/numpy_include/numpy/npy_os.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/numpyconfig.h" "$(@D)/numpy_include/numpy/numpyconfig.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/old_defines.h" "$(@D)/numpy_include/numpy/old_defines.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/oldnumeric.h" "$(@D)/numpy_include/numpy/oldnumeric.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ufunc_api.txt" "$(@D)/numpy_include/numpy/ufunc_api.txt" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ufuncobject.h" "$(@D)/numpy_include/numpy/ufuncobject.h" && cp "/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/utils.h" "$(@D)/numpy_include/numpy/utils.h"
-   """,
-)
diff --git a/third_party/zlib.BUILD b/third_party/zlib.BUILD
deleted file mode 100644
index e8048dd..0000000
--- a/third_party/zlib.BUILD
+++ /dev/null
@@ -1,44 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"])  # BSD/MIT-like license (for zlib)
-
-cc_library(
-    name = "zlib",
-    srcs = [
-        "adler32.c",
-        "compress.c",
-        "crc32.c",
-        "crc32.h",
-        "deflate.c",
-        "deflate.h",
-        "gzclose.c",
-        "gzguts.h",
-        "gzlib.c",
-        "gzread.c",
-        "gzwrite.c",
-        "infback.c",
-        "inffast.c",
-        "inffast.h",
-        "inffixed.h",
-        "inflate.c",
-        "inflate.h",
-        "inftrees.c",
-        "inftrees.h",
-        "trees.c",
-        "trees.h",
-        "uncompr.c",
-        "zconf.h",
-        "zutil.c",
-        "zutil.h",
-    ],
-    hdrs = ["zlib.h"],
-    copts = select({
-        "@org_tensorflow//tensorflow:windows": [],
-        "@org_tensorflow//tensorflow:windows_msvc": [],
-        "//conditions:default": [
-            "-Wno-shift-negative-value",
-            "-DZ_HAVE_UNISTD_H",
-        ],
-    }),
-    includes = ["."],
-)