[go: nahoru, domu]

Skip to content

Commit

Permalink
Revert "Branch 175277161"
Browse files Browse the repository at this point in the history
  • Loading branch information
martinwicke committed Nov 10, 2017
1 parent 047d796 commit d0a5d88
Show file tree
Hide file tree
Showing 542 changed files with 10,708 additions and 20,624 deletions.
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The Code of Conduct also applies within project spaces and in public spaces when

Conflicts in an open source project can take many forms, from someone having a bad day and using harsh and hurtful language in the issue queue, to more serious instances such as sexist/racist statements or threats of violence, and everything in between.

If the behaviour is threatening or harassing, or for other reasons requires immediate escalation, please see below.
If the behavior is threatening or harassing, or for other reasons requires immediate escalation, please see below.

However, for the vast majority of issues, we aim to empower individuals to first resolve conflicts themselves, asking for help when needed, and only after that fails to escalate further. This approach gives people more control over the outcome of their dispute.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ $ python

## For more information

* [TensorFlow website](https://www.tensorflow.org)
* [TensorFlow Website](https://www.tensorflow.org)
* [TensorFlow White Papers](https://www.tensorflow.org/about/bib)
* [TensorFlow Model Zoo](https://github.com/tensorflow/models)
* [TensorFlow MOOC on Udacity](https://www.udacity.com/course/deep-learning--ud730)
* [TensorFlow course at Stanford](https://web.stanford.edu/class/cs20si)
* [TensorFlow Course at Stanford](https://web.stanford.edu/class/cs20si)

Learn more about the TensorFlow community at the [community page of tensorflow.org](https://www.tensorflow.org/community) for a few ways to participate.

Expand Down
47 changes: 37 additions & 10 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
'Toolkit/CUDA/v%s' % _DEFAULT_CUDA_VERSION)
_TF_OPENCL_VERSION = '1.2'
_DEFAULT_COMPUTECPP_TOOLKIT_PATH = '/usr/local/computecpp'
_DEFAULT_TRISYCL_INCLUDE_DIR = '/usr/local/triSYCL/include'


def is_windows():
Expand Down Expand Up @@ -487,11 +488,10 @@ def set_cc_opt_flags(environ_cp):
cc_opt_flags = get_from_env_or_user_or_default(environ_cp, 'CC_OPT_FLAGS',
question, default_cc_opt_flags)
for opt in cc_opt_flags.split():
write_to_bazelrc('build:opt --cxxopt=%s --copt=%s' % (opt, opt))
host_opt = '-march=native' # It should be safe on the same build host.
write_to_bazelrc(
'build:opt --host_cxxopt=%s --host_copt=%s' % (host_opt, host_opt))
write_to_bazelrc('build:opt --define with_default_optimizations=true')
host_opt = '-march=native' # It should be safe on the same build host.
write_to_bazelrc(
'build:opt --cxxopt=%s --copt=%s' % (opt, opt) +
' --host_cxxopt=%s --host_copt=%s' % (host_opt, host_opt))


def set_tf_cuda_clang(environ_cp):
Expand Down Expand Up @@ -641,7 +641,7 @@ def set_tf_cuda_version(environ_cp):
write_action_env_to_bazelrc('TF_CUDA_VERSION', tf_cuda_version)


def set_tf_cunn_version(environ_cp):
def set_tf_cudnn_version(environ_cp):
"""Set CUDNN_INSTALL_PATH and TF_CUDNN_VERSION."""
ask_cudnn_version = (
'Please specify the cuDNN version you want to use. '
Expand Down Expand Up @@ -887,6 +887,27 @@ def set_computecpp_toolkit_path(environ_cp):
write_action_env_to_bazelrc('COMPUTECPP_TOOLKIT_PATH',
computecpp_toolkit_path)

def set_trisycl_include_dir(environ_cp):
"""Set TRISYCL_INCLUDE_DIR"""
ask_trisycl_include_dir = ('Please specify the location of the triSYCL '
'include directory. (Use --config=sycl_trisycl '
'when building with Bazel) '
'[Default is %s]: '
) % (_DEFAULT_TRISYCL_INCLUDE_DIR)
while True:
trisycl_include_dir = get_from_env_or_user_or_default(
environ_cp, 'TRISYCL_INCLUDE_DIR', ask_trisycl_include_dir,
_DEFAULT_TRISYCL_INCLUDE_DIR)
if os.path.exists(trisycl_include_dir):
break

print('Invalid triSYCL include directory, %s cannot be found'
% (trisycl_include_dir))

# Set TRISYCL_INCLUDE_DIR
environ_cp['TRISYCL_INCLUDE_DIR'] = trisycl_include_dir
write_action_env_to_bazelrc('TRISYCL_INCLUDE_DIR',
trisycl_include_dir)

def set_mpi_home(environ_cp):
"""Set MPI_HOME."""
Expand Down Expand Up @@ -999,6 +1020,8 @@ def main():
environ_cp['TF_NEED_GCP'] = '0'
environ_cp['TF_NEED_HDFS'] = '0'
environ_cp['TF_NEED_JEMALLOC'] = '0'
environ_cp['TF_NEED_OPENCL_SYCL'] = '0'
environ_cp['TF_NEED_COMPUTECPP'] = '0'
environ_cp['TF_NEED_OPENCL'] = '0'
environ_cp['TF_NEED_S3'] = '0'
environ_cp['TF_CUDA_CLANG'] = '0'
Expand All @@ -1021,17 +1044,21 @@ def main():
set_build_var(environ_cp, 'TF_NEED_VERBS', 'VERBS', 'with_verbs_support',
False, 'verbs')

set_action_env_var(environ_cp, 'TF_NEED_OPENCL', 'OpenCL', False)
if environ_cp.get('TF_NEED_OPENCL') == '1':
set_action_env_var(environ_cp, 'TF_NEED_OPENCL_SYCL', 'OpenCL SYCL', False)
if environ_cp.get('TF_NEED_OPENCL_SYCL') == '1':
set_host_cxx_compiler(environ_cp)
set_host_c_compiler(environ_cp)
set_computecpp_toolkit_path(environ_cp)
set_action_env_var(environ_cp, 'TF_NEED_COMPUTECPP', 'ComputeCPP', True)
if environ_cp.get('TF_NEED_COMPUTECPP') == '1':
set_computecpp_toolkit_path(environ_cp)
else:
set_trisycl_include_dir(environ_cp)

set_action_env_var(environ_cp, 'TF_NEED_CUDA', 'CUDA', False)
if (environ_cp.get('TF_NEED_CUDA') == '1' and
'TF_CUDA_CONFIG_REPO' not in environ_cp):
set_tf_cuda_version(environ_cp)
set_tf_cunn_version(environ_cp)
set_tf_cudnn_version(environ_cp)
set_tf_cuda_compute_capabilities(environ_cp)

set_tf_cuda_clang(environ_cp)
Expand Down
124 changes: 33 additions & 91 deletions tensorflow/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ config_setting(
visibility = ["//visibility:public"],
)

config_setting(
name = "raspberry_pi_armeabi",
values = {
"crosstool_top": "@local_config_arm_compiler//:toolchain",
"cpu": "armeabi",
},
visibility = ["//visibility:public"],
)

config_setting(
name = "android_arm",
values = {
Expand Down Expand Up @@ -110,7 +119,7 @@ config_setting(

config_setting(
name = "no_tensorflow_py_deps",
define_values = {"no_tensorflow_py_deps": "true"},
values = {"define": "no_tensorflow_py_deps=true"},
visibility = ["//visibility:public"],
)

Expand Down Expand Up @@ -166,122 +175,55 @@ config_setting(
# TODO(jhseu): Enable on other platforms other than Linux.
config_setting(
name = "with_jemalloc_linux_x86_64",
define_values = {"with_jemalloc": "true"},
values = {"cpu": "k8"},
values = {
"cpu": "k8",
"define": "with_jemalloc=true",
},
visibility = ["//visibility:public"],
)

config_setting(
name = "with_jemalloc_linux_ppc64le",
define_values = {"with_jemalloc": "true"},
values = {"cpu": "ppc"},
visibility = ["//visibility:public"],
)

config_setting(
name = "with_default_optimizations",
define_values = {"with_default_optimizations": "true"},
values = {
"cpu": "ppc",
"define": "with_jemalloc=true",
},
visibility = ["//visibility:public"],
)

config_setting(
name = "with_gcp_support",
define_values = {"with_gcp_support": "true"},
values = {"define": "with_gcp_support=true"},
visibility = ["//visibility:public"],
)

config_setting(
name = "with_hdfs_support",
define_values = {"with_hdfs_support": "true"},
values = {"define": "with_hdfs_support=true"},
visibility = ["//visibility:public"],
)

config_setting(
name = "with_s3_support",
define_values = {"with_s3_support": "true"},
visibility = ["//visibility:public"],
)

# Crosses between platforms and file system libraries not supported on those
# platforms due to limitations in nested select() statements.
config_setting(
name = "with_gcp_support_windows_override",
define_values = {"with_gcp_support": "true"},
values = {"cpu": "x64_windows"},
visibility = ["//visibility:public"],
)

config_setting(
name = "with_hdfs_support_windows_override",
define_values = {"with_hdfs_support": "true"},
values = {"cpu": "x64_windows"},
visibility = ["//visibility:public"],
)

config_setting(
name = "with_s3_support_windows_override",
define_values = {"with_s3_support": "true"},
values = {"cpu": "x64_windows"},
visibility = ["//visibility:public"],
)

config_setting(
name = "with_gcp_support_android_override",
define_values = {"with_gcp_support": "true"},
values = {"crosstool_top": "//external:android/crosstool"},
visibility = ["//visibility:public"],
)

config_setting(
name = "with_hdfs_support_android_override",
define_values = {"with_hdfs_support": "true"},
values = {"crosstool_top": "//external:android/crosstool"},
visibility = ["//visibility:public"],
)

config_setting(
name = "with_s3_support_android_override",
define_values = {"with_s3_support": "true"},
values = {"crosstool_top": "//external:android/crosstool"},
visibility = ["//visibility:public"],
)

config_setting(
name = "with_gcp_support_ios_override",
define_values = {"with_gcp_support": "true"},
values = {"crosstool_top": "//tools/osx/crosstool:crosstool"},
visibility = ["//visibility:public"],
)

config_setting(
name = "with_hdfs_support_ios_override",
define_values = {"with_hdfs_support": "true"},
values = {"crosstool_top": "//tools/osx/crosstool:crosstool"},
visibility = ["//visibility:public"],
)

config_setting(
name = "with_s3_support_ios_override",
define_values = {"with_s3_support": "true"},
values = {"crosstool_top": "//tools/osx/crosstool:crosstool"},
values = {"define": "with_s3_support=true"},
visibility = ["//visibility:public"],
)

config_setting(
name = "with_xla_support",
define_values = {"with_xla_support": "true"},
values = {"define": "with_xla_support=true"},
visibility = ["//visibility:public"],
)

config_setting(
name = "with_gdr_support",
define_values = {"with_gdr_support": "true"},
values = {"define": "with_gdr_support=true"},
visibility = ["//visibility:public"],
)

config_setting(
name = "with_verbs_support",
define_values = {"with_verbs_support": "true"},
values = {"define": "with_verbs_support=true"},
visibility = ["//visibility:public"],
)

Expand Down Expand Up @@ -355,7 +297,7 @@ config_setting(
visibility = ["//visibility:public"],
)

# Make a dummy rule that we can change "default" in select statements to.
# Make a dummy rule that we can chaqnge "default" in select statements to.
# to disable dependencies in copybara.
config_setting(
name = "dummy_disabled_internal",
Expand Down Expand Up @@ -384,6 +326,14 @@ filegroup(
visibility = ["//tensorflow:__subpackages__"],
)

py_library(
name = "tensorflow_py",
srcs = ["__init__.py"],
srcs_version = "PY2AND3",
visibility = ["//visibility:public"],
deps = ["//tensorflow/python"],
)

filegroup(
name = "all_opensource_files",
data = [
Expand Down Expand Up @@ -737,11 +687,3 @@ tf_cc_shared_object(
"//tensorflow/core:tensorflow",
],
)

py_library(
name = "tensorflow_py",
srcs = ["__init__.py"],
srcs_version = "PY2AND3",
visibility = ["//visibility:public"],
deps = ["//tensorflow/python"],
)
4 changes: 2 additions & 2 deletions tensorflow/c/c_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -890,8 +890,8 @@ const tensorflow::AttrValue* GetAttrValue(TF_Operation* oper,
TF_Status* status) {
const tensorflow::AttrValue* attr = oper->node.attrs().Find(attr_name);
if (attr == nullptr) {
status->status = InvalidArgument("Operation '", oper->node.name(),
"' has no attr named '", attr_name, "'.");
status->status =
InvalidArgument("Operation has no attr named '", attr_name, "'.");
}
return attr;
}
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/c/c_api_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ TEST(CAPI, Graph) {
EXPECT_EQ(TF_INVALID_ARGUMENT, TF_GetCode(s));

ASSERT_FALSE(GetAttrValue(feed, "missing", &attr_value, s));
EXPECT_EQ(string("Operation 'feed' has no attr named 'missing'."),
EXPECT_EQ(string("Operation has no attr named 'missing'."),
string(TF_Message(s)));

// Make a constant oper with the scalar "3".
Expand Down Expand Up @@ -1054,7 +1054,7 @@ class CApiColocationTest : public ::testing::Test {
TF_OperationGetAttrMetadata(op, tensorflow::kColocationAttrName, s_);
if (expected.empty()) {
ASSERT_EQ(TF_INVALID_ARGUMENT, TF_GetCode(s_)) << TF_Message(s_);
EXPECT_EQ(std::string("Operation 'add' has no attr named '_class'."),
EXPECT_EQ(std::string("Operation has no attr named '_class'."),
std::string(TF_Message(s_)));
return;
}
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/c/eager/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ tf_cuda_library(
tf_cuda_library(
name = "c_api_internal",
hdrs = ["c_api_internal.h"],
visibility = ["//tensorflow:internal"],
deps = [
":c_api",
":runtime",
Expand Down Expand Up @@ -106,6 +105,7 @@ tf_cc_test(

cc_library(
name = "tape",
srcs = ["tape.cc"],
hdrs = ["tape.h"],
visibility = ["//tensorflow:internal"],
deps = [
Expand Down
Loading

0 comments on commit d0a5d88

Please sign in to comment.