blob: e1b63ad1e20a63bdfd4cf3f78a071ccef98b9a38 [file]
# Copyright 2021 Google LLC
#
# 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
#
# https://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.
load("//iree:build_defs.oss.bzl", "iree_cmake_extra_content")
package(
default_visibility = ["//visibility:public"],
features = ["layering_check"],
licenses = ["notice"], # Apache 2.0
)
iree_cmake_extra_content(
content = """
if(NOT "${IREE_TARGET_BACKEND_CUDA}")
return()
endif()
""",
)
cc_library(
name = "CUDA",
srcs = [
"CUDATarget.cpp",
],
hdrs = [
"CUDATarget.h",
],
deps = [
"//iree/base:flatcc",
"//iree/compiler/Conversion/LinalgToNVVM",
"//iree/compiler/Dialect/HAL/Target",
"//iree/compiler/Utils",
"//iree/schemas:cuda_executable_def_c_fbs",
"@llvm-project//llvm:Core",
"@llvm-project//llvm:NVPTXCodeGen",
"@llvm-project//llvm:Support",
"@llvm-project//llvm:Target",
"@llvm-project//mlir:LLVMDialect",
"@llvm-project//mlir:LLVMToLLVMIRTranslation",
"@llvm-project//mlir:NVVMDialect",
"@llvm-project//mlir:Pass",
"@llvm-project//mlir:Support",
"@llvm-project//mlir:ToLLVMIRTranslation",
],
)