Skip to content

Commit 3274846

Browse files
committed
Add license for C++ and python files
1 parent 673cda8 commit 3274846

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+734
-0
lines changed

rfcs/20200624-pluggable-device-for-tensorflow/sample/conv_relu.py

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# =============================================================================
15+
116
#!/usr/bin/env python
217
# coding=utf-8
318
import tensorflow as tf

rfcs/20200624-pluggable-device-for-tensorflow/sample/relu.py

+16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
#!/usr/bin/env python
2+
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
# =============================================================================
16+
17+
218
# coding=utf-8
319
import tensorflow as tf
420
import numpy as np
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/python/test.py

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# ==============================================================================
115
"""This is a module for dummy test."""
216

317
import os

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/device/cpu/cpu_device_plugin.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
Licensed under the Apache License, Version 2.0 (the "License");
3+
you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
==============================================================================*/
14+
15+
116
#include "tensorflow_plugin/src/device/cpu/cpu_device_plugin.h"
217
#include <sys/sysinfo.h>
318

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/device/cpu/cpu_device_plugin.h

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
Licensed under the Apache License, Version 2.0 (the "License");
3+
you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
==============================================================================*/
14+
115
#ifndef TENSORFLOW_PLUGIN_SRC_DEVICE_CPU_H_
216
#define TENSORFLOW_PLUGIN_SRC_DEVICE_CPU_H_
317
#include "tensorflow/c/experimental/stream_executor/stream_executor.h"

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/graph/plugin_optimizer.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
Licensed under the Apache License, Version 2.0 (the "License");
3+
you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
==============================================================================*/
14+
15+
116
#include "tensorflow_plugin/src/graph/plugin_optimizer.h"
217
#include "tensorflow/c/experimental/grappler/grappler.h"
318
#include "tensorflow_plugin/src/graph/tf_buffer.h"

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/graph/plugin_optimizer.h

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
Licensed under the Apache License, Version 2.0 (the "License");
3+
you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
==============================================================================*/
14+
15+
116
#ifndef TENSORFLOW_PLUGIN_SRC_GRAPH_PLUGIN_OPTIMIZER_H_
217
#define TENSORFLOW_PLUGIN_SRC_GRAPH_PLUGIN_OPTIMIZER_H_
318

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/graph/tf_buffer.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
Licensed under the Apache License, Version 2.0 (the "License");
3+
you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
==============================================================================*/
14+
15+
116
#include "tensorflow_plugin/src/graph/tf_buffer.h"
217
#include "tensorflow/c/tf_status.h"
318

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/graph/tf_buffer.h

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
Licensed under the Apache License, Version 2.0 (the "License");
3+
you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
==============================================================================*/
14+
15+
116
#ifndef TENSORFLOW_PLUGIN_SRC_GRAPH_UTILS_TF_BUFFER_H_
217
#define TENSORFLOW_PLUGIN_SRC_GRAPH_UTILS_TF_BUFFER_H_
318

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/kernels/cpu/conv_ops_using_gemm.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
Licensed under the Apache License, Version 2.0 (the "License");
3+
you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
==============================================================================*/
14+
15+
116
//#define EIGEN_USE_THREADS
217

318
#include <map>

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/kernels/cpu/cpu_kernel_init.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
Licensed under the Apache License, Version 2.0 (the "License");
3+
you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
==============================================================================*/
14+
15+
116
#include "tensorflow_plugin/src/kernels/cpu/cpu_kernel_init.h"
217
#include "tensorflow/c/kernels.h"
318

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/kernels/cpu/cpu_kernel_init.h

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
Licensed under the Apache License, Version 2.0 (the "License");
3+
you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
==============================================================================*/
14+
15+
116
#ifndef TENSORFLOW_PLUGIN_SRC_KERNELS_CPU_KERNEL_INIT_H_
217
#define TENSORFLOW_PLUGIN_SRC_KERNELS_CPU_KERNEL_INIT_H_
318

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/kernels/cpu/gemm_functors.h

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
Licensed under the Apache License, Version 2.0 (the "License");
3+
you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
==============================================================================*/
14+
15+
116
#ifndef TENSORFLOW_PLUGIN_SRC_KERNEL_CPU_H_
217
#define TENSORFLOW_PLUGIN_SRC_KERNEL_CPU_H_
318

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/kernels/cpu/relu_op.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
Licensed under the Apache License, Version 2.0 (the "License");
3+
you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
==============================================================================*/
14+
15+
116
#include "absl/container/inlined_vector.h"
217
#include "tensorflow/c/kernels.h"
318
#include "tensorflow/c/ops.h"

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/plugin_device.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#include <iostream>
217

318
#include "tensorflow/c/experimental/stream_executor/stream_executor.h"

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/plugin_device.h

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
16+
117
#ifndef TENSORFLOW_PLUGIN_SRC_PLUGIN_DEVICE_H_
218
#define TENSORFLOW_PLUGIN_SRC_PLUGIN_DEVICE_H_
319

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/plugin_graph.cc

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
16+
117
#include "tensorflow/c/experimental/grappler/grappler.h"
218
#include "tensorflow_plugin/src/graph/plugin_optimizer.h"
319

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/plugin_kernel.cc

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
16+
117
#include <iostream>
218
#include "tensorflow/c/kernels.h"
319
#include "tensorflow_plugin/src/kernels/cpu/cpu_kernel_init.h"

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/plugin_kernel.h

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
16+
117
#ifndef TENSORFLOW_PLUGIN_SRC_PLUGIN_KERNEL_H_
218
#define TENSORFLOW_PLUGIN_SRC_PLUGIN_KERNEL_H_
319

rfcs/20200624-pluggable-device-for-tensorflow/sample/tensorflow_plugin/src/plugin_profiler.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
==============================================================================*/
15+
116
#include "plugin_device.h"
217
#include "tensorflow/c/experimental/pluggable_profiler/pluggable_profiler.h"
318
#include "tensorflow_plugin/src/profiler/cpu/demo_profiler.h"

0 commit comments

Comments
 (0)