Home | History | Annotate | Download | only in grappler
      1 licenses(["notice"])  # Apache 2.0
      2 
      3 load("//tensorflow:tensorflow.bzl", "tf_cc_test")
      4 load("//tensorflow:tensorflow.bzl", "tf_cuda_library")
      5 
      6 filegroup(
      7     name = "all_files",
      8     srcs = glob(
      9         ["**/*"],
     10         exclude = [
     11             "**/METADATA",
     12             "**/OWNERS",
     13         ],
     14     ),
     15     visibility = ["//tensorflow:__subpackages__"],
     16 )
     17 
     18 cc_library(
     19     name = "op_types",
     20     srcs = ["op_types.cc"],
     21     hdrs = ["op_types.h"],
     22     visibility = ["//visibility:public"],
     23     deps = [
     24         ":utils",
     25         "//tensorflow/core:framework",
     26         "//tensorflow/core:lib",
     27         "//tensorflow/core:protos_all_cc",
     28     ],
     29 )
     30 
     31 cc_library(
     32     name = "utils",
     33     srcs = ["utils.cc"],
     34     hdrs = ["utils.h"],
     35     visibility = ["//visibility:public"],
     36     deps = [
     37         "//tensorflow/core:framework",
     38         "//tensorflow/core:lib",
     39         "//tensorflow/core:lib_internal",
     40         "//tensorflow/core:protos_all_cc",
     41     ],
     42 )
     43 
     44 tf_cc_test(
     45     name = "utils_test",
     46     srcs = ["utils_test.cc"],
     47     deps = [
     48         ":utils",
     49         "//tensorflow/cc:cc_ops",
     50         "//tensorflow/core:all_kernels",
     51         "//tensorflow/core:lib",
     52         "//tensorflow/core:protos_all_cc",
     53         "//tensorflow/core:test",
     54         "//tensorflow/core:test_main",
     55     ],
     56 )
     57 
     58 tf_cuda_library(
     59     name = "devices",
     60     srcs = ["devices.cc"],
     61     hdrs = ["devices.h"],
     62     cuda_deps = [
     63         "//tensorflow/core:gpu_init",
     64         "//tensorflow/core:stream_executor",
     65     ],
     66     visibility = ["//visibility:public"],
     67     deps = [
     68         "//tensorflow/core:lib",
     69         "//tensorflow/core:lib_internal",
     70     ],
     71 )
     72 
     73 cc_library(
     74     name = "graph_view",
     75     srcs = ["graph_view.cc"],
     76     hdrs = ["graph_view.h"],
     77     visibility = ["//visibility:public"],
     78     deps = [
     79         ":utils",
     80         "//tensorflow/core:lib",
     81         "//tensorflow/core:protos_all_cc",
     82     ],
     83 )
     84 
     85 tf_cc_test(
     86     name = "graph_view_test",
     87     srcs = ["graph_view_test.cc"],
     88     deps = [
     89         ":graph_view",
     90         ":grappler_item",
     91         "//tensorflow/cc:cc_ops",
     92         "//tensorflow/core:test",
     93         "//tensorflow/core:test_main",
     94         "//tensorflow/core/grappler/inputs:trivial_test_graph_input_yielder",
     95     ],
     96 )
     97 
     98 cc_library(
     99     name = "grappler_item",
    100     srcs = [
    101         "grappler_item.cc",
    102     ],
    103     hdrs = ["grappler_item.h"],
    104     visibility = ["//visibility:public"],
    105     deps = [
    106         ":op_types",
    107         ":utils",
    108         "//tensorflow/core:framework",
    109         "//tensorflow/core:protos_all_cc",
    110     ],
    111 )
    112 
    113 cc_library(
    114     name = "grappler_item_builder",
    115     srcs = [
    116         "grappler_item_builder.cc",
    117     ],
    118     hdrs = ["grappler_item_builder.h"],
    119     visibility = ["//visibility:public"],
    120     deps = [
    121         ":grappler_item",
    122         ":op_types",
    123         ":utils",
    124         "//tensorflow/core:core_cpu",
    125         "//tensorflow/core:core_cpu_internal",
    126         "//tensorflow/core:framework",
    127         "//tensorflow/core:framework_internal",
    128         "//tensorflow/core:lib",
    129         "//tensorflow/core:lib_internal",
    130         "//tensorflow/core:protos_all_cc",
    131         "//tensorflow/core/grappler/inputs:utils",
    132         "//tensorflow/core/grappler/optimizers:model_pruner",
    133     ],
    134 )
    135 
    136 tf_cc_test(
    137     name = "grappler_item_test",
    138     srcs = ["grappler_item_test.cc"],
    139     deps = [
    140         ":grappler_item",
    141         "//tensorflow/core:protos_all_cc",
    142         "//tensorflow/core:test",
    143         "//tensorflow/core:test_main",
    144         "//tensorflow/core/grappler/inputs:trivial_test_graph_input_yielder",
    145     ],
    146 )
    147 
    148 tf_cc_test(
    149     name = "grappler_item_builder_test",
    150     srcs = ["grappler_item_builder_test.cc"],
    151     deps = [
    152         ":grappler_item_builder",
    153         "//tensorflow/cc:cc_ops",
    154         "//tensorflow/cc:functional_ops",
    155         "//tensorflow/cc:grad_testutil",
    156         "//tensorflow/cc:gradients",
    157         "//tensorflow/core:framework",
    158         "//tensorflow/core:lib",
    159         "//tensorflow/core:protos_all_cc",
    160         "//tensorflow/core:test",
    161         "//tensorflow/core:test_main",
    162         "//tensorflow/core:testlib",
    163         "//tensorflow/core/grappler/inputs:trivial_test_graph_input_yielder",
    164     ],
    165 )
    166