16d3f15320
ARM CI / build (3.10) (push) Has been cancelled
cffconvert / validate (push) Has been cancelled
Creates a GitHub Issue when a PR Rolled back via Commit to Master / create-issue-on-pr-rollback (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
70 lines
2.4 KiB
Python
70 lines
2.4 KiB
Python
# Copyright 2026 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.
|
|
# ==============================================================================
|
|
|
|
# Description:
|
|
# Utilities that perform useful transformations on graphs
|
|
|
|
load(
|
|
"//tensorflow:tensorflow.bzl",
|
|
"tf_cc_binary",
|
|
"tf_cuda_library",
|
|
)
|
|
load("//tensorflow:tensorflow.default.bzl", "get_compatible_with_portable")
|
|
|
|
package(
|
|
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
|
|
default_visibility = ["//visibility:public"],
|
|
licenses = ["notice"],
|
|
)
|
|
|
|
tf_cuda_library(
|
|
name = "optimization_pass_runner_lib",
|
|
srcs = ["optimization_pass_runner.cc"],
|
|
hdrs = ["optimization_pass_runner.h"],
|
|
compatible_with = get_compatible_with_portable(),
|
|
deps = [
|
|
"//tensorflow/core:core_cpu",
|
|
"//tensorflow/core:core_cpu_base",
|
|
"//tensorflow/core:framework",
|
|
"//tensorflow/core:framework_internal",
|
|
"//tensorflow/core:framework_lite",
|
|
"//tensorflow/core:lib",
|
|
"//tensorflow/core:protos_all_cc",
|
|
"//tensorflow/core:tensorflow",
|
|
"@com_google_absl//absl/status",
|
|
"@com_google_absl//absl/strings",
|
|
"@com_google_absl//absl/strings:string_view",
|
|
],
|
|
)
|
|
|
|
tf_cc_binary(
|
|
name = "gpu_optimization_pass_runner",
|
|
srcs = ["gpu_optimization_pass_runner_main.cc"],
|
|
deps = [
|
|
":optimization_pass_runner_lib",
|
|
"//tensorflow/compiler/jit:xla_cpu_jit",
|
|
"//tensorflow/compiler/jit:xla_gpu_jit",
|
|
"//tensorflow/compiler/tf2xla:xla_compiler",
|
|
"//tensorflow/core:core_cpu_base",
|
|
"//tensorflow/core:framework_internal",
|
|
"//tensorflow/core:framework_lite",
|
|
"//tensorflow/core:lib",
|
|
"//tensorflow/core:protos_all_cc",
|
|
"//tensorflow/core:tensorflow",
|
|
"@com_google_absl//absl/status",
|
|
"@xla//xla/tsl/platform:status",
|
|
],
|
|
)
|