Skip to content

Commit ea08374

Browse files
author
Vijay Vasudevan
committed
Merge commit for internal changes
2 parents 99813c2 + d0a822f commit ea08374

24 files changed

+507
-42
lines changed

WORKSPACE

+12-12
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ new_git_repository(
9494
new_git_repository(
9595
name = "d3",
9696
build_file = "bower.BUILD",
97-
remote = "https://github.com/mbostock/d3.git",
97+
remote = "https://github.com/mbostock-bower/d3-bower.git",
9898
tag = "v3.5.6",
9999
)
100100

@@ -136,7 +136,7 @@ new_git_repository(
136136
new_git_repository(
137137
name = "iron_a11y_keys_behavior",
138138
build_file = "bower.BUILD",
139-
remote = "https://github.com/PolymerElements/iron-a11y-keys-behavior.git",
139+
remote = "https://github.com/polymerelements/iron-a11y-keys-behavior.git",
140140
tag = "v1.1.1",
141141
)
142142

@@ -151,7 +151,7 @@ new_git_repository(
151151
name = "iron_autogrow_textarea",
152152
build_file = "bower.BUILD",
153153
remote = "https://github.com/PolymerElements/iron-autogrow-textarea.git",
154-
tag = "v1.0.10",
154+
tag = "v1.0.11",
155155
)
156156

157157
new_git_repository(
@@ -179,7 +179,7 @@ new_git_repository(
179179
name = "iron_component_page",
180180
build_file = "bower.BUILD",
181181
remote = "https://github.com/PolymerElements/iron-component-page.git",
182-
tag = "v1.1.4",
182+
tag = "v1.1.3",
183183
)
184184

185185
new_git_repository(
@@ -193,7 +193,7 @@ new_git_repository(
193193
name = "iron_dropdown",
194194
build_file = "bower.BUILD",
195195
remote = "https://github.com/polymerelements/iron-dropdown.git",
196-
tag = "v1.1.0",
196+
tag = "v1.2.0",
197197
)
198198

199199
new_git_repository(
@@ -206,8 +206,8 @@ new_git_repository(
206206
new_git_repository(
207207
name = "iron_flex_layout",
208208
build_file = "bower.BUILD",
209-
remote = "https://github.com/polymerelements/iron-flex-layout.git",
210-
tag = "v1.2.2",
209+
remote = "https://github.com/PolymerElements/iron-flex-layout.git",
210+
tag = "v1.2.3",
211211
)
212212

213213
new_git_repository(
@@ -220,14 +220,14 @@ new_git_repository(
220220
new_git_repository(
221221
name = "iron_icon",
222222
build_file = "bower.BUILD",
223-
remote = "https://github.com/PolymerElements/iron-icon.git",
223+
remote = "https://github.com/polymerelements/iron-icon.git",
224224
tag = "v1.0.7",
225225
)
226226

227227
new_git_repository(
228228
name = "iron_icons",
229229
build_file = "bower.BUILD",
230-
remote = "https://github.com/PolymerElements/iron-icons.git",
230+
remote = "https://github.com/polymerelements/iron-icons.git",
231231
tag = "v1.1.3",
232232
)
233233

@@ -256,7 +256,7 @@ new_git_repository(
256256
name = "iron_menu_behavior",
257257
build_file = "bower.BUILD",
258258
remote = "https://github.com/PolymerElements/iron-menu-behavior.git",
259-
tag = "v1.1.0",
259+
tag = "v1.1.1",
260260
)
261261

262262
new_git_repository(
@@ -270,7 +270,7 @@ new_git_repository(
270270
name = "iron_overlay_behavior",
271271
build_file = "bower.BUILD",
272272
remote = "https://github.com/polymerelements/iron-overlay-behavior.git",
273-
tag = "v1.2.0",
273+
tag = "v1.3.2",
274274
)
275275

276276
new_git_repository(
@@ -284,7 +284,7 @@ new_git_repository(
284284
name = "iron_resizable_behavior",
285285
build_file = "bower.BUILD",
286286
remote = "https://github.com/polymerelements/iron-resizable-behavior.git",
287-
tag = "v1.0.2",
287+
tag = "v1.0.3",
288288
)
289289

290290
new_git_repository(

tensorflow/core/common_runtime/gpu/gpu_allocator_retry.cc

-13
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,4 @@ void* GPUAllocatorRetry::AllocateRaw(
5555
return ptr;
5656
}
5757

58-
void GPUAllocatorRetry::DeallocateRaw(std::function<void(void*)> dealloc_func,
59-
void* ptr) {
60-
if (ptr == nullptr) {
61-
LOG(ERROR) << "Request to free nullptr";
62-
return;
63-
}
64-
dealloc_func(ptr);
65-
{
66-
mutex_lock l(mu_);
67-
memory_returned_.notify_all();
68-
}
69-
}
70-
7158
} // namespace tensorflow

tensorflow/core/common_runtime/gpu/gpu_allocator_retry.h

+12-4
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,25 @@ class GPUAllocatorRetry {
3636
// set to true. The value returned is either the first good pointer
3737
// obtained from 'alloc_func' or nullptr.
3838
void* AllocateRaw(std::function<void*(size_t alignment, size_t num_bytes,
39-
bool verbose_failure)> alloc_func,
39+
bool verbose_failure)>
40+
alloc_func,
4041
int max_millis_to_wait, size_t alignment, size_t bytes);
4142

42-
// Calls dealloc_func(ptr) and then notifies any threads blocked in
43-
// AllocateRaw() that would like to retry.
44-
void DeallocateRaw(std::function<void(void* ptr)> dealloc_func, void* ptr);
43+
// Called to notify clients that some memory was returned.
44+
void NotifyDealloc();
4545

4646
private:
4747
Env* env_;
4848
mutex mu_;
4949
condition_variable memory_returned_;
5050
};
51+
52+
// Implementation details below
53+
inline void GPUAllocatorRetry::NotifyDealloc() {
54+
mutex_lock l(mu_);
55+
memory_returned_.notify_all();
56+
}
57+
5158
} // namespace tensorflow
59+
5260
#endif // TENSORFLOW_CORE_COMMON_RUNTIME_GPU_GPU_ALLOCATOR_RETRY_H_

tensorflow/core/common_runtime/gpu/gpu_allocator_retry_test.cc

+3-6
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,9 @@ class FakeAllocator {
4949
}
5050

5151
void DeallocateRaw(void* ptr) {
52-
retry_.DeallocateRaw(
53-
[this](void* p) {
54-
mutex_lock l(mu_);
55-
++memory_capacity_;
56-
},
57-
ptr);
52+
mutex_lock l(mu_);
53+
++memory_capacity_;
54+
retry_.NotifyDealloc();
5855
}
5956

6057
private:

tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ void GPUBFCAllocator::SplitChunk(GPUBFCAllocator::ChunkHandle h,
290290
}
291291

292292
void GPUBFCAllocator::DeallocateRaw(void* ptr) {
293-
retry_helper_.DeallocateRaw([this](void* p) { DeallocateRawInternal(p); },
294-
ptr);
293+
DeallocateRawInternal(ptr);
294+
retry_helper_.NotifyDealloc();
295295
}
296296

297297
void GPUBFCAllocator::DeallocateRawInternal(void* ptr) {

tensorflow/python/lib/io/tf_record.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __init__(self, path):
6969

7070
def __enter__(self):
7171
"""Enter a `with` block."""
72-
pass
72+
return self
7373

7474
def __exit__(self, unused_type, unused_value, unused_traceback):
7575
"""Exit a `with` block, closing the file."""

tensorflow/python/ops/batch_norm_benchmark.py

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2015 Google Inc. 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
"""End-to-end benchmark for batch normalization."""
216
from __future__ import absolute_import
317
from __future__ import division

tensorflow/stream_executor/dso_loader.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ string GetCudnnVersion() { return ""; }
6969
}
7070

7171
/* static */ port::Status DsoLoader::GetLibcudaDsoHandle(void** dso_handle) {
72-
return GetDsoHandle(FindDsoPath("libcuda.so" + GetCudaVersion(),
73-
"third_party/gpus/cuda/driver/lib64"),
74-
dso_handle);
72+
return GetDsoHandle(
73+
FindDsoPath("libcuda.so.1", "third_party/gpus/cuda/driver/lib64"),
74+
dso_handle);
7575
}
7676

7777
/* static */ port::Status DsoLoader::GetLibcuptiDsoHandle(void** dso_handle) {

tensorflow/tensorboard/bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"iron-ajax": "PolymerElements/iron-ajax#1.1.1",
2323
"iron-behaviors": "PolymerElements/iron-behaviors#1.0.10",
2424
"iron-collapse": "PolymerElements/iron-collapse#1.0.5",
25+
"iron-component-page": "PolymerElements/iron-component-page#1.1.3",
2526
"iron-list": "PolymerElements/iron-list#1.1.7",
2627
"iron-selector": "PolymerElements/iron-selector#1.0.7",
2728
"paper-behaviors": "PolymerElements/paper-behaviors#1.0.9",
@@ -45,7 +46,6 @@
4546
"paper-tabs": "PolymerElements/paper-tabs#1.0.4"
4647
},
4748
"devDependencies": {
48-
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
4949
"web-component-tester": "Polymer/web-component-tester"
5050
},
5151
"resolutions": {

0 commit comments

Comments
 (0)