lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #255998 from zeuner/tensorflow-2-13

tensorflow: 2.11.1 -> 2.13.0

authored by

Martin Weinelt and committed by
GitHub
c05811cf de4db3f4

+751 -38
+11
pkgs/development/python-modules/tensorflow/absl_py_argparse_flags.patch
··· 1 + diff -Naurd x/third_party/systemlibs/absl_py.absl.flags.BUILD y/third_party/systemlibs/absl_py.absl.flags.BUILD 2 + --- x/third_party/systemlibs/absl_py.absl.flags.BUILD 2023-09-20 06:02:15.079683729 +0000 3 + +++ y/third_party/systemlibs/absl_py.absl.flags.BUILD 2023-09-20 06:04:58.491897303 +0000 4 + @@ -5,3 +5,7 @@ 5 + py_library( 6 + name = "flags", 7 + ) 8 + + 9 + +py_library( 10 + + name = "argparse_flags", 11 + +)
+389
pkgs/development/python-modules/tensorflow/absl_to_std.patch
··· 1 + diff -Naurd x/tensorflow/c/experimental/stream_executor/stream_executor.cc y/tensorflow/c/experimental/stream_executor/stream_executor.cc 2 + --- x/tensorflow/c/experimental/stream_executor/stream_executor.cc 2023-10-19 14:25:48.648646416 +0000 3 + +++ y/tensorflow/c/experimental/stream_executor/stream_executor.cc 2023-10-19 14:29:11.700743574 +0000 4 + @@ -23,6 +23,7 @@ 5 + 6 + #include <string> 7 + #include <utility> 8 + +#include <optional> 9 + 10 + #include "absl/functional/any_invocable.h" 11 + #include "tensorflow/c/c_api_macros.h" 12 + @@ -275,17 +276,17 @@ 13 + stream_executor_->unified_memory_deallocate(&device_, mem); 14 + } 15 + 16 + - absl::optional<AllocatorStats> GetAllocatorStats() override { 17 + + std::optional<AllocatorStats> GetAllocatorStats() override { 18 + SP_AllocatorStats c_stats{SP_ALLOCATORSTATS_STRUCT_SIZE}; 19 + TF_Bool has_stats = 20 + stream_executor_->get_allocator_stats(&device_, &c_stats); 21 + if (!has_stats) { 22 + - return absl::nullopt; 23 + + return std::nullopt; 24 + } 25 + tsl::Status status = ValidateSPAllocatorStats(c_stats); 26 + if (!status.ok()) { 27 + LOG(ERROR) << status.message(); 28 + - return absl::nullopt; 29 + + return std::nullopt; 30 + } 31 + ::stream_executor::AllocatorStats stats; 32 + stats.num_allocs = c_stats.num_allocs; 33 + diff -Naurd x/tensorflow/c/experimental/stream_executor/stream_executor_test.cc y/tensorflow/c/experimental/stream_executor/stream_executor_test.cc 34 + --- x/tensorflow/c/experimental/stream_executor/stream_executor_test.cc 2023-10-19 14:25:48.648646416 +0000 35 + +++ y/tensorflow/c/experimental/stream_executor/stream_executor_test.cc 2023-10-19 14:29:11.700743574 +0000 36 + @@ -15,6 +15,7 @@ 37 + #include "tensorflow/c/experimental/stream_executor/stream_executor.h" 38 + 39 + #include <utility> 40 + +#include <optional> 41 + 42 + #include "tensorflow/c/experimental/stream_executor/stream_executor_internal.h" 43 + #include "tensorflow/c/experimental/stream_executor/stream_executor_test_util.h" 44 + @@ -239,7 +240,7 @@ 45 + }; 46 + 47 + StreamExecutor* executor = GetExecutor(0); 48 + - absl::optional<AllocatorStats> optional_stats = executor->GetAllocatorStats(); 49 + + std::optional<AllocatorStats> optional_stats = executor->GetAllocatorStats(); 50 + ASSERT_TRUE(optional_stats.has_value()); 51 + AllocatorStats stats = optional_stats.value(); 52 + ASSERT_EQ(stats.bytes_in_use, 123); 53 + diff -Naurd x/tensorflow/compiler/xla/stream_executor/allocator_stats.h y/tensorflow/compiler/xla/stream_executor/allocator_stats.h 54 + --- x/tensorflow/compiler/xla/stream_executor/allocator_stats.h 2023-10-19 14:25:55.064649379 +0000 55 + +++ y/tensorflow/compiler/xla/stream_executor/allocator_stats.h 2023-10-19 14:29:11.700743574 +0000 56 + @@ -17,6 +17,7 @@ 57 + #define TENSORFLOW_COMPILER_XLA_STREAM_EXECUTOR_ALLOCATOR_STATS_H_ 58 + 59 + #include <string> 60 + +#include <optional> 61 + 62 + #include "absl/types/optional.h" 63 + #include "tensorflow/compiler/xla/stream_executor/platform/port.h" 64 + diff -Naurd x/tensorflow/core/common_runtime/mkl_cpu_allocator.h y/tensorflow/core/common_runtime/mkl_cpu_allocator.h 65 + --- x/tensorflow/core/common_runtime/mkl_cpu_allocator.h 2023-10-19 14:25:58.996651199 +0000 66 + +++ y/tensorflow/core/common_runtime/mkl_cpu_allocator.h 2023-10-19 14:29:11.700743574 +0000 67 + @@ -22,6 +22,7 @@ 68 + #ifdef INTEL_MKL 69 + 70 + #include <cstdlib> 71 + +#include <optional> 72 + 73 + #include "tensorflow/core/common_runtime/bfc_allocator.h" 74 + #include "tensorflow/core/common_runtime/pool_allocator.h" 75 + @@ -80,7 +81,7 @@ 76 + port::AlignedFree(ptr); 77 + } 78 + 79 + - absl::optional<AllocatorStats> GetStats() override { 80 + + std::optional<AllocatorStats> GetStats() override { 81 + mutex_lock l(mutex_); 82 + return stats_; 83 + } 84 + @@ -242,7 +243,7 @@ 85 + large_size_allocator_->DeallocateRaw(ptr); 86 + } 87 + } 88 + - absl::optional<AllocatorStats> GetStats() override { 89 + + std::optional<AllocatorStats> GetStats() override { 90 + auto s_stats = small_size_allocator_->GetStats(); 91 + auto l_stats = large_size_allocator_->GetStats(); 92 + 93 + diff -Naurd x/tensorflow/core/common_runtime/pluggable_device/pluggable_device_simple_allocator.cc y/tensorflow/core/common_runtime/pluggable_device/pluggable_device_simple_allocator.cc 94 + --- x/tensorflow/core/common_runtime/pluggable_device/pluggable_device_simple_allocator.cc 2023-10-19 14:25:59.236651310 +0000 95 + +++ y/tensorflow/core/common_runtime/pluggable_device/pluggable_device_simple_allocator.cc 2023-10-19 14:29:11.700743574 +0000 96 + @@ -32,7 +32,7 @@ 97 + return sub_allocator_->Free(ptr, 0); 98 + } 99 + 100 + -absl::optional<AllocatorStats> PluggableDeviceSimpleAllocator::GetStats() { 101 + +std::optional<AllocatorStats> PluggableDeviceSimpleAllocator::GetStats() { 102 + AllocatorStats stats_; 103 + stats_.num_allocs = 0; 104 + stats_.peak_bytes_in_use = 0; 105 + diff -Naurd x/tensorflow/core/common_runtime/pluggable_device/pluggable_device_simple_allocator.h y/tensorflow/core/common_runtime/pluggable_device/pluggable_device_simple_allocator.h 106 + --- x/tensorflow/core/common_runtime/pluggable_device/pluggable_device_simple_allocator.h 2023-10-19 14:25:59.236651310 +0000 107 + +++ y/tensorflow/core/common_runtime/pluggable_device/pluggable_device_simple_allocator.h 2023-10-19 14:29:11.700743574 +0000 108 + @@ -19,6 +19,7 @@ 109 + #include <string> 110 + #include <unordered_map> 111 + #include <vector> 112 + +#include <optional> 113 + 114 + #include "tensorflow/core/common_runtime/device/device_mem_allocator.h" 115 + #include "tensorflow/core/platform/thread_annotations.h" 116 + @@ -37,7 +38,7 @@ 117 + 118 + bool TracksAllocationSizes() const override { return false; } 119 + string Name() override { return "Simple allocator"; } 120 + - absl::optional<AllocatorStats> GetStats() override; 121 + + std::optional<AllocatorStats> GetStats() override; 122 + 123 + AllocatorMemoryType GetMemoryType() const override { 124 + return sub_allocator_->GetMemoryType(); 125 + diff -Naurd x/tensorflow/core/common_runtime/process_state.h y/tensorflow/core/common_runtime/process_state.h 126 + --- x/tensorflow/core/common_runtime/process_state.h 2023-10-19 14:25:59.076651236 +0000 127 + +++ y/tensorflow/core/common_runtime/process_state.h 2023-10-19 14:29:11.704743576 +0000 128 + @@ -20,6 +20,7 @@ 129 + #include <map> 130 + #include <unordered_map> 131 + #include <vector> 132 + +#include <optional> 133 + 134 + #include "tensorflow/core/framework/allocator.h" 135 + #include "tensorflow/core/framework/allocator_registry.h" 136 + @@ -144,7 +145,7 @@ 137 + size_t AllocatedSize(const void* p) const override { 138 + return a_->AllocatedSize(p); 139 + } 140 + - absl::optional<AllocatorStats> GetStats() override { return a_->GetStats(); } 141 + + std::optional<AllocatorStats> GetStats() override { return a_->GetStats(); } 142 + bool ClearStats() override { return a_->ClearStats(); } 143 + 144 + AllocatorMemoryType GetMemoryType() const override { 145 + diff -Naurd x/tensorflow/core/common_runtime/step_stats_collector.cc y/tensorflow/core/common_runtime/step_stats_collector.cc 146 + --- x/tensorflow/core/common_runtime/step_stats_collector.cc 2023-10-19 14:25:59.112651253 +0000 147 + +++ y/tensorflow/core/common_runtime/step_stats_collector.cc 2023-10-19 14:29:11.704743576 +0000 148 + @@ -15,6 +15,7 @@ 149 + #include "tensorflow/core/common_runtime/step_stats_collector.h" 150 + 151 + #include <memory> 152 + +#include <optional> 153 + 154 + #include "tensorflow/core/common_runtime/costmodel_manager.h" 155 + #include "tensorflow/core/framework/allocation_description.pb.h" 156 + @@ -175,7 +176,7 @@ 157 + memory->set_peak_bytes(std::get<1>(sizes)); 158 + memory->set_live_bytes(std::get<2>(sizes)); 159 + 160 + - absl::optional<AllocatorStats> stats = allocator->GetStats(); 161 + + std::optional<AllocatorStats> stats = allocator->GetStats(); 162 + if (stats) { 163 + memory->set_allocator_bytes_in_use(stats->bytes_in_use); 164 + } 165 + diff -Naurd x/tensorflow/core/framework/allocator_test.cc y/tensorflow/core/framework/allocator_test.cc 166 + --- x/tensorflow/core/framework/allocator_test.cc 2023-10-19 14:25:59.524651443 +0000 167 + +++ y/tensorflow/core/framework/allocator_test.cc 2023-10-19 14:29:11.704743576 +0000 168 + @@ -17,6 +17,7 @@ 169 + 170 + #include <algorithm> 171 + #include <vector> 172 + +#include <optional> 173 + 174 + #include "tensorflow/core/framework/typed_allocator.h" 175 + #include "tensorflow/core/platform/logging.h" 176 + @@ -33,7 +34,7 @@ 177 + 178 + static void CheckStats(Allocator* a, int64_t num_allocs, int64_t bytes_in_use, 179 + int64_t peak_bytes_in_use, int64_t largest_alloc_size) { 180 + - absl::optional<AllocatorStats> stats = a->GetStats(); 181 + + std::optional<AllocatorStats> stats = a->GetStats(); 182 + EXPECT_TRUE(stats); 183 + if (!stats) { 184 + return; 185 + @@ -255,7 +256,7 @@ 186 + EXPECT_EQ(e0.Name(), "MemoryAllocation") 187 + << "XSpace: " << xspace.DebugString(); 188 + { 189 + - absl::optional<std::string> bytes_allocated, peak_bytes_in_use, 190 + + std::optional<std::string> bytes_allocated, peak_bytes_in_use, 191 + requested_bytes, allocation_bytes; 192 + e0.ForEachStat([&](const ::tensorflow::profiler::XStatVisitor& stat) { 193 + LOG(ERROR) << "STAT " << stat.Name() << ": " << stat.ToString(); 194 + @@ -282,7 +283,7 @@ 195 + EXPECT_EQ(e1.Name(), "MemoryDeallocation") 196 + << "XSpace: " << xspace.DebugString(); 197 + { 198 + - absl::optional<std::string> bytes_allocated, peak_bytes_in_use, 199 + + std::optional<std::string> bytes_allocated, peak_bytes_in_use, 200 + allocation_bytes; 201 + e1.ForEachStat([&](const ::tensorflow::profiler::XStatVisitor& stat) { 202 + if (stat.Name() == "bytes_allocated") { 203 + diff -Naurd x/tensorflow/core/framework/tracking_allocator_test.cc y/tensorflow/core/framework/tracking_allocator_test.cc 204 + --- x/tensorflow/core/framework/tracking_allocator_test.cc 2023-10-19 14:25:59.700651525 +0000 205 + +++ y/tensorflow/core/framework/tracking_allocator_test.cc 2023-10-19 14:29:11.704743576 +0000 206 + @@ -16,6 +16,7 @@ 207 + #include "tensorflow/core/framework/tracking_allocator.h" 208 + 209 + #include <unordered_map> 210 + +#include <optional> 211 + 212 + #include "tensorflow/core/framework/allocator.h" 213 + #include "tensorflow/core/platform/logging.h" 214 + @@ -44,7 +45,7 @@ 215 + EXPECT_NE(size_map_.end(), iter); 216 + return iter->second; 217 + } 218 + - absl::optional<AllocatorStats> GetStats() override { return absl::nullopt; } 219 + + std::optional<AllocatorStats> GetStats() override { return std::nullopt; } 220 + 221 + private: 222 + std::unordered_map<const void*, size_t> size_map_; 223 + @@ -58,7 +59,7 @@ 224 + } 225 + void DeallocateRaw(void* ptr) override {} 226 + bool TracksAllocationSizes() const override { return true; } 227 + - absl::optional<AllocatorStats> GetStats() override { return absl::nullopt; } 228 + + std::optional<AllocatorStats> GetStats() override { return std::nullopt; } 229 + }; 230 + 231 + TEST(TrackingAllocatorTest, SimpleNoTracking) { 232 + diff -Naurd x/tensorflow/core/grappler/clusters/single_machine.cc y/tensorflow/core/grappler/clusters/single_machine.cc 233 + --- x/tensorflow/core/grappler/clusters/single_machine.cc 2023-10-19 14:25:59.964651648 +0000 234 + +++ y/tensorflow/core/grappler/clusters/single_machine.cc 2023-10-19 14:29:11.704743576 +0000 235 + @@ -17,6 +17,7 @@ 236 + 237 + #include <atomic> 238 + #include <memory> 239 + +#include <optional> 240 + 241 + #include "tensorflow/cc/training/queue_runner.h" 242 + #include "tensorflow/core/common_runtime/device.h" 243 + @@ -230,7 +231,7 @@ 244 + return Status(absl::StatusCode::kInvalidArgument, 245 + "Tracking allocation is not enabled."); 246 + } 247 + - absl::optional<AllocatorStats> stats = allocator->GetStats(); 248 + + std::optional<AllocatorStats> stats = allocator->GetStats(); 249 + (*device_peak_memory)[device->name()] = 250 + (stats ? stats->peak_bytes_in_use : 0); 251 + } 252 + diff -Naurd x/tensorflow/core/kernels/stack.cc y/tensorflow/core/kernels/stack.cc 253 + --- x/tensorflow/core/kernels/stack.cc 2023-10-19 14:26:01.668652437 +0000 254 + +++ y/tensorflow/core/kernels/stack.cc 2023-10-19 14:29:11.704743576 +0000 255 + @@ -18,6 +18,7 @@ 256 + #include <limits.h> 257 + #include <atomic> 258 + #include <vector> 259 + +#include <optional> 260 + 261 + #include "tensorflow/core/common_runtime/device.h" 262 + #include "tensorflow/core/framework/device_base.h" 263 + @@ -245,7 +246,7 @@ 264 + DeviceContext* device_ctxt = ctx->op_device_context(); 265 + auto device = static_cast<tensorflow::Device*>(ctx->device()); 266 + Allocator* allocator = device->GetAllocator(alloc_attrs); 267 + - absl::optional<AllocatorStats> stats = allocator->GetStats(); 268 + + std::optional<AllocatorStats> stats = allocator->GetStats(); 269 + if (stats && *stats->bytes_limit && 270 + stats->bytes_in_use > (*stats->bytes_limit * kOccupancy)) { 271 + // Asynchronously copy the tensor from GPU to CPU memory. 272 + diff -Naurd x/tensorflow/python/tfe_wrapper.cc y/tensorflow/python/tfe_wrapper.cc 273 + --- x/tensorflow/python/tfe_wrapper.cc 2023-10-19 14:26:10.716656639 +0000 274 + +++ y/tensorflow/python/tfe_wrapper.cc 2023-10-19 14:29:11.708743578 +0000 275 + @@ -14,6 +14,7 @@ 276 + ==============================================================================*/ 277 + 278 + #include <memory> 279 + +#include <optional> 280 + 281 + #include "Python.h" 282 + #include "absl/strings/match.h" 283 + @@ -691,7 +692,7 @@ 284 + tensorflow::AllocatorAttributes attrs; 285 + tensorflow::Allocator* allocator = matched_device->GetAllocator(attrs); 286 + 287 + - if (absl::optional<tensorflow::AllocatorStats> stats = 288 + + if (std::optional<tensorflow::AllocatorStats> stats = 289 + allocator->GetStats()) { 290 + return std::map<std::string, int64_t>{{"current", stats->bytes_in_use}, 291 + {"peak", stats->peak_bytes_in_use}}; 292 + diff -Naurd x/tensorflow/tsl/framework/allocator.h y/tensorflow/tsl/framework/allocator.h 293 + --- x/tensorflow/tsl/framework/allocator.h 2023-10-19 14:26:15.884659044 +0000 294 + +++ y/tensorflow/tsl/framework/allocator.h 2023-10-19 14:29:11.708743578 +0000 295 + @@ -216,7 +216,7 @@ 296 + } 297 + 298 + // Fills in 'stats' with statistics collected by this allocator. 299 + - virtual absl::optional<AllocatorStats> GetStats() { return absl::nullopt; } 300 + + virtual std::optional<AllocatorStats> GetStats() { return std::nullopt; } 301 + 302 + // If implemented, clears the internal stats except for the `in_use` fields 303 + // and sets the `peak_bytes_in_use` to be equal to the `bytes_in_use`. Returns 304 + diff -Naurd x/tensorflow/tsl/framework/bfc_allocator.cc y/tensorflow/tsl/framework/bfc_allocator.cc 305 + --- x/tensorflow/tsl/framework/bfc_allocator.cc 2023-10-19 14:26:15.900659052 +0000 306 + +++ y/tensorflow/tsl/framework/bfc_allocator.cc 2023-10-19 14:29:11.708743578 +0000 307 + @@ -1205,7 +1205,7 @@ 308 + return md; 309 + } 310 + 311 + -absl::optional<AllocatorStats> BFCAllocator::GetStats() { 312 + +std::optional<AllocatorStats> BFCAllocator::GetStats() { 313 + mutex_lock l(lock_); 314 + return stats_; 315 + } 316 + diff -Naurd x/tensorflow/tsl/framework/bfc_allocator.h y/tensorflow/tsl/framework/bfc_allocator.h 317 + --- x/tensorflow/tsl/framework/bfc_allocator.h 2023-10-19 14:26:15.900659052 +0000 318 + +++ y/tensorflow/tsl/framework/bfc_allocator.h 2023-10-19 14:29:11.708743578 +0000 319 + @@ -22,6 +22,7 @@ 320 + #include <string> 321 + #include <unordered_map> 322 + #include <vector> 323 + +#include <optional> 324 + 325 + #include "absl/container/flat_hash_set.h" 326 + #include "tensorflow/tsl/framework/allocator.h" 327 + @@ -93,7 +94,7 @@ 328 + 329 + int64_t AllocationId(const void* ptr) const override; 330 + 331 + - absl::optional<AllocatorStats> GetStats() override; 332 + + std::optional<AllocatorStats> GetStats() override; 333 + 334 + bool ClearStats() override; 335 + 336 + diff -Naurd x/tensorflow/tsl/framework/cpu_allocator_impl.cc y/tensorflow/tsl/framework/cpu_allocator_impl.cc 337 + --- x/tensorflow/tsl/framework/cpu_allocator_impl.cc 2023-10-19 14:26:15.928659065 +0000 338 + +++ y/tensorflow/tsl/framework/cpu_allocator_impl.cc 2023-10-19 14:29:11.708743578 +0000 339 + @@ -15,6 +15,7 @@ 340 + 341 + #include <algorithm> 342 + #include <atomic> 343 + +#include <optional> 344 + 345 + #include "tensorflow/tsl/framework/allocator.h" 346 + #include "tensorflow/tsl/framework/allocator_registry.h" 347 + @@ -145,8 +146,8 @@ 348 + /*level=*/tsl::profiler::TraceMeLevel::kInfo); 349 + } 350 + 351 + - absl::optional<AllocatorStats> GetStats() override { 352 + - if (!cpu_allocator_collect_stats) return absl::nullopt; 353 + + std::optional<AllocatorStats> GetStats() override { 354 + + if (!cpu_allocator_collect_stats) return std::nullopt; 355 + mutex_lock l(mu_); 356 + return stats_; 357 + } 358 + diff -Naurd x/tensorflow/tsl/framework/tracking_allocator.cc y/tensorflow/tsl/framework/tracking_allocator.cc 359 + --- x/tensorflow/tsl/framework/tracking_allocator.cc 2023-10-19 14:26:15.968659084 +0000 360 + +++ y/tensorflow/tsl/framework/tracking_allocator.cc 2023-10-19 14:29:11.708743578 +0000 361 + @@ -152,7 +152,7 @@ 362 + } 363 + } 364 + 365 + -absl::optional<AllocatorStats> TrackingAllocator::GetStats() { 366 + +std::optional<AllocatorStats> TrackingAllocator::GetStats() { 367 + return allocator_->GetStats(); 368 + } 369 + 370 + diff -Naurd x/tensorflow/tsl/framework/tracking_allocator.h y/tensorflow/tsl/framework/tracking_allocator.h 371 + --- x/tensorflow/tsl/framework/tracking_allocator.h 2023-10-19 14:26:15.968659084 +0000 372 + +++ y/tensorflow/tsl/framework/tracking_allocator.h 2023-10-19 14:29:11.712743580 +0000 373 + @@ -17,6 +17,7 @@ 374 + #define TENSORFLOW_TSL_FRAMEWORK_TRACKING_ALLOCATOR_H_ 375 + 376 + #include <unordered_map> 377 + +#include <optional> 378 + 379 + #include "tensorflow/tsl/framework/allocator.h" 380 + #include "tensorflow/tsl/lib/gtl/inlined_vector.h" 381 + @@ -66,7 +67,7 @@ 382 + size_t RequestedSize(const void* ptr) const override; 383 + size_t AllocatedSize(const void* ptr) const override; 384 + int64_t AllocationId(const void* ptr) const override; 385 + - absl::optional<AllocatorStats> GetStats() override; 386 + + std::optional<AllocatorStats> GetStats() override; 387 + bool ClearStats() override; 388 + 389 + AllocatorMemoryType GetMemoryType() const override {
+166
pkgs/development/python-modules/tensorflow/com_google_absl_add_log.patch
··· 1 + diff -Naurd x/third_party/absl/system.absl.base.BUILD y/third_party/absl/system.absl.base.BUILD 2 + --- x/third_party/absl/system.absl.base.BUILD 2023-09-17 09:12:05.499753364 +0000 3 + +++ y/third_party/absl/system.absl.base.BUILD 2023-09-17 09:16:01.200082822 +0000 4 + @@ -22,7 +22,12 @@ 5 + 6 + cc_library( 7 + name = "raw_logging_internal", 8 + - linkopts = ["-labsl_raw_logging_internal"], 9 + + linkopts = [ 10 + + "-labsl_raw_logging_internal", 11 + + "-labsl_log_internal_conditions", 12 + + "-labsl_log_internal_message", 13 + + "-labsl_log_internal_nullguard", 14 + + ], 15 + visibility = [ 16 + "//absl:__subpackages__", 17 + ], 18 + diff -Naurd x/third_party/absl/system.absl.log.BUILD y/third_party/absl/system.absl.log.BUILD 19 + --- x/third_party/absl/system.absl.log.BUILD 1970-01-01 00:00:00.000000000 +0000 20 + +++ y/third_party/absl/system.absl.log.BUILD 2023-09-17 09:12:11.795762177 +0000 21 + @@ -0,0 +1,134 @@ 22 + +load("@rules_cc//cc:defs.bzl", "cc_library") 23 + + 24 + +package(default_visibility = ["//visibility:public"]) 25 + + 26 + +cc_library( 27 + + name = "absl_check", 28 + + deps = [ 29 + + ], 30 + +) 31 + + 32 + +cc_library( 33 + + name = "absl_log", 34 + + deps = [ 35 + + ], 36 + +) 37 + + 38 + +cc_library( 39 + + name = "check", 40 + + deps = [ 41 + + ], 42 + +) 43 + + 44 + +cc_library( 45 + + name = "die_if_null", 46 + + deps = [ 47 + + ":log", 48 + + "//absl/base:config", 49 + + "//absl/base:core_headers", 50 + + "//absl/strings", 51 + + ], 52 + +) 53 + + 54 + +cc_library( 55 + + name = "flags", 56 + + deps = [ 57 + + ":globals", 58 + + "//absl/base:config", 59 + + "//absl/base:core_headers", 60 + + "//absl/base:log_severity", 61 + + "//absl/flags:flag", 62 + + "//absl/flags:marshalling", 63 + + "//absl/strings", 64 + + ], 65 + +) 66 + + 67 + +cc_library( 68 + + name = "globals", 69 + + deps = [ 70 + + "//absl/base:atomic_hook", 71 + + "//absl/base:config", 72 + + "//absl/base:core_headers", 73 + + "//absl/base:log_severity", 74 + + "//absl/hash", 75 + + "//absl/strings", 76 + + ], 77 + +) 78 + + 79 + +cc_library( 80 + + name = "initialize", 81 + + deps = [ 82 + + ":globals", 83 + + "//absl/base:config", 84 + + "//absl/time", 85 + + ], 86 + +) 87 + + 88 + +cc_library( 89 + + name = "log", 90 + + deps = [ 91 + + ], 92 + +) 93 + + 94 + +cc_library( 95 + + name = "log_entry", 96 + + deps = [ 97 + + "//absl/base:config", 98 + + "//absl/base:core_headers", 99 + + "//absl/base:log_severity", 100 + + "//absl/strings", 101 + + "//absl/time", 102 + + "//absl/types:span", 103 + + ], 104 + +) 105 + + 106 + +cc_library( 107 + + name = "log_sink", 108 + + deps = [ 109 + + ":log_entry", 110 + + "//absl/base:config", 111 + + ], 112 + +) 113 + + 114 + +cc_library( 115 + + name = "log_sink_registry", 116 + + deps = [ 117 + + ":log_sink", 118 + + "//absl/base:config", 119 + + ], 120 + +) 121 + + 122 + +cc_library( 123 + + name = "log_streamer", 124 + + deps = [ 125 + + ":absl_log", 126 + + "//absl/base:config", 127 + + "//absl/base:log_severity", 128 + + "//absl/strings", 129 + + "//absl/strings:internal", 130 + + "//absl/types:optional", 131 + + "//absl/utility", 132 + + ], 133 + +) 134 + + 135 + +cc_library( 136 + + name = "scoped_mock_log", 137 + + deps = [ 138 + + ":log_entry", 139 + + ":log_sink", 140 + + ":log_sink_registry", 141 + + "//absl/base:config", 142 + + "//absl/base:log_severity", 143 + + "//absl/base:raw_logging_internal", 144 + + "//absl/strings", 145 + + "@com_google_googletest//:gtest", 146 + + ], 147 + +) 148 + + 149 + +cc_library( 150 + + name = "structured", 151 + + deps = [ 152 + + "//absl/base:config", 153 + + "//absl/strings", 154 + + ], 155 + +) 156 + diff -Naurd x/third_party/absl/workspace.bzl y/third_party/absl/workspace.bzl 157 + --- x/third_party/absl/workspace.bzl 2023-09-17 09:12:05.499753364 +0000 158 + +++ y/third_party/absl/workspace.bzl 2023-09-17 09:12:11.795762177 +0000 159 + @@ -20,6 +20,7 @@ 160 + "flags", 161 + "functional", 162 + "hash", 163 + + "log", 164 + "memory", 165 + "meta", 166 + "numeric",
+70 -34
pkgs/development/python-modules/tensorflow/default.nix
··· 1 - { stdenv, bazel_5, buildBazelPackage, isPy3k, lib, fetchFromGitHub, symlinkJoin 2 - , addOpenGLRunpath, fetchpatch 1 + { stdenv, bazel_5, buildBazelPackage, lib, fetchFromGitHub, symlinkJoin 2 + , addOpenGLRunpath, fetchpatch, fetchzip, linkFarm 3 3 # Python deps 4 4 , buildPythonPackage, pythonOlder, python 5 5 # Python libraries 6 - , numpy, tensorboard, absl-py 7 - , packaging, setuptools, wheel, keras, keras-preprocessing, google-pasta 6 + , numpy, tensorboard, abseil-cpp, absl-py 7 + , packaging, setuptools, wheel, keras-preprocessing, google-pasta 8 8 , opt-einsum, astunparse, h5py 9 9 , termcolor, grpcio, six, wrapt, protobuf-python, tensorflow-estimator-bin 10 10 , dill, flatbuffers-python, portpicker, tblib, typing-extensions 11 11 # Common deps 12 - , git, pybind11, which, binutils, glibcLocales, cython, perl, coreutils 12 + , git, pybind11, which, binutils, glibcLocales, cython, perl 13 13 # Common libraries 14 14 , jemalloc, mpi, gast, grpc, sqlite, boringssl, jsoncpp, nsync 15 - , curl, snappy, flatbuffers-core, lmdb-core, icu, double-conversion, libpng, libjpeg_turbo, giflib, protobuf-core 15 + , curl, snappy, flatbuffers-core, icu, double-conversion, libpng, libjpeg_turbo, giflib, protobuf-core 16 16 # Upstream by default includes cuda support since tensorflow 1.15. We could do 17 17 # that in nix as well. It would make some things easier and less confusing, but 18 18 # it would also make the default tensorflow package unfree. See ··· 53 53 if cudaSupport then cudaPackages.backendStdenv 54 54 else if originalStdenv.isDarwin then llvmPackages_11.stdenv 55 55 else originalStdenv; 56 - inherit (cudaPackages) cudatoolkit cudnn nccl; 56 + inherit (cudaPackages) cudatoolkit nccl; 57 + # use compatible cuDNN (https://www.tensorflow.org/install/source#gpu) 58 + # cudaPackages.cudnn led to this: 59 + # https://github.com/tensorflow/tensorflow/issues/60398 60 + cudnn = cudaPackages.cudnn_8_6; 61 + gentoo-patches = fetchzip { 62 + url = "https://dev.gentoo.org/~perfinion/patches/tensorflow-patches-2.12.0.tar.bz2"; 63 + hash = "sha256-SCRX/5/zML7LmKEPJkcM5Tebez9vv/gmE4xhT/jyqWs="; 64 + }; 65 + protobuf-extra = linkFarm "protobuf-extra" [ 66 + { name = "include"; path = protobuf-core.src; } 67 + ]; 57 68 in 58 69 59 70 assert cudaSupport -> cudatoolkit != null ··· 99 110 100 111 tfFeature = x: if x then "1" else "0"; 101 112 102 - version = "2.11.1"; 113 + version = "2.13.0"; 103 114 variant = lib.optionalString cudaSupport "-gpu"; 104 115 pname = "tensorflow${variant}"; 105 116 ··· 208 219 owner = "tensorflow"; 209 220 repo = "tensorflow"; 210 221 rev = "refs/tags/v${version}"; 211 - hash = "sha256-q59cUW6613byHk4LGl+sefO5czLSWxOrSyLbJ1pkNEY="; 222 + hash = "sha256-Rq5pAVmxlWBVnph20fkAwbfy+iuBNlfFy14poDPd5h0="; 212 223 }; 213 224 214 225 # On update, it can be useful to steal the changes from gentoo 215 226 # https://gitweb.gentoo.org/repo/gentoo.git/tree/sci-libs/tensorflow 216 227 217 228 nativeBuildInputs = [ 218 - which pythonEnv cython perl protobuf-core 229 + which pythonEnv cython perl protobuf-core protobuf-extra 219 230 ] ++ lib.optional cudaSupport addOpenGLRunpath; 220 231 221 232 buildInputs = [ ··· 225 236 git 226 237 227 238 # libs taken from system through the TF_SYS_LIBS mechanism 239 + abseil-cpp 228 240 boringssl 229 241 curl 230 242 double-conversion ··· 236 248 jsoncpp 237 249 libjpeg_turbo 238 250 libpng 239 - lmdb-core 240 251 (pybind11.overridePythonAttrs (_: { inherit stdenv; })) 241 252 snappy 242 253 sqlite ··· 265 276 "astor_archive" 266 277 "astunparse_archive" 267 278 "boringssl" 279 + "com_google_absl" 268 280 # Not packaged in nixpkgs 269 281 # "com_github_googleapis_googleapis" 270 282 # "com_github_googlecloudplatform_google_cloud_cpp" ··· 284 296 "icu" 285 297 "jsoncpp_git" 286 298 "libjpeg_turbo" 287 - "lmdb" 288 299 "nasm" 289 300 "opt_einsum_archive" 290 301 "org_sqlite" ··· 328 339 GCC_HOST_COMPILER_PREFIX = lib.optionalString cudaSupport "${cudatoolkit_cc_joined}/bin"; 329 340 GCC_HOST_COMPILER_PATH = lib.optionalString cudaSupport "${cudatoolkit_cc_joined}/bin/cc"; 330 341 342 + patches = [ 343 + "${gentoo-patches}/0002-systemlib-Latest-absl-LTS-has-split-cord-libs.patch" 344 + "${gentoo-patches}/0005-systemlib-Updates-for-Abseil-20220623-LTS.patch" 345 + "${gentoo-patches}/0007-systemlibs-Add-well_known_types_py_pb2-target.patch" 346 + # https://github.com/conda-forge/tensorflow-feedstock/pull/329/commits/0a63c5a962451b4da99a9948323d8b3ed462f461 347 + (fetchpatch { 348 + name = "fix-layout-proto-duplicate-loading.patch"; 349 + url = "https://raw.githubusercontent.com/conda-forge/tensorflow-feedstock/0a63c5a962451b4da99a9948323d8b3ed462f461/recipe/patches/0001-Omit-linking-to-layout_proto_cc-if-protobuf-linkage-.patch"; 350 + hash = "sha256-/7buV6DinKnrgfqbe7KKSh9rCebeQdXv2Uj+Xg/083w="; 351 + }) 352 + ./com_google_absl_add_log.patch 353 + ./absl_py_argparse_flags.patch 354 + ./protobuf_python.patch 355 + ./pybind11_protobuf_python_runtime_dep.patch 356 + ./pybind11_protobuf_newer_version.patch 357 + ] ++ lib.optionals (stdenv.hostPlatform.system == "aarch64-darwin") [ 358 + ./absl_to_std.patch 359 + ]; 360 + 331 361 postPatch = '' 332 362 # bazel 3.3 should work just as well as bazel 3.1 333 363 rm -f .bazelversion ··· 395 425 fetchAttrs = { 396 426 sha256 = { 397 427 x86_64-linux = if cudaSupport 398 - then "sha256-lURiR0Ra4kynDXyfuONG+A7CpxnAsfKzIdFTExKzp1o=" 399 - else "sha256-lDvRgj+UlaneRGZOO9UVCb6uyxcbRJfUhABf/sgKPi0="; 400 - aarch64-linux = "sha256-z2d45fqHz5HW+qkv3fR9hMg3sEwUzJfxF54vng85bHk="; 401 - x86_64-darwin = "sha256-AAvuz8o6ZRkaSYMgaep74lDDQcxOupDCX4vRaK/jnCU="; 402 - aarch64-darwin = "sha256-kexRSvfQqb92ZRuUqAO070RnUUBidAqghiA7Y8do9vc="; 428 + then "sha256-5VFMNHeLrUxW5RTr6EhT3pay9nWJ5JkZTGirDds5QkU=" 429 + else "sha256-KzgWV69Btr84FdwQ5JI2nQEsqiPg1/+TWdbw5bmxXOE="; 430 + aarch64-linux = "sha256-9btXrNHqd720oXTPDhSmFidv5iaZRLjCVX8opmrMjXk="; 431 + x86_64-darwin = "sha256-gqb03kB0z2pZQ6m1fyRp1/Nbt8AVVHWpOJSeZNCLc4w="; 432 + aarch64-darwin = "sha256-WdgAaFZU+ePwWkVBhLzjlNT7ELfGHOTaMdafcAMD5yo="; 403 433 }.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"); 404 434 }; 405 435 406 436 buildAttrs = { 407 437 outputs = [ "out" "python" ]; 408 438 439 + # need to rebuild schemas since we use a different flatbuffers version 409 440 preBuild = '' 441 + (cd tensorflow/lite/schema;${flatbuffers-core}/bin/flatc --gen-object-api -c schema.fbs) 442 + (cd tensorflow/lite/schema;${flatbuffers-core}/bin/flatc --gen-object-api -c conversion_metadata.fbs) 443 + (cd tensorflow/lite/acceleration/configuration;${flatbuffers-core}/bin/flatc -o configuration.fbs --proto configuration.proto) 444 + sed -i s,tflite.proto,tflite,g tensorflow/lite/acceleration/configuration/configuration.fbs/configuration.fbs 445 + (cd tensorflow/lite/acceleration/configuration;${flatbuffers-core}/bin/flatc --gen-compare --gen-object-api -c configuration.fbs/configuration.fbs) 446 + cp -r tensorflow/lite/acceleration/configuration/configuration.fbs tensorflow/lite/experimental/acceleration/configuration 447 + (cd tensorflow/lite/experimental/acceleration/configuration;${flatbuffers-core}/bin/flatc -c configuration.fbs/configuration.fbs) 448 + (cd tensorflow/lite/delegates/gpu/cl;${flatbuffers-core}/bin/flatc -c compiled_program_cache.fbs) 449 + (cd tensorflow/lite/delegates/gpu/cl;${flatbuffers-core}/bin/flatc -I $NIX_BUILD_TOP/source -c serialization.fbs) 450 + (cd tensorflow/lite/delegates/gpu/common;${flatbuffers-core}/bin/flatc -I $NIX_BUILD_TOP/source -c gpu_model.fbs) 451 + (cd tensorflow/lite/delegates/gpu/common/task;${flatbuffers-core}/bin/flatc -c serialization_base.fbs) 410 452 patchShebangs . 411 453 ''; 412 454 ··· 448 490 license = licenses.asl20; 449 491 maintainers = with maintainers; [ abbradar ]; 450 492 platforms = with platforms; linux ++ darwin; 451 - # More vulnerabilities in 2.11.1 really; https://github.com/tensorflow/tensorflow/releases 452 - knownVulnerabilities = [ "CVE-2023-33976" ]; 453 - broken = true || # most likely needs dealing with protobuf/abseil updates 454 - !(xlaSupport -> cudaSupport) || python.pythonVersion == "3.11"; 493 + broken = stdenv.isDarwin || !(xlaSupport -> cudaSupport); 455 494 } // lib.optionalAttrs stdenv.isDarwin { 456 495 timeout = 86400; # 24 hours 457 496 maxSilent = 14400; # 4h, double the default of 7200s ··· 460 499 461 500 in buildPythonPackage { 462 501 inherit version pname; 463 - disabled = !isPy3k; 502 + disabled = pythonOlder "3.8"; 464 503 465 504 src = bazel-build.python; 466 505 ··· 493 532 # tensorflow/tools/pip_package/setup.py 494 533 propagatedBuildInputs = [ 495 534 absl-py 535 + abseil-cpp 496 536 astunparse 497 537 flatbuffers-python 498 538 gast ··· 529 569 # TEST_PACKAGES in tensorflow/tools/pip_package/setup.py 530 570 nativeCheckInputs = [ 531 571 dill 532 - keras 533 572 portpicker 534 573 tblib 535 574 ]; ··· 540 579 hello = tf.constant("Hello, world!") 541 580 tf.print(hello) 542 581 543 - # Fit a simple model to random data 544 - import numpy as np 545 - np.random.seed(0) 546 582 tf.random.set_seed(0) 547 - model = tf.keras.models.Sequential([ 548 - tf.keras.layers.Dense(1, activation="linear") 549 - ]) 550 - model.compile(optimizer="sgd", loss="mse") 551 - 552 - x = np.random.uniform(size=(1,1)) 553 - y = np.random.uniform(size=(1,)) 554 - model.fit(x, y, epochs=1) 583 + width = 512 584 + choice = 48 585 + t_in = tf.Variable(tf.random.uniform(shape=[width])) 586 + with tf.GradientTape() as tape: 587 + t_out = tf.slice(tf.nn.softmax(t_in), [choice], [1]) 588 + diff = tape.gradient(t_out, t_in) 589 + assert(0 < tf.reduce_min(tf.slice(diff, [choice], [1]))) 590 + assert(0 > tf.reduce_max(tf.slice(diff, [1], [choice - 1]))) 555 591 EOF 556 592 ''; 557 593 # Regression test for #77626 removed because not more `tensorflow.contrib`.
+19
pkgs/development/python-modules/tensorflow/protobuf_python.patch
··· 1 + diff -Naurd x/tensorflow/workspace2.bzl y/tensorflow/workspace2.bzl 2 + --- x/tensorflow/workspace2.bzl 2023-09-16 20:44:02.266422132 +0000 3 + +++ y/tensorflow/workspace2.bzl 2023-09-16 20:50:40.370998305 +0000 4 + @@ -469,6 +469,7 @@ 5 + system_link_files = { 6 + "//third_party/systemlibs:protobuf.bzl": "protobuf.bzl", 7 + "//third_party/systemlibs:protobuf_deps.bzl": "protobuf_deps.bzl", 8 + + "//third_party/systemlibs:protobuf.python.BUILD": "python/BUILD", 9 + }, 10 + urls = tf_mirror_urls("https://github.com/protocolbuffers/protobuf/archive/v3.21.9.zip"), 11 + ) 12 + diff -Naurd x/third_party/systemlibs/protobuf.python.BUILD y/third_party/systemlibs/protobuf.python.BUILD 13 + --- x/third_party/systemlibs/protobuf.python.BUILD 1970-01-01 00:00:00.000000000 +0000 14 + +++ y/third_party/systemlibs/protobuf.python.BUILD 2023-09-16 20:49:12.514890584 +0000 15 + @@ -0,0 +1,4 @@ 16 + +cc_library( 17 + + name = "proto_api", 18 + + visibility = ["//visibility:public"] 19 + +)
+16
pkgs/development/python-modules/tensorflow/pybind11_protobuf_newer_version.patch
··· 1 + diff -Naurd x/tensorflow/workspace2.bzl y/tensorflow/workspace2.bzl 2 + --- x/tensorflow/workspace2.bzl 2023-09-21 12:55:06.104407343 +0000 3 + +++ y/tensorflow/workspace2.bzl 2023-09-21 12:55:39.732453203 +0000 4 + @@ -872,9 +872,9 @@ 5 + 6 + tf_http_archive( 7 + name = "pybind11_protobuf", 8 + - urls = tf_mirror_urls("https://github.com/pybind/pybind11_protobuf/archive/80f3440cd8fee124e077e2e47a8a17b78b451363.zip"), 9 + - sha256 = "c7ab64b1ccf9a678694a89035a8c865a693e4e872803778f91f0965c2f281d78", 10 + - strip_prefix = "pybind11_protobuf-80f3440cd8fee124e077e2e47a8a17b78b451363", 11 + + urls = tf_mirror_urls("https://github.com/pybind/pybind11_protobuf/archive/c8cc30e2495309e3499b7d76033446236d21c837.zip"), 12 + + sha256 = "0663f73b34c0b4af55003edbb066e62aceff99bfcf12e47ea9a15d6013d81413", 13 + + strip_prefix = "pybind11_protobuf-c8cc30e2495309e3499b7d76033446236d21c837", 14 + patch_file = [ 15 + "//third_party/pybind11_protobuf:remove_license.patch", 16 + "//third_party/pybind11_protobuf:python_runtime_dep.patch",
+30
pkgs/development/python-modules/tensorflow/pybind11_protobuf_python_runtime_dep.patch
··· 1 + diff -Naurd x/tensorflow/workspace2.bzl y/tensorflow/workspace2.bzl 2 + --- x/tensorflow/workspace2.bzl 2023-09-17 22:22:22.029075202 +0000 3 + +++ y/tensorflow/workspace2.bzl 2023-09-17 22:25:27.501289587 +0000 4 + @@ -876,7 +876,10 @@ 5 + urls = tf_mirror_urls("https://github.com/pybind/pybind11_protobuf/archive/80f3440cd8fee124e077e2e47a8a17b78b451363.zip"), 6 + sha256 = "c7ab64b1ccf9a678694a89035a8c865a693e4e872803778f91f0965c2f281d78", 7 + strip_prefix = "pybind11_protobuf-80f3440cd8fee124e077e2e47a8a17b78b451363", 8 + - patch_file = ["//third_party/pybind11_protobuf:remove_license.patch"], 9 + + patch_file = [ 10 + + "//third_party/pybind11_protobuf:remove_license.patch", 11 + + "//third_party/pybind11_protobuf:python_runtime_dep.patch", 12 + + ], 13 + ) 14 + 15 + tf_http_archive( 16 + diff -Naurd x/third_party/pybind11_protobuf/python_runtime_dep.patch y/third_party/pybind11_protobuf/python_runtime_dep.patch 17 + --- x/third_party/pybind11_protobuf/python_runtime_dep.patch 1970-01-01 00:00:00.000000000 +0000 18 + +++ y/third_party/pybind11_protobuf/python_runtime_dep.patch 2023-09-17 22:23:07.849128180 +0000 19 + @@ -0,0 +1,11 @@ 20 + +diff -Naurd x/pybind11_protobuf/BUILD y/pybind11_protobuf/BUILD 21 + +--- x/pybind11_protobuf/BUILD 2023-09-17 22:17:19.932725814 +0000 22 + ++++ y/pybind11_protobuf/BUILD 2023-09-17 22:20:44.056961932 +0000 23 + +@@ -86,6 +86,7 @@ 24 + + "//visibility:private", 25 + + ], 26 + + deps = [ 27 + ++ "@org_tensorflow//third_party/python_runtime:headers", 28 + + "@com_google_absl//absl/container:flat_hash_map", 29 + + "@com_google_absl//absl/container:flat_hash_set", 30 + + "@com_google_absl//absl/meta:type_traits",
+50 -4
pkgs/top-level/python-packages.nix
··· 13689 13689 inherit (pkgs.config) cudaSupport; 13690 13690 }; 13691 13691 13692 - tensorflow-build = callPackage ../development/python-modules/tensorflow { 13692 + tensorflow-build = let 13693 + compat = rec { 13694 + protobufTF = pkgs.protobuf3_21.override { 13695 + abseil-cpp = pkgs.abseil-cpp; 13696 + }; 13697 + grpcTF = (pkgs.grpc.overrideAttrs ( 13698 + oldAttrs: rec { 13699 + # nvcc fails on recent grpc versions, so we use the latest patch level 13700 + # of the grpc version bundled by upstream tensorflow to allow CUDA 13701 + # support 13702 + version = "1.27.3"; 13703 + src = pkgs.fetchFromGitHub { 13704 + owner = "grpc"; 13705 + repo = "grpc"; 13706 + rev = "v${version}"; 13707 + hash = "sha256-PpiOT4ZJe1uMp5j+ReQulC9jpT0xoR2sAl6vRYKA0AA="; 13708 + fetchSubmodules = true; 13709 + }; 13710 + patches = [ ]; 13711 + postPatch = '' 13712 + sed -i "s/-std=c++11/-std=c++17/" CMakeLists.txt 13713 + echo "set(CMAKE_CXX_STANDARD 17)" >> CMakeLists.txt 13714 + ''; 13715 + }) 13716 + ).override { 13717 + protobuf = protobufTF; 13718 + }; 13719 + protobuf-pythonTF = self.protobuf.override { 13720 + protobuf = protobufTF; 13721 + }; 13722 + grpcioTF = self.grpcio.override { 13723 + protobuf = protobufTF; 13724 + grpc = grpcTF; 13725 + }; 13726 + tensorboard-plugin-profileTF = self.tensorboard-plugin-profile.override { 13727 + protobuf = protobuf-pythonTF; 13728 + }; 13729 + tensorboardTF = self.tensorboard.override { 13730 + grpcio = grpcioTF; 13731 + protobuf = protobuf-pythonTF; 13732 + tensorboard-plugin-profile = tensorboard-plugin-profileTF; 13733 + }; 13734 + }; 13735 + in 13736 + callPackage ../development/python-modules/tensorflow { 13693 13737 inherit (pkgs.darwin) cctools; 13694 13738 inherit (pkgs.config) cudaSupport; 13695 13739 inherit (self.tensorflow-bin) cudaPackages; 13696 13740 inherit (pkgs.darwin.apple_sdk.frameworks) Foundation Security; 13697 13741 flatbuffers-core = pkgs.flatbuffers; 13698 13742 flatbuffers-python = self.flatbuffers; 13699 - protobuf-core = pkgs.protobuf; 13700 - protobuf-python = self.protobuf; 13701 - lmdb-core = pkgs.lmdb; 13743 + protobuf-core = compat.protobufTF; 13744 + protobuf-python = compat.protobuf-pythonTF; 13745 + grpc = compat.grpcTF; 13746 + grpcio = compat.grpcioTF; 13747 + tensorboard = compat.tensorboardTF; 13702 13748 }; 13703 13749 13704 13750 tensorflow-datasets = callPackage ../development/python-modules/tensorflow-datasets { };