Lines Matching full:cuda

1 """Repository rule for CUDA autoconfiguration.
5 * `TF_NEED_CUDA`: Whether to enable building with CUDA.
7 * `TF_CUDA_CLANG`: Whether to use clang as a cuda compiler.
14 * `TF_CUDA_PATHS`: The base paths to look for CUDA and cuDNN. Default is
15 `/usr/local/cuda,usr/`.
16 * `CUDA_TOOLKIT_PATH` (deprecated): The path to the CUDA toolkit. Default is
17 `/usr/local/cuda`.
18 * `TF_CUDA_VERSION`: The version of the CUDA toolkit. If this is blank, then
22 `/usr/local/cuda`.
23 * `TF_CUDA_COMPUTE_CAPABILITIES`: The CUDA compute capabilities. Default is
326 """Output failure message when cuda configuration fails."""
334 """Generates the Starlark string with cuda include directories.
368 """Returns whether to build with CUDA support."""
391 detected_version: The version autodetected from the CUDA installation on
407 _NVCC_VERSION_PREFIX = "Cuda compilation tools, release "
412 """Returns a list of strings representing cuda compute capabilities.
416 Returns: list of cuda architectures to compile for. 'compute_xy' refers to
506 …auto_configure_fail("Error with installed CUDA libs. Expected '%s'. Actual '%s'." % (all_paths, ch…
509 """Returns the CUDA and cuDNN libraries on the system.
515 check_cuda_libs_script: The path to a script verifying that the cuda
517 cuda_config: The CUDA config as returned by _get_cuda_config
526 "cuda": _check_cuda_lib_params(
527 "cuda",
642 """Returns CUDA config dictionary from running find_cuda_config.py"""
651 """Detects and returns information about the CUDA installation on the system.
658 cuda_toolkit_path: The CUDA toolkit installation directory.
660 cuda_version: The version of CUDA on the system.
661 cudart_version: The CUDA runtime version on the system.
663 compute_capabilities: A list of the system's CUDA compute capabilities.
666 config = find_cuda_config(repository_ctx, find_cuda_config_script, ["cuda", "cudnn"])
679 # The libcudart soname in CUDA 11.x is versioned as 11.0 for backward compatability.
691 # It changed from 'x.y' to just 'x' in CUDA 10.1.
741 fail("ERROR: Building with --config=cuda but TensorFlow is not configured " +
767 # Set up BUILD file for cuda/.
770 "cuda:build_defs.bzl",
779 "cuda:BUILD",
781 "%{cuda_driver_lib}": lib_name("cuda", cpu_value),
799 filegroup(name="cuda-include")
810 # Create dummy files for the CUDA toolkit since they are still required by
811 # tensorflow/core/platform/default/build_config:cuda.
812 repository_ctx.file("cuda/cuda/include/cuda.h")
813 repository_ctx.file("cuda/cuda/include/cublas.h")
814 repository_ctx.file("cuda/cuda/include/cudnn.h")
815 repository_ctx.file("cuda/cuda/extras/CUPTI/include/cupti.h")
816 repository_ctx.file("cuda/cuda/lib/%s" % lib_name("cuda", cpu_value))
817 repository_ctx.file("cuda/cuda/lib/%s" % lib_name("cudart", cpu_value))
819 "cuda/cuda/lib/%s" % lib_name("cudart_static", cpu_value),
821 repository_ctx.file("cuda/cuda/lib/%s" % lib_name("cublas", cpu_value))
822 repository_ctx.file("cuda/cuda/lib/%s" % lib_name("cublasLt", cpu_value))
823 repository_ctx.file("cuda/cuda/lib/%s" % lib_name("cusolver", cpu_value))
824 repository_ctx.file("cuda/cuda/lib/%s" % lib_name("cudnn", cpu_value))
825 repository_ctx.file("cuda/cuda/lib/%s" % lib_name("curand", cpu_value))
826 repository_ctx.file("cuda/cuda/lib/%s" % lib_name("cufft", cpu_value))
827 repository_ctx.file("cuda/cuda/lib/%s" % lib_name("cupti", cpu_value))
828 repository_ctx.file("cuda/cuda/lib/%s" % lib_name("cusparse", cpu_value))
834 "cuda:cuda_config.h",
846 "cuda/cuda/cuda_config.h",
853 "cuda:cuda_config.py",
855 "cuda/cuda/cuda_config.py",
859 # attempts to build with --config=cuda, add a dummy build rule to intercept
934 copts.append("--cuda-include-ptx=%s" % capability)
935 copts.append("--cuda-gpu-arch=%s" % capability)
959 """Creates the repository containing files set up to build with CUDA."""
966 "cuda:build_defs.bzl",
971 "cuda:cuda_config.h",
972 "cuda:cuda_config.py",
974 …tpl_paths["cuda:BUILD"] = _tpl_path(repository_ctx, "cuda:BUILD.windows" if is_windows(repository_…
985 # Create genrule to copy files from the installed CUDA toolkit into execroot.
989 name = "cuda-include",
991 out_dir = "cuda/include",
995 name = "cuda-nvvm",
997 out_dir = "cuda/nvvm/libdevice",
1001 name = "cuda-extras",
1003 out_dir = "cuda/extras/CUPTI/include",
1080 cuda_lib_outs.append("cuda/lib/" + _basename(repository_ctx, path))
1083 name = "cuda-lib",
1096 name = "cuda-bin",
1098 outs = ["cuda/bin/" + f for f in bin_files],
1128 # Set up BUILD file for cuda/
1130 "cuda/build_defs.bzl",
1131 tpl_paths["cuda:build_defs.bzl"],
1147 "cuda/BUILD",
1148 tpl_paths["cuda:BUILD"],
1150 "%{cuda_driver_lib}": _basename(repository_ctx, cuda_libs["cuda"]),
1235 # search them; we cannot work around that, so we add the relevant cuda
1296 "cuda/cuda/cuda_config.h",
1297 tpl_paths["cuda:cuda_config.h"],
1314 "cuda/cuda/cuda_config.py",
1315 tpl_paths["cuda:cuda_config.py"],
1328 """Creates pointers to a remotely configured repo set up to build with CUDA."""
1331 "cuda:build_defs.bzl",
1341 "cuda/BUILD",
1342 config_repo_label(remote_config_repo, "cuda:BUILD"),
1346 "cuda/build_defs.bzl",
1347 config_repo_label(remote_config_repo, "cuda:build_defs.bzl"),
1351 "cuda/cuda/cuda_config.h",
1352 config_repo_label(remote_config_repo, "cuda:cuda/cuda_config.h"),
1356 "cuda/cuda/cuda_config.py",
1357 config_repo_label(remote_config_repo, "cuda:cuda/cuda_config.py"),
1443 """Detects and configures the local CUDA toolchain.