Move TensorFlow-specific TPU driver into separate build packages

PiperOrigin-RevId: 293870345
Change-Id: I12bbdad276760c55b701aa014f9bb1032a965a4e
This commit is contained in:
Frank Chen 2020-02-07 12:26:10 -08:00 committed by TensorFlower Gardener
parent 9fe658641e
commit 6957c7befa
3 changed files with 40 additions and 10 deletions

View File

@ -89,3 +89,8 @@ cc_library(
name = "libtpu",
hdrs = ["libtpu.h"],
)
cc_library(
name = "libtftpu",
hdrs = ["libtftpu.h"],
)

View File

@ -0,0 +1,35 @@
/* Copyright 2020 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.
==============================================================================*/
#ifndef TENSORFLOW_COMPILER_XLA_PYTHON_TPU_DRIVER_CLIENT_LIBTFTPU_H_
#define TENSORFLOW_COMPILER_XLA_PYTHON_TPU_DRIVER_CLIENT_LIBTFTPU_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef struct TfTpuDriver_CompileOp TfTpuDriver_CompileOp;
TfTpuDriver_CompileOp* TfTpuDriver_CompileOpConstructor(void* ctx);
void TfTpuDriver_CompileOpExecute(TfTpuDriver_CompileOp* op, void* ctx);
void TfTpuDriver_CompileOpFree(TfTpuDriver_CompileOp* op);
#ifdef __cplusplus
}
#endif
#endif // TENSORFLOW_COMPILER_XLA_PYTHON_TPU_DRIVER_CLIENT_LIBTFTPU_H_

View File

@ -257,16 +257,6 @@ TPUDRIVER_CAPI_EXPORT extern PrototypeTpuDriver_FreeEvent TpuDriver_FreeEvent;
TPUDRIVER_CAPI_EXPORT extern PrototypeTpuDriver_FreeStatus TpuDriver_FreeStatus;
TPUDRIVER_CAPI_EXPORT extern PrototypeTpuDriver_Version TpuDriver_Version;
// ------------------- TensorFlow Support -----------------------
typedef struct TfTpuDriver_CompileOp TfTpuDriver_CompileOp;
TfTpuDriver_CompileOp* TfTpuDriver_CompileOpConstructor(void* ctx);
void TfTpuDriver_CompileOpExecute(TfTpuDriver_CompileOp* op, void* ctx);
void TfTpuDriver_CompileOpFree(TfTpuDriver_CompileOp* op);
#ifdef __cplusplus
}
#endif