Copying cuBLAS and cuDNN headers into separate directories.
Make {CUDA|cuDNN} headers available under third_party/gpus/{cuda|cudnn}/ instead of cuda/ PiperOrigin-RevId: 247177891
This commit is contained in:
parent
5309596211
commit
d58b53e19c
@ -57,7 +57,7 @@ limitations under the License.
|
|||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#if GOOGLE_TENSORRT
|
#if GOOGLE_TENSORRT
|
||||||
#include "cuda/include/cuda_runtime_api.h"
|
#include "third_party/gpus/cuda/include/cuda_runtime_api.h"
|
||||||
#include "tensorrt/include/NvInfer.h"
|
#include "tensorrt/include/NvInfer.h"
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
namespace tensorrt {
|
namespace tensorrt {
|
||||||
|
@ -50,8 +50,8 @@ limitations under the License.
|
|||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#if GOOGLE_TENSORRT
|
#if GOOGLE_TENSORRT
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#include "cuda/include/cuda_runtime_api.h"
|
#include "third_party/gpus/cuda/include/cuda_runtime_api.h"
|
||||||
#include "tensorrt/include/NvInfer.h"
|
#include "tensorrt/include/NvInfer.h"
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
|
@ -41,7 +41,7 @@ limitations under the License.
|
|||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#if GOOGLE_TENSORRT
|
#if GOOGLE_TENSORRT
|
||||||
#include "cuda/include/cuda_runtime_api.h"
|
#include "third_party/gpus/cuda/include/cuda_runtime_api.h"
|
||||||
#include "tensorrt/include/NvInfer.h"
|
#include "tensorrt/include/NvInfer.h"
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
|
@ -32,7 +32,7 @@ limitations under the License.
|
|||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#if GOOGLE_TENSORRT
|
#if GOOGLE_TENSORRT
|
||||||
#include "cuda/include/cuda_runtime_api.h"
|
#include "third_party/gpus/cuda/include/cuda_runtime_api.h"
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
namespace tensorrt {
|
namespace tensorrt {
|
||||||
|
@ -20,8 +20,8 @@ limitations under the License.
|
|||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#if GOOGLE_TENSORRT
|
#if GOOGLE_TENSORRT
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#include "cuda/include/cuda_runtime_api.h"
|
#include "third_party/gpus/cuda/include/cuda_runtime_api.h"
|
||||||
#include "tensorrt/include/NvInfer.h"
|
#include "tensorrt/include/NvInfer.h"
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
|
@ -19,7 +19,7 @@ limitations under the License.
|
|||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#if GOOGLE_TENSORRT
|
#if GOOGLE_TENSORRT
|
||||||
#include "cuda/include/cuda_runtime_api.h"
|
#include "third_party/gpus/cuda/include/cuda_runtime_api.h"
|
||||||
#endif // GOOGLE_TENSORRT
|
#endif // GOOGLE_TENSORRT
|
||||||
#endif // GOOGLE_CUDA
|
#endif // GOOGLE_CUDA
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ limitations under the License.
|
|||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#if GOOGLE_TENSORRT
|
#if GOOGLE_TENSORRT
|
||||||
#include "cuda/include/cuda_runtime_api.h"
|
#include "third_party/gpus/cuda/include/cuda_runtime_api.h"
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
namespace tensorrt {
|
namespace tensorrt {
|
||||||
|
@ -25,7 +25,7 @@ limitations under the License.
|
|||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#if GOOGLE_TENSORRT
|
#if GOOGLE_TENSORRT
|
||||||
|
|
||||||
#include "cuda/include/cuda_runtime_api.h"
|
#include "third_party/gpus/cuda/include/cuda_runtime_api.h"
|
||||||
#include "tensorrt/include/NvInfer.h"
|
#include "tensorrt/include/NvInfer.h"
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
|
@ -18,8 +18,8 @@ limitations under the License.
|
|||||||
|
|
||||||
#include <complex>
|
#include <complex>
|
||||||
|
|
||||||
#include "cuda/include/cublas_v2.h"
|
#include "third_party/gpus/cuda/include/cublas_v2.h"
|
||||||
#include "cuda/include/cusolverDn.h"
|
#include "third_party/gpus/cuda/include/cusolverDn.h"
|
||||||
#include "tensorflow/compiler/xla/statusor.h"
|
#include "tensorflow/compiler/xla/statusor.h"
|
||||||
#include "tensorflow/compiler/xla/types.h"
|
#include "tensorflow/compiler/xla/types.h"
|
||||||
#include "tensorflow/compiler/xla/util.h"
|
#include "tensorflow/compiler/xla/util.h"
|
||||||
|
@ -42,7 +42,7 @@ limitations under the License.
|
|||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#include "google/protobuf/duration.pb.h"
|
#include "google/protobuf/duration.pb.h"
|
||||||
#include "absl/time/time.h"
|
#include "absl/time/time.h"
|
||||||
#include "cuda/include/cudnn.h"
|
#include "third_party/gpus/cudnn/cudnn.h"
|
||||||
#include "tensorflow/core/kernels/conv_ops_gpu.h"
|
#include "tensorflow/core/kernels/conv_ops_gpu.h"
|
||||||
#include "tensorflow/core/platform/logger.h"
|
#include "tensorflow/core/platform/logger.h"
|
||||||
#include "tensorflow/core/platform/stream_executor.h"
|
#include "tensorflow/core/platform/stream_executor.h"
|
||||||
|
@ -21,7 +21,7 @@ limitations under the License.
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#define EIGEN_USE_GPU
|
#define EIGEN_USE_GPU
|
||||||
#include "cuda/include/cuda_runtime_api.h"
|
#include "third_party/gpus/cuda/include/cuda_runtime_api.h"
|
||||||
#include "tensorflow/core/framework/op_kernel.h"
|
#include "tensorflow/core/framework/op_kernel.h"
|
||||||
#include "tensorflow/core/platform/stream_executor.h"
|
#include "tensorflow/core/platform/stream_executor.h"
|
||||||
#include "tensorflow/core/util/gpu_launch_config.h"
|
#include "tensorflow/core/util/gpu_launch_config.h"
|
||||||
|
@ -18,7 +18,7 @@ limitations under the License.
|
|||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#if GOOGLE_TENSORRT
|
#if GOOGLE_TENSORRT
|
||||||
#include "cuda/include/cuda_runtime_api.h"
|
#include "third_party/gpus/cuda/include/cuda_runtime_api.h"
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
namespace tensorrt {
|
namespace tensorrt {
|
||||||
|
@ -50,8 +50,8 @@ limitations under the License.
|
|||||||
#include "tensorflow/core/util/device_name_utils.h"
|
#include "tensorflow/core/util/device_name_utils.h"
|
||||||
|
|
||||||
#ifdef GOOGLE_CUDA
|
#ifdef GOOGLE_CUDA
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#include "cuda/include/cuda_runtime_api.h"
|
#include "third_party/gpus/cuda/include/cuda_runtime_api.h"
|
||||||
#endif // GOOGLE_CUDA
|
#endif // GOOGLE_CUDA
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
|
@ -14,7 +14,7 @@ limitations under the License.
|
|||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
|
|
||||||
#ifdef GOOGLE_CUDA
|
#ifdef GOOGLE_CUDA
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#include "tensorflow/stream_executor/cuda/cuda_activation.h"
|
#include "tensorflow/stream_executor/cuda/cuda_activation.h"
|
||||||
#endif // GOOGLE_CUDA
|
#endif // GOOGLE_CUDA
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ limitations under the License.
|
|||||||
|
|
||||||
#if !defined(PLATFORM_GOOGLE)
|
#if !defined(PLATFORM_GOOGLE)
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#include "cuda/cuda_config.h"
|
#include "third_party/gpus/cuda/cuda_config.h"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ limitations under the License.
|
|||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
|
|
||||||
#ifdef GOOGLE_CUDA
|
#ifdef GOOGLE_CUDA
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#define EIGEN_USE_GPU
|
#define EIGEN_USE_GPU
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -34,8 +34,8 @@ limitations under the License.
|
|||||||
#include "tensorflow/core/public/version.h"
|
#include "tensorflow/core/public/version.h"
|
||||||
|
|
||||||
#ifdef GOOGLE_CUDA
|
#ifdef GOOGLE_CUDA
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#include "cuda/include/cuda_runtime_api.h"
|
#include "third_party/gpus/cuda/include/cuda_runtime_api.h"
|
||||||
#endif // GOOGLE_CUDA
|
#endif // GOOGLE_CUDA
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
|
@ -18,9 +18,9 @@ limitations under the License.
|
|||||||
#include "third_party/eigen3/Eigen/Core"
|
#include "third_party/eigen3/Eigen/Core"
|
||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#include "cuda/include/cuda_runtime_api.h"
|
#include "third_party/gpus/cuda/include/cuda_runtime_api.h"
|
||||||
#include "cuda/include/cudnn.h"
|
#include "third_party/gpus/cudnn/cudnn.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if TENSORFLOW_USE_ROCM
|
#if TENSORFLOW_USE_ROCM
|
||||||
|
@ -22,7 +22,7 @@ limitations under the License.
|
|||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
// Needed for CUDA_VERSION macro.
|
// Needed for CUDA_VERSION macro.
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#endif // GOOGLE_CUDA
|
#endif // GOOGLE_CUDA
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
#include "tensorflow/core/kernels/batch_matmul_op_impl.h"
|
#include "tensorflow/core/kernels/batch_matmul_op_impl.h"
|
||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#endif // GOOGLE_CUDA
|
#endif // GOOGLE_CUDA
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
|
@ -25,7 +25,7 @@ limitations under the License.
|
|||||||
#include <limits>
|
#include <limits>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#include "tensorflow/core/framework/register_types.h"
|
#include "tensorflow/core/framework/register_types.h"
|
||||||
#include "tensorflow/core/kernels/conv_2d.h"
|
#include "tensorflow/core/kernels/conv_2d.h"
|
||||||
#include "tensorflow/core/lib/math/math_util.h"
|
#include "tensorflow/core/lib/math/math_util.h"
|
||||||
|
@ -57,7 +57,7 @@ limitations under the License.
|
|||||||
#include "tensorflow/core/util/use_cudnn.h"
|
#include "tensorflow/core/util/use_cudnn.h"
|
||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#include "cuda/include/cudnn.h"
|
#include "third_party/gpus/cudnn/cudnn.h"
|
||||||
#include "tensorflow/core/kernels/conv_ops_gpu.h"
|
#include "tensorflow/core/kernels/conv_ops_gpu.h"
|
||||||
#include "tensorflow/core/platform/stream_executor.h"
|
#include "tensorflow/core/platform/stream_executor.h"
|
||||||
#include "tensorflow/core/util/proto/proto_utils.h"
|
#include "tensorflow/core/util/proto/proto_utils.h"
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "cuda/include/cublas_v2.h"
|
#include "third_party/gpus/cuda/include/cublas_v2.h"
|
||||||
#include "cuda/include/cusolverDn.h"
|
#include "third_party/gpus/cuda/include/cusolverDn.h"
|
||||||
#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h"
|
#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h"
|
||||||
#include "tensorflow/core/framework/op_kernel.h"
|
#include "tensorflow/core/framework/op_kernel.h"
|
||||||
#include "tensorflow/core/framework/types.h"
|
#include "tensorflow/core/framework/types.h"
|
||||||
|
@ -26,8 +26,8 @@ limitations under the License.
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "cuda/include/cublas_v2.h"
|
#include "third_party/gpus/cuda/include/cublas_v2.h"
|
||||||
#include "cuda/include/cusolverDn.h"
|
#include "third_party/gpus/cuda/include/cusolverDn.h"
|
||||||
#include "tensorflow/core/framework/op_kernel.h"
|
#include "tensorflow/core/framework/op_kernel.h"
|
||||||
#include "tensorflow/core/framework/tensor.h"
|
#include "tensorflow/core/framework/tensor.h"
|
||||||
#include "tensorflow/core/lib/core/status.h"
|
#include "tensorflow/core/lib/core/status.h"
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "cuda/include/cusparse.h"
|
#include "third_party/gpus/cuda/include/cusparse.h"
|
||||||
#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h"
|
#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h"
|
||||||
#include "tensorflow/core/framework/op_kernel.h"
|
#include "tensorflow/core/framework/op_kernel.h"
|
||||||
#include "tensorflow/core/framework/types.h"
|
#include "tensorflow/core/framework/types.h"
|
||||||
|
@ -25,7 +25,7 @@ limitations under the License.
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "cuda/include/cusparse.h"
|
#include "third_party/gpus/cuda/include/cusparse.h"
|
||||||
#include "tensorflow/core/framework/op_kernel.h"
|
#include "tensorflow/core/framework/op_kernel.h"
|
||||||
#include "tensorflow/core/framework/tensor.h"
|
#include "tensorflow/core/framework/tensor.h"
|
||||||
#include "tensorflow/core/framework/tensor_types.h"
|
#include "tensorflow/core/framework/tensor_types.h"
|
||||||
|
@ -38,7 +38,7 @@ limitations under the License.
|
|||||||
#include "tensorflow/core/util/work_sharder.h"
|
#include "tensorflow/core/util/work_sharder.h"
|
||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#include "cuda/include/cudnn.h"
|
#include "third_party/gpus/cudnn/cudnn.h"
|
||||||
#include "tensorflow/core/platform/stream_executor.h"
|
#include "tensorflow/core/platform/stream_executor.h"
|
||||||
#endif // GOOGLE_CUDA
|
#endif // GOOGLE_CUDA
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ limitations under the License.
|
|||||||
#include "tensorflow/core/util/work_sharder.h"
|
#include "tensorflow/core/util/work_sharder.h"
|
||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#include "cuda/include/cudnn.h"
|
#include "third_party/gpus/cudnn/cudnn.h"
|
||||||
#include "tensorflow/core/platform/stream_executor.h"
|
#include "tensorflow/core/platform/stream_executor.h"
|
||||||
#endif // GOOGLE_CUDA
|
#endif // GOOGLE_CUDA
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#define EIGEN_USE_GPU
|
#define EIGEN_USE_GPU
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#include "tensorflow/core/kernels/fused_batch_norm_op.h"
|
#include "tensorflow/core/kernels/fused_batch_norm_op.h"
|
||||||
#include "tensorflow/core/util/gpu_kernel_helper.h"
|
#include "tensorflow/core/util/gpu_kernel_helper.h"
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ limitations under the License.
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#include "tensorflow/core/platform/stream_executor.h"
|
#include "tensorflow/core/platform/stream_executor.h"
|
||||||
#include "tensorflow/core/util/stream_executor_util.h"
|
#include "tensorflow/core/util/stream_executor_util.h"
|
||||||
#endif // GOOGLE_CUDA
|
#endif // GOOGLE_CUDA
|
||||||
|
@ -25,7 +25,7 @@ limitations under the License.
|
|||||||
#include "tensorflow/core/kernels/fill_functor.h"
|
#include "tensorflow/core/kernels/fill_functor.h"
|
||||||
#include "tensorflow/core/util/matmul_autotune.h"
|
#include "tensorflow/core/util/matmul_autotune.h"
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#include "tensorflow/core/kernels/gpu_utils.h"
|
#include "tensorflow/core/kernels/gpu_utils.h"
|
||||||
#include "tensorflow/core/platform/stream_executor.h"
|
#include "tensorflow/core/platform/stream_executor.h"
|
||||||
#endif // GOOGLE_CUDA
|
#endif // GOOGLE_CUDA
|
||||||
|
@ -41,7 +41,7 @@ limitations under the License.
|
|||||||
#include "tensorflow/core/util/use_cudnn.h"
|
#include "tensorflow/core/util/use_cudnn.h"
|
||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#include "cuda/include/cudnn.h"
|
#include "third_party/gpus/cudnn/cudnn.h"
|
||||||
#include "tensorflow/core/kernels/maxpooling_op_gpu.h"
|
#include "tensorflow/core/kernels/maxpooling_op_gpu.h"
|
||||||
#include "tensorflow/core/kernels/pooling_ops_common_gpu.h"
|
#include "tensorflow/core/kernels/pooling_ops_common_gpu.h"
|
||||||
#include "tensorflow/core/platform/stream_executor.h"
|
#include "tensorflow/core/platform/stream_executor.h"
|
||||||
|
@ -21,7 +21,7 @@ limitations under the License.
|
|||||||
#include "tensorflow/core/framework/tensor.h"
|
#include "tensorflow/core/framework/tensor.h"
|
||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#include "cuda/include/cudnn.h"
|
#include "third_party/gpus/cudnn/cudnn.h"
|
||||||
#include "tensorflow/core/kernels/conv_2d.h"
|
#include "tensorflow/core/kernels/conv_2d.h"
|
||||||
#include "tensorflow/core/kernels/pooling_ops_common_gpu.h"
|
#include "tensorflow/core/kernels/pooling_ops_common_gpu.h"
|
||||||
#include "tensorflow/core/platform/stream_executor.h"
|
#include "tensorflow/core/platform/stream_executor.h"
|
||||||
|
@ -28,7 +28,7 @@ limitations under the License.
|
|||||||
#include "third_party/cub/iterator/counting_input_iterator.cuh"
|
#include "third_party/cub/iterator/counting_input_iterator.cuh"
|
||||||
#include "third_party/cub/iterator/transform_input_iterator.cuh"
|
#include "third_party/cub/iterator/transform_input_iterator.cuh"
|
||||||
#include "third_party/cub/warp/warp_reduce.cuh"
|
#include "third_party/cub/warp/warp_reduce.cuh"
|
||||||
#include "cuda/include/cuComplex.h"
|
#include "third_party/gpus/cuda/include/cuComplex.h"
|
||||||
#include "tensorflow/core/kernels/reduction_ops.h"
|
#include "tensorflow/core/kernels/reduction_ops.h"
|
||||||
#include "tensorflow/core/lib/core/bits.h"
|
#include "tensorflow/core/lib/core/bits.h"
|
||||||
#include "tensorflow/core/util/gpu_device_functions.h"
|
#include "tensorflow/core/util/gpu_device_functions.h"
|
||||||
|
@ -29,7 +29,7 @@ limitations under the License.
|
|||||||
#include "third_party/cub/block/block_store.cuh"
|
#include "third_party/cub/block/block_store.cuh"
|
||||||
#include "third_party/cub/iterator/counting_input_iterator.cuh"
|
#include "third_party/cub/iterator/counting_input_iterator.cuh"
|
||||||
#include "third_party/cub/iterator/transform_input_iterator.cuh"
|
#include "third_party/cub/iterator/transform_input_iterator.cuh"
|
||||||
#include "cuda/include/cuComplex.h"
|
#include "third_party/gpus/cuda/include/cuComplex.h"
|
||||||
#include "tensorflow/core/framework/numeric_types.h"
|
#include "tensorflow/core/framework/numeric_types.h"
|
||||||
#include "tensorflow/core/framework/register_types.h"
|
#include "tensorflow/core/framework/register_types.h"
|
||||||
#include "tensorflow/core/kernels/scan_ops.h"
|
#include "tensorflow/core/kernels/scan_ops.h"
|
||||||
|
@ -19,7 +19,7 @@ limitations under the License.
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#if !defined(PLATFORM_GOOGLE)
|
#if !defined(PLATFORM_GOOGLE)
|
||||||
#include "cuda/cuda_config.h"
|
#include "third_party/gpus/cuda/cuda_config.h"
|
||||||
#endif
|
#endif
|
||||||
#include "tensorflow/core/platform/logging.h"
|
#include "tensorflow/core/platform/logging.h"
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ limitations under the License.
|
|||||||
#include "absl/strings/ascii.h"
|
#include "absl/strings/ascii.h"
|
||||||
#include "absl/strings/str_cat.h"
|
#include "absl/strings/str_cat.h"
|
||||||
#include "absl/strings/str_format.h"
|
#include "absl/strings/str_format.h"
|
||||||
#include "cuda/extras/CUPTI/include/cupti.h"
|
#include "third_party/gpus/cuda/extras/CUPTI/include/cupti.h"
|
||||||
#include "tensorflow/core/common_runtime/step_stats_collector.h"
|
#include "tensorflow/core/common_runtime/step_stats_collector.h"
|
||||||
#include "tensorflow/core/framework/step_stats.pb.h"
|
#include "tensorflow/core/framework/step_stats.pb.h"
|
||||||
#include "tensorflow/core/lib/core/errors.h"
|
#include "tensorflow/core/lib/core/errors.h"
|
||||||
|
@ -31,8 +31,8 @@ limitations under the License.
|
|||||||
|
|
||||||
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
|
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#include "cuda/include/cuComplex.h"
|
#include "third_party/gpus/cuda/include/cuComplex.h"
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#endif
|
#endif
|
||||||
#include "tensorflow/core/platform/types.h"
|
#include "tensorflow/core/platform/types.h"
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ limitations under the License.
|
|||||||
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
|
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
|
||||||
|
|
||||||
#if GOOGLE_CUDA
|
#if GOOGLE_CUDA
|
||||||
#include "cuda/include/cuda_fp16.h"
|
#include "third_party/gpus/cuda/include/cuda_fp16.h"
|
||||||
#endif
|
#endif
|
||||||
#include "tensorflow/core/util/gpu_device_functions.h"
|
#include "tensorflow/core/util/gpu_device_functions.h"
|
||||||
#include "tensorflow/core/util/gpu_launch_config.h"
|
#include "tensorflow/core/util/gpu_launch_config.h"
|
||||||
|
@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "cuda/include/cublas.h"
|
#include "third_party/gpus/cuda/include/cublas.h"
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#include "tensorflow/stream_executor/lib/env.h"
|
#include "tensorflow/stream_executor/lib/env.h"
|
||||||
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
|
|
||||||
#include "cuda/include/cublas_v2.h"
|
#include "third_party/gpus/cuda/include/cublas_v2.h"
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
|
|
||||||
#define SE_CUDA_DATA_HALF CUDA_R_16F
|
#define SE_CUDA_DATA_HALF CUDA_R_16F
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ limitations under the License.
|
|||||||
// TODO(b/73793421): Remove the following code block to switch to the second
|
// TODO(b/73793421): Remove the following code block to switch to the second
|
||||||
// approach when the issue is fixed.
|
// approach when the issue is fixed.
|
||||||
#if CUDA_VERSION < 9000
|
#if CUDA_VERSION < 9000
|
||||||
#include "cuda/include/cuda_fp16.h"
|
#include "third_party/gpus/cuda/include/cuda_fp16.h"
|
||||||
#define EIGEN_HAS_CUDA_FP16
|
#define EIGEN_HAS_CUDA_FP16
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ limitations under the License.
|
|||||||
#include "tensorflow/stream_executor/stream.h"
|
#include "tensorflow/stream_executor/stream.h"
|
||||||
#include "tensorflow/stream_executor/stream_executor_pimpl.h"
|
#include "tensorflow/stream_executor/stream_executor_pimpl.h"
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#include "cuda/include/cudnn.h"
|
#include "third_party/gpus/cudnn/cudnn.h"
|
||||||
#include "absl/strings/string_view.h"
|
#include "absl/strings/string_view.h"
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ limitations under the License.
|
|||||||
#include "absl/strings/str_format.h"
|
#include "absl/strings/str_format.h"
|
||||||
#include "absl/synchronization/mutex.h"
|
#include "absl/synchronization/mutex.h"
|
||||||
#include "absl/synchronization/notification.h"
|
#include "absl/synchronization/notification.h"
|
||||||
#include "cuda/include/cuda_runtime_api.h"
|
#include "third_party/gpus/cuda/include/cuda_runtime_api.h"
|
||||||
#include "tensorflow/stream_executor/cuda/cuda_diagnostics.h"
|
#include "tensorflow/stream_executor/cuda/cuda_diagnostics.h"
|
||||||
#include "tensorflow/stream_executor/lib/env.h"
|
#include "tensorflow/stream_executor/lib/env.h"
|
||||||
#include "tensorflow/stream_executor/lib/error.h"
|
#include "tensorflow/stream_executor/lib/error.h"
|
||||||
|
@ -20,7 +20,7 @@ limitations under the License.
|
|||||||
#ifndef TENSORFLOW_STREAM_EXECUTOR_CUDA_CUDA_FFT_H_
|
#ifndef TENSORFLOW_STREAM_EXECUTOR_CUDA_CUDA_FFT_H_
|
||||||
#define TENSORFLOW_STREAM_EXECUTOR_CUDA_CUDA_FFT_H_
|
#define TENSORFLOW_STREAM_EXECUTOR_CUDA_CUDA_FFT_H_
|
||||||
|
|
||||||
#include "cuda/include/cufft.h"
|
#include "third_party/gpus/cuda/include/cufft.h"
|
||||||
#include "tensorflow/stream_executor/fft.h"
|
#include "tensorflow/stream_executor/fft.h"
|
||||||
#include "tensorflow/stream_executor/platform/port.h"
|
#include "tensorflow/stream_executor/platform/port.h"
|
||||||
#include "tensorflow/stream_executor/plugin_registry.h"
|
#include "tensorflow/stream_executor/plugin_registry.h"
|
||||||
|
@ -27,7 +27,7 @@ limitations under the License.
|
|||||||
#include "tensorflow/stream_executor/platform/logging.h"
|
#include "tensorflow/stream_executor/platform/logging.h"
|
||||||
#include "tensorflow/stream_executor/rng.h"
|
#include "tensorflow/stream_executor/rng.h"
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#include "cuda/include/curand.h"
|
#include "third_party/gpus/cuda/include/curand.h"
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
// Formats curandStatus_t to output prettified values into a log stream.
|
// Formats curandStatus_t to output prettified values into a log stream.
|
||||||
|
@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#include "tensorflow/stream_executor/lib/env.h"
|
#include "tensorflow/stream_executor/lib/env.h"
|
||||||
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
// This file wraps cuda runtime calls with dso loader so that we don't need to
|
// This file wraps cuda runtime calls with dso loader so that we don't need to
|
||||||
// have explicit linking to libcuda.
|
// have explicit linking to libcuda.
|
||||||
|
|
||||||
#include "cuda/include/cuda_runtime_api.h"
|
#include "third_party/gpus/cuda/include/cuda_runtime_api.h"
|
||||||
#include "tensorflow/stream_executor/lib/env.h"
|
#include "tensorflow/stream_executor/lib/env.h"
|
||||||
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "cuda/include/cudnn.h"
|
#include "third_party/gpus/cudnn/cudnn.h"
|
||||||
#include "tensorflow/stream_executor/lib/env.h"
|
#include "tensorflow/stream_executor/lib/env.h"
|
||||||
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "cuda/include/cufft.h"
|
#include "third_party/gpus/cuda/include/cufft.h"
|
||||||
#include "tensorflow/stream_executor/lib/env.h"
|
#include "tensorflow/stream_executor/lib/env.h"
|
||||||
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
|
|
||||||
#include "cuda/extras/CUPTI/include/cupti.h"
|
#include "third_party/gpus/cuda/extras/CUPTI/include/cupti.h"
|
||||||
// IWYU pragma: no_include "perftools/gputools/executor/stream_executor.h"
|
// IWYU pragma: no_include "perftools/gputools/executor/stream_executor.h"
|
||||||
#include "tensorflow/stream_executor/lib/env.h"
|
#include "tensorflow/stream_executor/lib/env.h"
|
||||||
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
||||||
|
@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "cuda/include/curand.h"
|
#include "third_party/gpus/cuda/include/curand.h"
|
||||||
#include "tensorflow/stream_executor/lib/env.h"
|
#include "tensorflow/stream_executor/lib/env.h"
|
||||||
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "cuda/include/cusolverDn.h"
|
#include "third_party/gpus/cuda/include/cusolverDn.h"
|
||||||
#include "tensorflow/stream_executor/lib/env.h"
|
#include "tensorflow/stream_executor/lib/env.h"
|
||||||
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "cuda/include/cusparse.h"
|
#include "third_party/gpus/cuda/include/cusparse.h"
|
||||||
#include "tensorflow/stream_executor/lib/env.h"
|
#include "tensorflow/stream_executor/lib/env.h"
|
||||||
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
#include "tensorflow/stream_executor/platform/dso_loader.h"
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ limitations under the License.
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include "tensorflow/stream_executor/platform/port.h"
|
#include "tensorflow/stream_executor/platform/port.h"
|
||||||
|
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
#include "tensorflow/stream_executor/device_options.h"
|
#include "tensorflow/stream_executor/device_options.h"
|
||||||
#include "tensorflow/stream_executor/lib/status.h"
|
#include "tensorflow/stream_executor/lib/status.h"
|
||||||
#include "tensorflow/stream_executor/lib/statusor.h"
|
#include "tensorflow/stream_executor/lib/statusor.h"
|
||||||
|
@ -28,8 +28,8 @@ limitations under the License.
|
|||||||
|
|
||||||
#else // CUDA
|
#else // CUDA
|
||||||
|
|
||||||
#include "cuda/include/cuComplex.h"
|
#include "third_party/gpus/cuda/include/cuComplex.h"
|
||||||
#include "cuda/include/cuda.h"
|
#include "third_party/gpus/cuda/include/cuda.h"
|
||||||
|
|
||||||
// cannot include curand.h here
|
// cannot include curand.h here
|
||||||
// because it triggers the #error in cuda/cuda_gpu_executor.cc
|
// because it triggers the #error in cuda/cuda_gpu_executor.cc
|
||||||
|
@ -18,7 +18,7 @@ limitations under the License.
|
|||||||
|
|
||||||
#include "absl/strings/str_cat.h"
|
#include "absl/strings/str_cat.h"
|
||||||
#include "absl/strings/string_view.h"
|
#include "absl/strings/string_view.h"
|
||||||
#include "cuda/cuda_config.h"
|
#include "third_party/gpus/cuda/cuda_config.h"
|
||||||
#include "tensorflow/stream_executor/lib/env.h"
|
#include "tensorflow/stream_executor/lib/env.h"
|
||||||
#include "tensorflow/stream_executor/lib/error.h"
|
#include "tensorflow/stream_executor/lib/error.h"
|
||||||
#include "tensorflow/stream_executor/lib/path.h"
|
#include "tensorflow/stream_executor/lib/path.h"
|
||||||
|
122
third_party/gpus/cuda/BUILD.tpl
vendored
122
third_party/gpus/cuda/BUILD.tpl
vendored
@ -28,36 +28,37 @@ config_setting(
|
|||||||
config_setting(
|
config_setting(
|
||||||
name = "darwin",
|
name = "darwin",
|
||||||
values = {"cpu": "darwin"},
|
values = {"cpu": "darwin"},
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
config_setting(
|
config_setting(
|
||||||
name = "freebsd",
|
name = "freebsd",
|
||||||
values = {"cpu": "freebsd"},
|
values = {"cpu": "freebsd"},
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Provides CUDA headers for '#include "third_party/gpus/cuda/include/cuda.h"'
|
||||||
|
# All clients including TensorFlow should use these directives.
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cuda_headers",
|
name = "cuda_virtual_headers",
|
||||||
hdrs = [
|
hdrs = [
|
||||||
"cuda/cuda_config.h",
|
"cuda/cuda_config.h",
|
||||||
%{cuda_headers}
|
":cuda-include"
|
||||||
],
|
],
|
||||||
includes = [
|
include_prefix = "third_party/gpus",
|
||||||
".",
|
visibility = ["//visibility:private"],
|
||||||
"cuda/include",
|
)
|
||||||
"cuda/include/crt",
|
|
||||||
],
|
# Provides CUDA headers for '#include <cuda.h>'.
|
||||||
visibility = ["//visibility:public"],
|
# CUDA itself as well as Eigen use these directives.
|
||||||
|
cc_library(
|
||||||
|
name = "cuda_headers",
|
||||||
|
textual_hdrs = [":cuda-include"],
|
||||||
|
includes = ["cuda/include"],
|
||||||
|
deps = [":cuda_virtual_headers"],
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cudart_static",
|
name = "cudart_static",
|
||||||
srcs = ["cuda/lib/%{cudart_static_lib}"],
|
srcs = ["cuda/lib/%{cudart_static_lib}"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
linkopts = select({
|
linkopts = select({
|
||||||
":freebsd": [],
|
":freebsd": [],
|
||||||
"//conditions:default": ["-ldl"],
|
"//conditions:default": ["-ldl"],
|
||||||
@ -65,104 +66,82 @@ cc_library(
|
|||||||
"-lpthread",
|
"-lpthread",
|
||||||
%{cudart_static_linkopt}
|
%{cudart_static_linkopt}
|
||||||
],
|
],
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cuda_driver",
|
name = "cuda_driver",
|
||||||
srcs = ["cuda/lib/%{cuda_driver_lib}"],
|
srcs = ["cuda/lib/%{cuda_driver_lib}"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cudart",
|
name = "cudart",
|
||||||
srcs = ["cuda/lib/%{cudart_lib}"],
|
srcs = ["cuda/lib/%{cudart_lib}"],
|
||||||
data = ["cuda/lib/%{cudart_lib}"],
|
data = ["cuda/lib/%{cudart_lib}"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
visibility = ["//visibility:public"],
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "cublas_virtual_headers",
|
||||||
|
hdrs = [":cublas-include"],
|
||||||
|
include_prefix = "third_party/gpus/cuda/include",
|
||||||
|
strip_include_prefix = "cublas/include",
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
deps = [":cuda_headers"],
|
||||||
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "cublas_headers",
|
||||||
|
textual_hdrs = [":cublas-include"],
|
||||||
|
includes = ["cublas/include"],
|
||||||
|
deps = [":cublas_virtual_headers"],
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cublas",
|
name = "cublas",
|
||||||
srcs = ["cuda/lib/%{cublas_lib}"],
|
srcs = ["cuda/lib/%{cublas_lib}"],
|
||||||
data = ["cuda/lib/%{cublas_lib}"],
|
data = ["cuda/lib/%{cublas_lib}"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cusolver",
|
name = "cusolver",
|
||||||
srcs = ["cuda/lib/%{cusolver_lib}"],
|
srcs = ["cuda/lib/%{cusolver_lib}"],
|
||||||
data = ["cuda/lib/%{cusolver_lib}"],
|
data = ["cuda/lib/%{cusolver_lib}"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
linkopts = ["-lgomp"],
|
linkopts = ["-lgomp"],
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cudnn",
|
name = "cudnn",
|
||||||
srcs = ["cuda/lib/%{cudnn_lib}"],
|
srcs = ["cuda/lib/%{cudnn_lib}"],
|
||||||
data = ["cuda/lib/%{cudnn_lib}"],
|
data = ["cuda/lib/%{cudnn_lib}"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cudnn_header",
|
name = "cudnn_header",
|
||||||
includes = [
|
hdrs = [":cudnn-include"],
|
||||||
".",
|
include_prefix = "third_party/gpus/cudnn",
|
||||||
"cuda/include",
|
strip_include_prefix = "cudnn/include",
|
||||||
],
|
deps = [":cuda_headers"],
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cufft",
|
name = "cufft",
|
||||||
srcs = ["cuda/lib/%{cufft_lib}"],
|
srcs = ["cuda/lib/%{cufft_lib}"],
|
||||||
data = ["cuda/lib/%{cufft_lib}"],
|
data = ["cuda/lib/%{cufft_lib}"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "curand",
|
name = "curand",
|
||||||
srcs = ["cuda/lib/%{curand_lib}"],
|
srcs = ["cuda/lib/%{curand_lib}"],
|
||||||
data = ["cuda/lib/%{curand_lib}"],
|
data = ["cuda/lib/%{curand_lib}"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cuda",
|
name = "cuda",
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
deps = [
|
deps = [
|
||||||
":cublas",
|
":cublas",
|
||||||
":cuda_headers",
|
":cuda_headers",
|
||||||
@ -173,46 +152,37 @@ cc_library(
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "cupti_virtual_headers",
|
||||||
|
hdrs = [":cuda-extras"],
|
||||||
|
include_prefix="third_party/gpus",
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
deps = [":cuda_headers"],
|
||||||
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cupti_headers",
|
name = "cupti_headers",
|
||||||
hdrs = [
|
textual_hdrs = [":cuda-extras"],
|
||||||
"cuda/cuda_config.h",
|
includes = ["cuda/extras/CUPTI/include/"],
|
||||||
":cuda-extras",
|
deps = [":cupti_virtual_headers"],
|
||||||
],
|
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/extras/CUPTI/include/",
|
|
||||||
],
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cupti_dsos",
|
name = "cupti_dsos",
|
||||||
data = ["cuda/lib/%{cupti_lib}"],
|
data = ["cuda/lib/%{cupti_lib}"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cusparse",
|
name = "cusparse",
|
||||||
srcs = ["cuda/lib/%{cusparse_lib}"],
|
srcs = ["cuda/lib/%{cusparse_lib}"],
|
||||||
data = ["cuda/lib/%{cusparse_lib}"],
|
data = ["cuda/lib/%{cusparse_lib}"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
linkopts = ["-lgomp"],
|
linkopts = ["-lgomp"],
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "libdevice_root",
|
name = "libdevice_root",
|
||||||
data = [":cuda-nvvm"],
|
data = [":cuda-nvvm"],
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
%{copy_rules}
|
%{copy_rules}
|
||||||
|
28
third_party/gpus/cuda_configure.bzl
vendored
28
third_party/gpus/cuda_configure.bzl
vendored
@ -784,8 +784,11 @@ def _create_dummy_repository(repository_ctx):
|
|||||||
"%{curand_lib}": lib_name("curand", cpu_value),
|
"%{curand_lib}": lib_name("curand", cpu_value),
|
||||||
"%{cupti_lib}": lib_name("cupti", cpu_value),
|
"%{cupti_lib}": lib_name("cupti", cpu_value),
|
||||||
"%{cusparse_lib}": lib_name("cusparse", cpu_value),
|
"%{cusparse_lib}": lib_name("cusparse", cpu_value),
|
||||||
"%{copy_rules}": "",
|
"%{copy_rules}": """
|
||||||
"%{cuda_headers}": "",
|
filegroup(name="cuda-include")
|
||||||
|
filegroup(name="cublas-include")
|
||||||
|
filegroup(name="cudnn-include")
|
||||||
|
""",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -983,9 +986,7 @@ def _create_local_cuda_repository(repository_ctx):
|
|||||||
out_dir = "cuda/extras/CUPTI/include",
|
out_dir = "cuda/extras/CUPTI/include",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
included_files = _read_dir(repository_ctx, cuda_include_path)
|
|
||||||
|
|
||||||
if not any([file.endswith("cublas.h") for file in included_files]):
|
|
||||||
copy_rules.append(make_copy_files_rule(
|
copy_rules.append(make_copy_files_rule(
|
||||||
repository_ctx,
|
repository_ctx,
|
||||||
name = "cublas-include",
|
name = "cublas-include",
|
||||||
@ -995,13 +996,11 @@ def _create_local_cuda_repository(repository_ctx):
|
|||||||
cublas_include_path + "/cublas_api.h",
|
cublas_include_path + "/cublas_api.h",
|
||||||
],
|
],
|
||||||
outs = [
|
outs = [
|
||||||
"cuda/include/cublas.h",
|
"cublas/include/cublas.h",
|
||||||
"cuda/include/cublas_v2.h",
|
"cublas/include/cublas_v2.h",
|
||||||
"cuda/include/cublas_api.h",
|
"cublas/include/cublas_api.h",
|
||||||
],
|
],
|
||||||
))
|
))
|
||||||
else:
|
|
||||||
copy_rules.append("filegroup(name = 'cublas-include')\n")
|
|
||||||
|
|
||||||
cuda_libs = _find_libs(repository_ctx, cuda_config)
|
cuda_libs = _find_libs(repository_ctx, cuda_config)
|
||||||
cuda_lib_srcs = []
|
cuda_lib_srcs = []
|
||||||
@ -1023,16 +1022,12 @@ def _create_local_cuda_repository(repository_ctx):
|
|||||||
out_dir = "cuda/bin",
|
out_dir = "cuda/bin",
|
||||||
))
|
))
|
||||||
|
|
||||||
# Copy cudnn.h if cuDNN was not installed to CUDA_TOOLKIT_PATH.
|
|
||||||
if not any([file.endswith("cudnn.h") for file in included_files]):
|
|
||||||
copy_rules.append(make_copy_files_rule(
|
copy_rules.append(make_copy_files_rule(
|
||||||
repository_ctx,
|
repository_ctx,
|
||||||
name = "cudnn-include",
|
name = "cudnn-include",
|
||||||
srcs = [cudnn_header_dir + "/cudnn.h"],
|
srcs = [cudnn_header_dir + "/cudnn.h"],
|
||||||
outs = ["cuda/include/cudnn.h"],
|
outs = ["cudnn/include/cudnn.h"],
|
||||||
))
|
))
|
||||||
else:
|
|
||||||
copy_rules.append("filegroup(name = 'cudnn-include')\n")
|
|
||||||
|
|
||||||
# Set up BUILD file for cuda/
|
# Set up BUILD file for cuda/
|
||||||
_tpl(
|
_tpl(
|
||||||
@ -1062,11 +1057,6 @@ def _create_local_cuda_repository(repository_ctx):
|
|||||||
"%{cupti_lib}": cuda_libs["cupti"].basename,
|
"%{cupti_lib}": cuda_libs["cupti"].basename,
|
||||||
"%{cusparse_lib}": cuda_libs["cusparse"].basename,
|
"%{cusparse_lib}": cuda_libs["cusparse"].basename,
|
||||||
"%{copy_rules}": "\n".join(copy_rules),
|
"%{copy_rules}": "\n".join(copy_rules),
|
||||||
"%{cuda_headers}": (
|
|
||||||
'":cuda-include",\n' +
|
|
||||||
' ":cublas-include",' +
|
|
||||||
' ":cudnn-include",'
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
"cuda/BUILD",
|
"cuda/BUILD",
|
||||||
)
|
)
|
||||||
|
@ -28,37 +28,37 @@ config_setting(
|
|||||||
config_setting(
|
config_setting(
|
||||||
name = "darwin",
|
name = "darwin",
|
||||||
values = {"cpu": "darwin"},
|
values = {"cpu": "darwin"},
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
config_setting(
|
config_setting(
|
||||||
name = "freebsd",
|
name = "freebsd",
|
||||||
values = {"cpu": "freebsd"},
|
values = {"cpu": "freebsd"},
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Provides CUDA headers for '#include "third_party/gpus/cuda/include/cuda.h"'
|
||||||
|
# All clients including TensorFlow should use these directives.
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cuda_headers",
|
name = "cuda_virtual_headers",
|
||||||
hdrs = [
|
hdrs = [
|
||||||
"cuda/cuda_config.h",
|
"cuda/cuda_config.h",
|
||||||
":cuda-include",
|
":cuda-include",
|
||||||
":cudnn-include",
|
|
||||||
],
|
],
|
||||||
includes = [
|
include_prefix = "third_party/gpus",
|
||||||
".",
|
visibility = ["//visibility:private"],
|
||||||
"cuda/include",
|
)
|
||||||
"cuda/include/crt",
|
|
||||||
],
|
# Provides CUDA headers for '#include <cuda.h>'.
|
||||||
visibility = ["//visibility:public"],
|
# CUDA itself as well as Eigen use these directives.
|
||||||
|
cc_library(
|
||||||
|
name = "cuda_headers",
|
||||||
|
includes = ["cuda/include"],
|
||||||
|
textual_hdrs = [":cuda-include"],
|
||||||
|
deps = [":cuda_virtual_headers"],
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cudart_static",
|
name = "cudart_static",
|
||||||
srcs = ["cuda/lib/libcudart_static.a"],
|
srcs = ["cuda/lib/libcudart_static.a"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
linkopts = select({
|
linkopts = select({
|
||||||
":freebsd": [],
|
":freebsd": [],
|
||||||
"//conditions:default": ["-ldl"],
|
"//conditions:default": ["-ldl"],
|
||||||
@ -66,104 +66,82 @@ cc_library(
|
|||||||
"-lpthread",
|
"-lpthread",
|
||||||
"-lrt",
|
"-lrt",
|
||||||
],
|
],
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cuda_driver",
|
name = "cuda_driver",
|
||||||
srcs = ["cuda/lib/libcuda.so"],
|
srcs = ["cuda/lib/libcuda.so"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cudart",
|
name = "cudart",
|
||||||
srcs = ["cuda/lib/libcudart.so.10.0"],
|
srcs = ["cuda/lib/libcudart.so.10.0"],
|
||||||
data = ["cuda/lib/libcudart.so.10.0"],
|
data = ["cuda/lib/libcudart.so.10.0"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
visibility = ["//visibility:public"],
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "cublas_virtual_headers",
|
||||||
|
hdrs = [":cublas-include"],
|
||||||
|
include_prefix = "third_party/gpus/cuda/include",
|
||||||
|
strip_include_prefix = "cublas/include",
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
deps = [":cuda_headers"],
|
||||||
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "cublas_headers",
|
||||||
|
includes = ["cublas/include"],
|
||||||
|
textual_hdrs = [":cublas-include"],
|
||||||
|
deps = [":cublas_virtual_headers"],
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cublas",
|
name = "cublas",
|
||||||
srcs = ["cuda/lib/libcublas.so.10.0"],
|
srcs = ["cuda/lib/libcublas.so.10.0"],
|
||||||
data = ["cuda/lib/libcublas.so.10.0"],
|
data = ["cuda/lib/libcublas.so.10.0"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cusolver",
|
name = "cusolver",
|
||||||
srcs = ["cuda/lib/libcusolver.so.10.0"],
|
srcs = ["cuda/lib/libcusolver.so.10.0"],
|
||||||
data = ["cuda/lib/libcusolver.so.10.0"],
|
data = ["cuda/lib/libcusolver.so.10.0"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
linkopts = ["-lgomp"],
|
linkopts = ["-lgomp"],
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cudnn",
|
name = "cudnn",
|
||||||
srcs = ["cuda/lib/libcudnn.so.7"],
|
srcs = ["cuda/lib/libcudnn.so.7"],
|
||||||
data = ["cuda/lib/libcudnn.so.7"],
|
data = ["cuda/lib/libcudnn.so.7"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cudnn_header",
|
name = "cudnn_header",
|
||||||
includes = [
|
hdrs = [":cudnn-include"],
|
||||||
".",
|
include_prefix = "third_party/gpus/cudnn",
|
||||||
"cuda/include",
|
strip_include_prefix = "cudnn/include",
|
||||||
],
|
deps = [":cuda_headers"],
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cufft",
|
name = "cufft",
|
||||||
srcs = ["cuda/lib/libcufft.so.10.0"],
|
srcs = ["cuda/lib/libcufft.so.10.0"],
|
||||||
data = ["cuda/lib/libcufft.so.10.0"],
|
data = ["cuda/lib/libcufft.so.10.0"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "curand",
|
name = "curand",
|
||||||
srcs = ["cuda/lib/libcurand.so.10.0"],
|
srcs = ["cuda/lib/libcurand.so.10.0"],
|
||||||
data = ["cuda/lib/libcurand.so.10.0"],
|
data = ["cuda/lib/libcurand.so.10.0"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cuda",
|
name = "cuda",
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
deps = [
|
deps = [
|
||||||
":cublas",
|
":cublas",
|
||||||
":cuda_headers",
|
":cuda_headers",
|
||||||
@ -174,46 +152,37 @@ cc_library(
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "cupti_virtual_headers",
|
||||||
|
hdrs = [":cuda-extras"],
|
||||||
|
include_prefix = "third_party/gpus",
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
deps = [":cuda_headers"],
|
||||||
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cupti_headers",
|
name = "cupti_headers",
|
||||||
hdrs = [
|
includes = ["cuda/extras/CUPTI/include/"],
|
||||||
"cuda/cuda_config.h",
|
textual_hdrs = [":cuda-extras"],
|
||||||
":cuda-extras",
|
deps = [":cupti_virtual_headers"],
|
||||||
],
|
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/extras/CUPTI/include/",
|
|
||||||
],
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cupti_dsos",
|
name = "cupti_dsos",
|
||||||
data = ["cuda/lib/libcupti.so.10.0"],
|
data = ["cuda/lib/libcupti.so.10.0"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cusparse",
|
name = "cusparse",
|
||||||
srcs = ["cuda/lib/libcusparse.so.10.0"],
|
srcs = ["cuda/lib/libcusparse.so.10.0"],
|
||||||
data = ["cuda/lib/libcusparse.so.10.0"],
|
data = ["cuda/lib/libcusparse.so.10.0"],
|
||||||
includes = [
|
|
||||||
".",
|
|
||||||
"cuda/include",
|
|
||||||
],
|
|
||||||
linkopts = ["-lgomp"],
|
linkopts = ["-lgomp"],
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "libdevice_root",
|
name = "libdevice_root",
|
||||||
data = [":cuda-nvvm"],
|
data = [":cuda-nvvm"],
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
genrule(
|
genrule(
|
||||||
@ -1253,6 +1222,16 @@ genrule(
|
|||||||
cmd = """cp -rLf "/usr/local/cuda-10.0/extras/CUPTI/include/." "$(@D)/cuda/extras/CUPTI/include/" """,
|
cmd = """cp -rLf "/usr/local/cuda-10.0/extras/CUPTI/include/." "$(@D)/cuda/extras/CUPTI/include/" """,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
genrule(
|
||||||
|
name = "cublas-include",
|
||||||
|
outs = [
|
||||||
|
"cublas/include/cublas.h",
|
||||||
|
"cublas/include/cublas_v2.h",
|
||||||
|
"cublas/include/cublas_api.h",
|
||||||
|
],
|
||||||
|
cmd = """cp -f "/usr/local/cuda-10.0/include/cublas.h" $(location cublas/include/cublas.h) && cp -f "/usr/local/cuda-10.0/include/cublas_v2.h" $(location cublas/include/cublas_v2.h) && cp -f "/usr/local/cuda-10.0/include/cublas_api.h" $(location cublas/include/cublas_api.h) """,
|
||||||
|
)
|
||||||
|
|
||||||
genrule(
|
genrule(
|
||||||
name = "cuda-lib",
|
name = "cuda-lib",
|
||||||
outs = [
|
outs = [
|
||||||
@ -1267,7 +1246,7 @@ genrule(
|
|||||||
"cuda/lib/libcupti.so.10.0",
|
"cuda/lib/libcupti.so.10.0",
|
||||||
"cuda/lib/libcusparse.so.10.0",
|
"cuda/lib/libcusparse.so.10.0",
|
||||||
],
|
],
|
||||||
cmd = """cp -f "/usr/local/cuda-10.0/lib64/stubs/libcuda.so" $(location cuda/lib/libcuda.so) && cp -f "/usr/local/cuda-10.0/lib64/libcudart.so.10.0" $(location cuda/lib/libcudart.so.10.0) && cp -f "/usr/local/cuda-10.0/lib64/libcudart_static.a" $(location cuda/lib/libcudart_static.a) && cp -f "/usr/local/cuda-10.0/lib64/libcublas.so.10.0" $(location cuda/lib/libcublas.so.10.0) && cp -f "/usr/local/cuda-10.0/lib64/libcusolver.so.10.0" $(location cuda/lib/libcusolver.so.10.0) && cp -f "/usr/local/cuda-10.0/lib64/libcusparse.so.10.0" $(location cuda/lib/libcusparse.so.10.0) && cp -f "/usr/local/cuda-10.0/lib64/libcurand.so.10.0" $(location cuda/lib/libcurand.so.10.0) && cp -f "/usr/local/cuda-10.0/lib64/libcufft.so.10.0" $(location cuda/lib/libcufft.so.10.0) && cp -f "/usr/lib/x86_64-linux-gnu/libcudnn.so.7" $(location cuda/lib/libcudnn.so.7) && cp -f "/usr/local/cuda-10.0/extras/CUPTI/lib64/libcupti.so.10.0" $(location cuda/lib/libcupti.so.10.0) """,
|
cmd = """cp -f "/usr/local/cuda-10.0/lib64/stubs/libcuda.so" $(location cuda/lib/libcuda.so) && cp -f "/usr/local/cuda-10.0/lib64/libcudart.so.10.0" $(location cuda/lib/libcudart.so.10.0) && cp -f "/usr/local/cuda-10.0/lib64/libcudart_static.a" $(location cuda/lib/libcudart_static.a) && cp -f "/usr/local/cuda-10.0/lib64/libcublas.so.10.0" $(location cuda/lib/libcublas.so.10.0) && cp -f "/usr/local/cuda-10.0/lib64/libcusolver.so.10.0" $(location cuda/lib/libcusolver.so.10.0) && cp -f "/usr/local/cuda-10.0/lib64/libcurand.so.10.0" $(location cuda/lib/libcurand.so.10.0) && cp -f "/usr/local/cuda-10.0/lib64/libcufft.so.10.0" $(location cuda/lib/libcufft.so.10.0) && cp -f "/usr/lib/x86_64-linux-gnu/libcudnn.so.7" $(location cuda/lib/libcudnn.so.7) && cp -f "/usr/local/cuda-10.0/extras/CUPTI/lib64/libcupti.so.10.0" $(location cuda/lib/libcupti.so.10.0) && cp -f "/usr/local/cuda-10.0/lib64/libcusparse.so.10.0" $(location cuda/lib/libcusparse.so.10.0) """,
|
||||||
)
|
)
|
||||||
|
|
||||||
genrule(
|
genrule(
|
||||||
@ -1297,7 +1276,7 @@ genrule(
|
|||||||
genrule(
|
genrule(
|
||||||
name = "cudnn-include",
|
name = "cudnn-include",
|
||||||
outs = [
|
outs = [
|
||||||
"cuda/include/cudnn.h",
|
"cudnn/include/cudnn.h",
|
||||||
],
|
],
|
||||||
cmd = """cp -f "/usr/include/cudnn.h" $(location cuda/include/cudnn.h) """,
|
cmd = """cp -f "/usr/include/cudnn.h" $(location cudnn/include/cudnn.h) """,
|
||||||
)
|
)
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
licenses(["notice"])
|
licenses(["notice"])
|
||||||
|
|
||||||
exports_files(["LICENSE"])
|
|
||||||
|
|
||||||
load("@local_config_cuda//cuda:build_defs.bzl", "cuda_default_copts")
|
load("@local_config_cuda//cuda:build_defs.bzl", "cuda_default_copts")
|
||||||
|
|
||||||
package(default_visibility = ["//visibility:public"])
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
exports_files(["LICENSE"])
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "tensorrt_headers",
|
name = "tensorrt_headers",
|
||||||
hdrs = [":tensorrt_include"],
|
hdrs = [":tensorrt_include"],
|
||||||
@ -18,15 +18,9 @@ cc_library(
|
|||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "tensorrt",
|
name = "tensorrt",
|
||||||
srcs = [
|
srcs = [":tensorrt_lib"],
|
||||||
"tensorrt/lib/libnvinfer.so.5",
|
|
||||||
"tensorrt/lib/libnvinfer_plugin.so.5",
|
|
||||||
],
|
|
||||||
copts = cuda_default_copts(),
|
copts = cuda_default_copts(),
|
||||||
data = [
|
data = [":tensorrt_lib"],
|
||||||
"tensorrt/lib/libnvinfer.so.5",
|
|
||||||
"tensorrt/lib/libnvinfer_plugin.so.5",
|
|
||||||
],
|
|
||||||
include_prefix = "",
|
include_prefix = "",
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
|
Loading…
Reference in New Issue
Block a user