Home
last modified time | relevance | path

Searched refs:diag_index (Results 1 – 14 of 14) sorted by relevance

/external/tensorflow/tensorflow/compiler/tests/
Dmatrix_diag_ops_test.py41 diag_index, argument
50 d_lower, d_upper = diag_index
57 for diag_index in range(d_lower, d_upper + 1):
58 diag_len = min(num_rows + min(0, diag_index), num_cols - max(0, diag_index))
59 row_index = d_upper - diag_index
61 left_align = (diag_index >= 0 and
62 align[0] == "LEFT") or (diag_index <= 0 and
84 for diag_index, (packed_diagonals, padded_diagonals) in tests.items():
87 packed_diagonals, diag_index, num_rows, num_cols, align=align)
88 new_tests[diag_index] = (repacked_diagonals, padded_diagonals)
[all …]
/external/tensorflow/tensorflow/core/kernels/linalg/
Dmatrix_set_diag_op_gpu.cu.cc30 __device__ inline int ComputeContentOffset(const int diag_index, in ComputeContentOffset() argument
36 const bool left_align = (diag_index >= 0 && left_align_superdiagonal) || in ComputeContentOffset()
37 (diag_index <= 0 && left_align_subdiagonal); in ComputeContentOffset()
39 const int y_offset = min(0, diag_index); in ComputeContentOffset()
40 const int x_offset = max(0, diag_index); in ComputeContentOffset()
56 const int diag_index = upper_diag_index - diag_index_in_input; in MatrixSetDiagKernel() local
58 ComputeContentOffset(diag_index, max_diag_len, m, n, in MatrixSetDiagKernel()
60 const int y_index = index_in_the_diagonal - min(0, diag_index); in MatrixSetDiagKernel()
61 const int x_index = index_in_the_diagonal + max(0, diag_index); in MatrixSetDiagKernel()
83 const int diag_index = col - row; in MatrixCopyInputAndSetDiagKernel() local
[all …]
Dmatrix_diag_op_gpu.cu.cc29 __device__ inline int ComputeContentOffset(const int diag_index, in ComputeContentOffset() argument
35 const bool left_align = (diag_index >= 0 && left_align_superdiagonal) || in ComputeContentOffset()
36 (diag_index <= 0 && left_align_subdiagonal); in ComputeContentOffset()
38 const int y_offset = min(0, diag_index); in ComputeContentOffset()
39 const int x_offset = max(0, diag_index); in ComputeContentOffset()
56 const int diag_index = col - row; in MatrixDiagKernel() local
57 const int diag_index_in_input = upper_diag_index - diag_index; in MatrixDiagKernel()
59 ComputeContentOffset(diag_index, max_diag_len, num_rows, num_cols, in MatrixDiagKernel()
61 const int index_in_the_diagonal = col - max(diag_index, 0) + content_offset; in MatrixDiagKernel()
62 if (lower_diag_index <= diag_index && diag_index <= upper_diag_index) { in MatrixDiagKernel()
[all …]
Dmatrix_diag_op.cc69 auto& diag_index = context->input(1); in Compute() local
71 TensorShapeUtils::IsScalar(diag_index.shape()) || in Compute()
72 TensorShapeUtils::IsVector(diag_index.shape()), in Compute()
75 diag_index.shape().DebugString())); in Compute()
76 lower_diag_index = diag_index.flat<int32>()(0); in Compute()
78 if (TensorShapeUtils::IsVector(diag_index.shape())) { in Compute()
79 auto diag_index_size = diag_index.dim_size(0); in Compute()
86 upper_diag_index = diag_index.flat<int32>()(1); in Compute()
175 auto& diag_index = context->input(1); in Compute() local
177 TensorShapeUtils::IsScalar(diag_index.shape()) || in Compute()
[all …]
Dmatrix_set_diag_op.cc66 auto& diag_index = context->input(2); in Compute() local
68 TensorShapeUtils::IsScalar(diag_index.shape()) || in Compute()
69 TensorShapeUtils::IsVector(diag_index.shape()), in Compute()
72 diag_index.shape().DebugString())); in Compute()
73 lower_diag_index = diag_index.flat<int32>()(0); in Compute()
75 if (TensorShapeUtils::IsVector(diag_index.shape())) { in Compute()
76 auto diag_index_size = diag_index.dim_size(0); in Compute()
83 upper_diag_index = diag_index.flat<int32>()(1); in Compute()
226 const Eigen::Index diag_index = upper_diag_index - m; in Compute() local
229 diag_index, max_diag_len, num_rows, num_cols, in Compute()
[all …]
Dmatrix_diag_op.h44 int diag_index, int max_diag_len, int num_rows, int num_cols,
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dmatrix_diag_ops.cc30 static inline int ComputeDiagLen(int diag_index, int num_rows, int num_cols) { in ComputeDiagLen() argument
31 return std::min(num_rows + std::min(0, diag_index), in ComputeDiagLen()
32 num_cols - std::max(0, diag_index)); in ComputeDiagLen()
36 static inline bool IsLeftAligned(int diag_index, bool left_align_superdiagonal, in IsLeftAligned() argument
38 return (diag_index >= 0 && left_align_superdiagonal) || in IsLeftAligned()
39 (diag_index <= 0 && left_align_subdiagonal); in IsLeftAligned()
68 std::vector<int64> diag_index; in ProcessDiagIndex() local
70 context->ConstantInputAsIntVector("k", &diag_index)); in ProcessDiagIndex()
72 context, !diag_index.empty() && diag_index.size() <= 2, in ProcessDiagIndex()
75 diag_index.size(), " elements.")); in ProcessDiagIndex()
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/
Ddiag_op_test.py46 diag_index, argument
55 d_lower, d_upper = diag_index
62 for diag_index in range(d_lower, d_upper + 1):
63 diag_len = min(num_rows + min(0, diag_index), num_cols - max(0, diag_index))
64 row_index = d_upper - diag_index
66 left_align = (diag_index >= 0 and
67 align[0] == "LEFT") or (diag_index <= 0 and
89 for diag_index, (packed_diagonals, padded_diagonals) in tests.items():
92 packed_diagonals, diag_index, num_rows, num_cols, align=align)
93 new_tests[diag_index] = (repacked_diagonals, padded_diagonals)
/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_MatrixSetDiagV2.pbtxt55 = diagonal[i, j, ..., l, diag_index, index_in_diag] ; if k[0] <= d <= k[1]
58 where `d = n - m`, `diag_index = k[1] - d`, and `index_in_diag = n - max(d, 0)`.
Dapi_def_MatrixSetDiagV3.pbtxt67 = diagonal[i, j, ..., l, diag_index, index_in_diag] ; if k[0] <= d <= k[1]
70 where `d = n - m`, `diag_index = k[1] - d`, and
Dapi_def_MatrixDiagV2.pbtxt76 = diagonal[i, j, ..., l, diag_index, index_in_diag] ; if k[0] <= d <= k[1]
79 where `d = n - m`, `diag_index = k[1] - d`, and `index_in_diag = n - max(d, 0)`.
Dapi_def_MatrixDiagV3.pbtxt88 = diagonal[i, j, ..., l, diag_index, index_in_diag] ; if k[0] <= d <= k[1]
91 where `d = n - m`, `diag_index = [k] - d`, and
/external/tensorflow/tensorflow/python/ops/
Darray_grad.py460 diag_index = array_ops.reshape(op.inputs[2], [-1]) # Converts to vector.
461 d_lower = diag_index[0]
462 d_upper = diag_index[-1] # Works both when len(diag_index) is 1 and 2.
497 diag_index = array_ops.reshape(op.inputs[2], [-1]) # Converts to vector.
498 d_lower = diag_index[0]
499 d_upper = diag_index[-1] # Works both when len(diag_index) is 1 and 2.
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/ir/
Dtf_generated_ops.td7398 = diagonal[i, j, ..., l, diag_index, index_in_diag] ; if k[0] <= d <= k[1]
7401 where `d = n - m`, `diag_index = k[1] - d`, and `index_in_diag = n - max(d, 0)`.
7516 = diagonal[i, j, ..., l, diag_index, index_in_diag] ; if k[0] <= d <= k[1]
7519 where `d = n - m`, `diag_index = [k] - d`, and
7729 = diagonal[i, j, ..., l, diag_index, index_in_diag] ; if k[0] <= d <= k[1]
7732 where `d = n - m`, `diag_index = k[1] - d`, and `index_in_diag = n - max(d, 0)`.
7827 = diagonal[i, j, ..., l, diag_index, index_in_diag] ; if k[0] <= d <= k[1]
7830 where `d = n - m`, `diag_index = k[1] - d`, and