Files
WeHub Mirror 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
WeHub snapshot of ee606724a5c2f63bf60704cb3e1b169618993fd9
2026-08-07 16:11:07 +08:00

109 lines
3.5 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.
# ==============================================================================
load("@xla//third_party/rules_python/python:py_library.bzl", "py_library")
load("//tensorflow:pytype.default.bzl", "pytype_strict_library")
# Description: Sparse CSR support for TensorFlow.
load("//tensorflow:tensorflow.bzl", "tf_gen_op_wrapper_py")
package(
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
default_visibility = ["//tensorflow:internal"],
licenses = ["notice"],
)
tf_gen_op_wrapper_py(
name = "gen_sparse_csr_matrix_ops",
out = "gen_sparse_csr_matrix_ops.py",
api_def_srcs = ["//tensorflow/core/api_def:base_api_def"],
extra_py_deps = [
"//tensorflow/python:pywrap_tfe",
"//tensorflow/python/util:dispatch",
"//tensorflow/python/util:deprecation",
"//tensorflow/python/util:tf_export",
],
py_lib_rule = py_library,
visibility = ["//visibility:private"],
deps = ["//tensorflow/core:sparse_csr_matrix_ops_op_lib"],
)
py_library(
name = "sparse_py",
srcs = ["sparse.py"],
strict_deps = True,
deps = [
":conjugate_gradient",
":sparse_csr_matrix_grad",
":sparse_csr_matrix_ops",
],
)
py_library(
name = "sparse_csr_matrix_grad",
srcs = ["sparse_csr_matrix_grad.py"],
strict_deps = True,
deps = [
":sparse_csr_matrix_ops",
"//tensorflow/python/framework:ops",
"//tensorflow/python/framework:sparse_tensor",
"//tensorflow/python/ops:array_ops",
"//tensorflow/python/ops:array_ops_stack",
"//tensorflow/python/ops:math_ops",
"//tensorflow/python/ops:sparse_ops",
],
)
py_library(
name = "__init__",
srcs = ["__init__.py"],
strict_deps = True,
)
pytype_strict_library(
name = "conjugate_gradient",
srcs = ["conjugate_gradient.py"],
deps = [
"//tensorflow/python/framework:constant_op",
"//tensorflow/python/framework:dtypes",
"//tensorflow/python/framework:ops",
"//tensorflow/python/ops:array_ops",
"//tensorflow/python/ops:math_ops",
"//tensorflow/python/ops:while_loop",
"//tensorflow/python/ops/linalg:linalg_impl",
"//tensorflow/python/util:dispatch",
"//tensorflow/python/util:tf_export",
],
)
py_library(
name = "sparse_csr_matrix_ops",
srcs = ["sparse_csr_matrix_ops.py"],
strict_deps = True,
deps = [
":gen_sparse_csr_matrix_ops",
"//tensorflow/python/eager:context",
"//tensorflow/python/framework:cpp_shape_inference_proto_py",
"//tensorflow/python/framework:dtypes",
"//tensorflow/python/framework:ops",
"//tensorflow/python/framework:sparse_tensor",
"//tensorflow/python/framework:tensor",
"//tensorflow/python/framework:tensor_shape",
"//tensorflow/python/ops:array_ops",
"//tensorflow/python/ops:math_ops",
"//tensorflow/python/ops:resource_variable_ops",
],
)