GPU Allocation and Results Unexpected for Simple Test codes

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
TensorFlow installed from (source or binary):
TensorFlow version (use command below): 1.3.0
Python version: 3.6
Bazel version (if compiling from source):
CUDA/cuDNN version: 8.0/ 6.0
GPU model and memory:two of Nvidia Quadro M4000
Exact command to reproduce:

Describe the problem
I have two Nvidia Quadro M4000 GPUs; each has a 8G Memory. My regular memory has 64G space.
I tested a simple GPU memory allocation for tensorflow and found that the allocation seems larger than the GPU memory. My test codes are as below:
GPU_MEMORY_BYTES = 8 * 2**30 # Assuming your GPU has 8GB of memory, adjust accordingly

# Number of float32 elements (4 bytes) that consume 7/8 of GPU memory
NUM_ELEMS = int((7 * GPU_MEMORY_BYTES / 8) / 4)

def Test1():
  with tf.device("/gpu:0"):
	t = tf.ones([2, NUM_ELEMS])
  s = tf.reduce_sum(t)
  config = tf.ConfigProto(gpu_options=tf.GPUOptions(visible_device_list='0'),
						  allow_soft_placement=False)
  with tf.Session(config=config) as sess:
	print(sess.run(s)) # This should fail since it consumes more memory than exists in the GPU

def Test2():
  with tf.device("/gpu:0"):
	t0 = tf.ones([NUM_ELEMS])  # Tensor that consumes 80% of GPU0's memory
	s0 = tf.reduce_sum(t0)
  with tf.device("/gpu:1"):
	t1 = tf.ones([NUM_ELEMS])  # Tensor that consumes 80% of GPU1's memory
	s1 = tf.reduce_sum(t1)
  s = tf.add(s0, s1)
  config = tf.ConfigProto(gpu_options=tf.GPUOptions(visible_device_list='0,1'),
						  allow_soft_placement=False)
  with tf.Session(config=config) as sess:
	print(sess.run(s))

I expect the Test2() should work well but Test1() should fail as one GPU only has 8G memory. However, both test functions succeeded but the results are incorrect!
NUM_ELEMS is about 1.879*e+9, and I expected that it should be half of the output of Test2() (Test1() should fail).
However, I got Test1's output as 1.07374e+09, and Test2's output as 2.14748e+09.
It seems that Both Test1 and Test2 clip the number of elements to 2^30! As NUM_ELEMS is int32, even clipping should be clipped to 2^31 but not 2^30.
In Test1(), if I change the first dimension in (tf.ones([2, NUM_ELEMS])) from 2 to 15, the outputs are always 1.07374e+09; if the first dimension is no less than 16, it starts to crash showing out of GPU memory.
My questions are:

Why the GPU allocation did not crash for larger than 8G for single GPU?

Why the output results are clipped to 2^30 for single GPU and 2^31 for two GPUs

How could I get the correct outputs?

To answer your first question, the GPU allocation did not crash, because the optimizer did constant folding, which is run on the CPU. Constant folding evaluated the tf.reduce_sum call. The following code should crash on TensorFlow 1.3:
import tensorflow as tf
from tensorflow.core.protobuf import rewriter_config_pb2

GPU_MEMORY_BYTES = 8 * 2**30 # Assuming your GPU has 8GB of memory, adjust accordingly

# Number of float32 elements (4 bytes) that consume 7/8 of GPU memory
NUM_ELEMS = int((7 * GPU_MEMORY_BYTES / 8) / 4)

def Test1():
  with tf.device("/gpu:0"):
    t = tf.ones([2, NUM_ELEMS])
  s = tf.reduce_sum(t)
  config = tf.ConfigProto(gpu_options=tf.GPUOptions(visible_device_list='0'),
                          allow_soft_placement=False)
  config.graph_options.optimizer_options.opt_level = tf.OptimizerOptions.L0
  # config.graph_options.rewrite_options.constant_folding = rewriter_config_pb2.RewriterConfig.OFF
  with tf.Session(config=config) as sess:
    print(sess.run(s)) # This should fail since it consumes more memory than exists in the GPU

Test1()

On master, the config.graph_options.rewrite_options.constant_folding line must also be uncommented to cause a crash.
As for your second question, when I run Test1 without disabling optimizations, I get 3.7581e+09, which is the correct answer. Perhaps you're getting a different result due to thread scheduling. @ekelsen do you know if reductions on the CPU consistency compute the reduce_sum of 3,758,096,384 float32 ones in a numerically stable way?

If the datatype is float32, the summation on the cpu would not give the correct answer (you stop being able to add 1 to a floating point number at 2^24) and the CPU algorithm uses a very small number of accumulators.  If the datatype is int32 then it should give the correct result everytime.

Thank you both for your help. After I change the float32 to int32, the number now overflows normally.
After I added the tf.OptimizerOptions.L0 as @reedwm suggested, I encountered the following weird issues:

Test1() started to show output message " CUDA_ERROR_OUT_OF_MEMORY" as soon as NUM_ELEMS is greater than int((4 * GPU_MEMORY_BYTES / 8) / 4), but it did not crash and still outputs the overflowed value! If the NUM_ELEMS is smaller than that, no "CUDA_ERROR_OUT_OF_MEMORY" is shown.

Test2() is exactly the same output as Test1()! When NUM_ELEMS is greater than int((4 * GPU_MEMORY_BYTES / 8) / 4), it shows "CUDA_ERROR_OUT_OF_MEMORY" but does not crash. When the NUM_ELEMS is greater than GPU_MEMORY_BYTES/4, it started to crash.

I noticed that in both cases, the regular computer memory cost a lot; don't know whether this is related to the problem. I am confused about the outputs. What may cause these weird issues? Thank you.

I cannot reproduce. For me, changing the type to int32 does not cause out of memory errors, and outputs the result. I am running the code
import tensorflow as tf
from tensorflow.core.protobuf import rewriter_config_pb2

GPU_MEMORY_BYTES = 8 * 2**30 # Assuming your GPU has 8GB of memory, adjust accordingly

# Number of float32 elements (4 bytes) that consume 7/8 of GPU memory
NUM_ELEMS = int((7 * GPU_MEMORY_BYTES / 8) / 4)

def Test1():
  with tf.device("/gpu:0"):
    t = tf.ones([2, NUM_ELEMS], dtype=tf.int32)
  s = tf.reduce_sum(t)
  config = tf.ConfigProto(gpu_options=tf.GPUOptions(visible_device_list='0'),
                          allow_soft_placement=False)
  config.graph_options.optimizer_options.opt_level = tf.OptimizerOptions.L0
  # config.graph_options.rewrite_options.constant_folding = rewriter_config_pb2.RewriterConfig.OFF
  with tf.Session(config=config) as sess:
    print(sess.run(s)) # This should fail since it consumes more memory than exists in the GPU

Test1()

The reason there is no OOM error is that for int32 types, many ops are done on the CPU with CPU memory, not GPU memory. For example, see the Const op kernel (used by tf.ones) and the Sum op kernel (used by tf.reduce_sum). See this StackOverflow answer for more information.
Can you post the code that causes the error message to show but still outputs a value? Also can you post the output when you run that code?

@reedwm My previous test codes are exactly the same as yours, and it did not crash when NUM_ELEMS= int((7 * GPU_MEMORY_BYTES / 8) / 4). The codes' outputs are:
2017-10-11 10:58:27.944911: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-10-11 10:58:27.945590: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-11 10:58:28.179010: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:955] Found device 0 with properties:
name: Quadro M4000
major: 5 minor: 2 memoryClockRate (GHz) 0.7725
pciBusID 0000:04:00.0
Total memory: 7.93GiB
Free memory: 7.87GiB
2017-10-11 10:58:28.179994: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:976] DMA: 0
2017-10-11 10:58:28.180991: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:986] 0:   Y
2017-10-11 10:58:28.181884: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Quadro M4000, pci bus id: 0000:04:00.0)
2017-10-11 10:58:45.303652: E C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\stream_executor\cuda\cuda_driver.cc:955] failed to alloc<PHONE_NUMBER>4 bytes on host: CUDA_ERROR_OUT_OF_MEMORY
2017-10-11 10:58:45.304306: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow/core/common_runtime/gpu/pool_allocator.h:195] could not allocate pinned host memory of size:<PHONE_NUMBER>4
2017-10-11 10:58:52.164328: E C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\stream_executor\cuda\cuda_driver.cc:955] failed to alloc<PHONE_NUMBER>6 bytes on host: CUDA_ERROR_OUT_OF_MEMORY
2017-10-11 10:58:52.164914: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow/core/common_runtime/gpu/pool_allocator.h:195] could not allocate pinned host memory of size:<PHONE_NUMBER>6
2017-10-11 10:58:57.874112: E C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\stream_executor\cuda\cuda_driver.cc:955] failed to alloc<PHONE_NUMBER>6 bytes on host: CUDA_ERROR_OUT_OF_MEMORY
2017-10-11 10:58:57.874684: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow/core/common_runtime/gpu/pool_allocator.h:195] could not allocate pinned host memory of size:<PHONE_NUMBER>6
2017-10-11 10:59:03.462710: E C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\stream_executor\cuda\cuda_driver.cc:955] failed to alloc<PHONE_NUMBER>6 bytes on host: CUDA_ERROR_OUT_OF_MEMORY
2017-10-11 10:59:03.463291: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow/core/common_runtime/gpu/pool_allocator.h:195] could not allocate pinned host memory of size:<PHONE_NUMBER>6
2017-10-11 10:59:08.392877: E C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\stream_executor\cuda\cuda_driver.cc:955] failed to alloc<PHONE_NUMBER>0 bytes on host: CUDA_ERROR_OUT_OF_MEMORY
2017-10-11 10:59:08.393505: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow/core/common_runtime/gpu/pool_allocator.h:195] could not allocate pinned host memory of size:<PHONE_NUMBER>0
2017-10-11 10:59:12.736219: E C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\stream_executor\cuda\cuda_driver.cc:955] failed to alloc<PHONE_NUMBER>8 bytes on host: CUDA_ERROR_OUT_OF_MEMORY
2017-10-11 10:59:12.736467: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow/core/common_runtime/gpu/pool_allocator.h:195] could not allocate pinned host memory of size:<PHONE_NUMBER>8
-536870912

Thanks to your explanation, I think the int32 type question is clear now. Now the problem comes from only float32 issue.
When I change the type to float32 (all other codes are fixed, I also copy them below), the single GPU version can only support NUM_ELEMS = int((1.8 * GPU_MEMORY_BYTES / 8) / 4) but will crash when NUM_ELEMS = int((2 * GPU_MEMORY_BYTES / 8) / 4). However, I check many times to make sure that my GPU usage before calling is very low as shown:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 376.51                 Driver Version: 376.51                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro M4000       WDDM  | 0000:03:00.0      On |                  N/A |
| 48%   45C    P8    21W / 120W |    772MiB /  8192MiB |      1%      Default |
+-------------------------------+----------------------+----------------------+
|   1  Quadro M4000        TCC  | 0000:04:00.0     Off |                  N/A |
| 49%   46C    P8    21W / 120W |      0MiB /  8121MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
When using two GPUs, the codes run successfully when NUM_ELEMS = int((3.6 * GPU_MEMORY_BYTES / 8) / 4), but will crash when NUM_ELEMS = int((4 * GPU_MEMORY_BYTES / 8) / 4).
This phenomenon seems indicating that Tensorflow always need double size of the actual data in the memory. Is this a bug in Tensorflow? Is there any way to fix this issue? Thank you.
My test codes are:
def Test4():
  with tf.device("/gpu:0"):
	t = tf.ones([2, NUM_ELEMS], tf.float32)
  s = tf.reduce_sum(t)
  config = tf.ConfigProto(gpu_options=tf.GPUOptions(visible_device_list='0'),
						  allow_soft_placement=False)
  config.graph_options.optimizer_options.opt_level = tf.OptimizerOptions.L0
  with tf.Session(config=config) as sess:
	print(sess.run(s))

def Test5():
  with tf.device("/gpu:0"):
	t0 = tf.ones([NUM_ELEMS], tf.float32)
	s0 = tf.reduce_sum(t0)
  with tf.device("/gpu:1"):
	t1 = tf.ones([NUM_ELEMS], tf.float32)
	s1 = tf.reduce_sum(t1)
  s = tf.add(s0, s1)
  config = tf.ConfigProto(gpu_options=tf.GPUOptions(visible_device_list='0,1'),
						  allow_soft_placement=False)
  config.graph_options.optimizer_options.opt_level = tf.OptimizerOptions.L0
  with tf.Session(config=config) as sess:
	print(sess.run([s0, s1, s]))

The error messages when crashing for single gpu (test4) are:
2017-10-11 11:17:28.183277: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-10-11 11:17:28.183968: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-11 11:17:28.477173: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:955] Found device 0 with properties:
name: Quadro M4000
major: 5 minor: 2 memoryClockRate (GHz) 0.7725
pciBusID 0000:04:00.0
Total memory: 7.93GiB
Free memory: 7.87GiB
2017-10-11 11:17:28.478131: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:976] DMA: 0
2017-10-11 11:17:28.478488: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:986] 0:   Y
2017-10-11 11:17:28.478857: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Quadro M4000, pci bus id: 0000:04:00.0)
2017-10-11 11:17:39.968193: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:273] Allocator (GPU_0_bfc) ran out of memory trying to allocate 4B.  Current allocation summary follows.
2017-10-11 11:17:39.968928: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (256):  Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.969705: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (512):  Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.970396: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (1024):         Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.971082: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (2048):         Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.971800: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (4096):         Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.972469: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (8192):         Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.973140: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (16384):        Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.973810: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (32768):        Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.974515: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (65536):        Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.975196: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (131072):       Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.975882: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (262144):       Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.976544: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (524288):       Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.977217: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (1048576):      Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.978161: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (2097152):      Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.978837: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (4194304):      Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.979513: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (8388608):      Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.980190: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (16777216):     Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.980896: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (33554432):     Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.985346: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (67108864):     Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.986052: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (134217728):    Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.986728: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (268435456):    Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:17:39.987393: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:660] Bin for 256B was 256B, Chunk State:
2017-10-11 11:17:39.987850: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:678] Chunk at<PHONE_NUMBER>A40000 of size 1280
2017-10-11 11:17:39.988368: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:678] Chunk at<PHONE_NUMBER>A40500 of size<PHONE_NUMBER>
2017-10-11 11:17:39.988810: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:693]      Summary of in-use Chunks by size:
2017-10-11 11:17:39.989287: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:696] 1 Chunks of size 1280 totalling 1.3KiB
2017-10-11 11:17:39.989747: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:696] 1 Chunks of size<PHONE_NUMBER> totalling 7.48GiB
2017-10-11 11:17:39.990202: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:700] Sum Total of in-use chunks: 7.48GiB
2017-10-11 11:17:39.990649: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:702] Stats:
Limit:<PHONE_NUMBER>
InUse:<PHONE_NUMBER>
MaxInUse:<PHONE_NUMBER>
NumAllocs:                       2
MaxAllocSize:<PHONE_NUMBER>

2017-10-11 11:17:39.991605: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:277] ******************************************************xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2017-10-11 11:17:39.992210: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Resource exhausted: OOM when allocating tensor with shape[]
Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1327, in _do_call
	return fn(*args)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1306, in _run_fn
	status, run_metadata)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\contextlib.py", line 88, in __exit__
	next(self.gen)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 466, in raise_exception_on_not_ok_status
	pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[]
		 [[Node: Sum = Sum[T=DT_FLOAT, Tidx=DT_INT32, keep_dims=false, _device="/job:localhost/replica:0/task:0/gpu:0"](ones, Const)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "Test_two_GPUs.py", line 100, in <module>
	tf.app.run()
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
	_sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "Test_two_GPUs.py", line 96, in main
	Test4()
  File "Test_two_GPUs.py", line 77, in Test4
	print(sess.run(s))
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 895, in run
	run_metadata_ptr)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1124, in _run
	feed_dict_tensor, options, run_metadata)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1321, in _do_run
	options, run_metadata)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1340, in _do_call
	raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[]
		 [[Node: Sum = Sum[T=DT_FLOAT, Tidx=DT_INT32, keep_dims=false, _device="/job:localhost/replica:0/task:0/gpu:0"](ones, Const)]]

Caused by op 'Sum', defined at:
  File "Test_two_GPUs.py", line 100, in <module>
	tf.app.run()
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
	_sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "Test_two_GPUs.py", line 96, in main
	Test4()
  File "Test_two_GPUs.py", line 72, in Test4
	s = tf.reduce_sum(t)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\ops\math_ops.py", line 1278, in reduce_sum
	name=name)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\ops\gen_math_ops.py", line 2656, in _sum
	keep_dims=keep_dims, name=name)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 767, in apply_op
	op_def=op_def)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\ops.py", line 2630, in create_op
	original_op=self._default_original_op, op_def=op_def)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\ops.py", line 1204, in __init__
	self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access

ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[]
		 [[Node: Sum = Sum[T=DT_FLOAT, Tidx=DT_INT32, keep_dims=false, _device="/job:localhost/replica:0/task:0/gpu:0"](ones, Const)]]

The error message for two GPUs (test5) are:
2017-10-11 11:19:20.563267: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-10-11 11:19:20.563990: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-11 11:19:20.843673: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:955] Found device 0 with properties:
name: Quadro M4000
major: 5 minor: 2 memoryClockRate (GHz) 0.7725
pciBusID 0000:04:00.0
Total memory: 7.93GiB
Free memory: 7.87GiB
2017-10-11 11:19:21.098788: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\stream_executor\cuda\cuda_driver.cc:523] A non-primary context 0000000EF7D9B640 exists before initializing the StreamExecutor. We haven't verified StreamExecutor works with that.
2017-10-11 11:19:21.099703: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:955] Found device 1 with properties:
name: Quadro M4000
major: 5 minor: 2 memoryClockRate (GHz) 0.7725
pciBusID 0000:03:00.0
Total memory: 8.00GiB
Free memory: 6.71GiB
2017-10-11 11:19:21.100621: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:847] Peer access not supported between device ordinals 0 and 1
2017-10-11 11:19:21.101004: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:847] Peer access not supported between device ordinals 1 and 0
2017-10-11 11:19:21.101448: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:976] DMA: 0 1
2017-10-11 11:19:21.101779: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:986] 0:   Y N
2017-10-11 11:19:21.102121: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:986] 1:   N Y
2017-10-11 11:19:21.102487: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Quadro M4000, pci bus id: 0000:04:00.0)
2017-10-11 11:19:21.102945: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:1045] Creating TensorFlow device (/gpu:1) -> (device: 1, name: Quadro M4000, pci bus id: 0000:03:00.0)
2017-10-11 11:19:34.108912: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:273] Allocator (GPU_1_bfc) ran out of memory trying to allocate 4B.  Current allocation summary follows.
2017-10-11 11:19:34.109688: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (256):  Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.110365: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (512):  Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.111035: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (1024):         Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.111702: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (2048):         Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.112383: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (4096):         Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.113054: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (8192):         Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.113725: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (16384):        Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.114401: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (32768):        Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.115132: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (65536):        Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.115808: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (131072):       Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.116466: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (262144):       Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.117129: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (524288):       Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.117864: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (1048576):      Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.118552: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (2097152):      Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.119231: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (4194304):      Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.119925: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (8388608):      Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.120600: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (16777216):     Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.121283: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (33554432):     Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.121969: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (67108864):     Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.122698: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (134217728):    Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.123359: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:643] Bin (268435456):    Total Chunks: 0, Chunks in use: 0 0B allocated for chunks. 0B client-requested for chunks. 0B in use in bin. 0B client-requested in use in bin.
2017-10-11 11:19:34.124031: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:660] Bin for 256B was 256B, Chunk State:
2017-10-11 11:19:34.124492: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:678] Chunk at 00000004E5E80000 of size 1280
2017-10-11 11:19:34.125033: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:678] Chunk at 00000004E5E80500 of size<PHONE_NUMBER>
2017-10-11 11:19:34.125652: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:693]      Summary of in-use Chunks by size:
2017-10-11 11:19:34.126135: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:696] 1 Chunks of size 1280 totalling 1.3KiB
2017-10-11 11:19:34.126603: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:696] 1 Chunks of size<PHONE_NUMBER> totalling 6.37GiB
2017-10-11 11:19:34.127074: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:700] Sum Total of in-use chunks: 6.37GiB
2017-10-11 11:19:34.127530: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:702] Stats:
Limit:<PHONE_NUMBER>
InUse:<PHONE_NUMBER>
MaxInUse:<PHONE_NUMBER>
NumAllocs:                       2
MaxAllocSize:<PHONE_NUMBER>

2017-10-11 11:19:34.128516: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\bfc_allocator.cc:277] *******************************************************xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2017-10-11 11:19:34.129120: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Resource exhausted: OOM when allocating tensor with shape[]
Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1327, in _do_call
	return fn(*args)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1306, in _run_fn
	status, run_metadata)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\contextlib.py", line 88, in __exit__
	next(self.gen)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 466, in raise_exception_on_not_ok_status
	pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[]
		 [[Node: Sum_1 = Sum[T=DT_FLOAT, Tidx=DT_INT32, keep_dims=false, _device="/job:localhost/replica:0/task:0/gpu:1"](ones_1, Const_1)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "Test_two_GPUs.py", line 100, in <module>
	tf.app.run()
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
	_sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "Test_two_GPUs.py", line 96, in main
	Test5()
  File "Test_two_GPUs.py", line 91, in Test5
	print(sess.run([s0, s1, s]))
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 895, in run
	run_metadata_ptr)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1124, in _run
	feed_dict_tensor, options, run_metadata)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1321, in _do_run
	options, run_metadata)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1340, in _do_call
	raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[]
		 [[Node: Sum_1 = Sum[T=DT_FLOAT, Tidx=DT_INT32, keep_dims=false, _device="/job:localhost/replica:0/task:0/gpu:1"](ones_1, Const_1)]]

Caused by op 'Sum_1', defined at:
  File "Test_two_GPUs.py", line 100, in <module>
	tf.app.run()
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
	_sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "Test_two_GPUs.py", line 96, in main
	Test5()
  File "Test_two_GPUs.py", line 85, in Test5
	s1 = tf.reduce_sum(t1)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\ops\math_ops.py", line 1278, in reduce_sum
	name=name)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\ops\gen_math_ops.py", line 2656, in _sum
	keep_dims=keep_dims, name=name)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 767, in apply_op
	op_def=op_def)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\ops.py", line 2630, in create_op
	original_op=self._default_original_op, op_def=op_def)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\ops.py", line 1204, in __init__
	self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access

ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[]
		 [[Node: Sum_1 = Sum[T=DT_FLOAT, Tidx=DT_INT32, keep_dims=false, _device="/job:localhost/replica:0/task:0/gpu:1"](ones_1, Const_1)]]

When allocating half the GPU memory, the BFC allocator will actually allocate all the memory. This is because of an internal design decision of the BFC allocator: When a chunk is found for an allocation, it will only be split if the allocation is less than half the chunk size. When you allocate 4 GB on an 8 GB GPU, you are allocating a bit more than half the free memory, so the chunk holding almost all the free memory will not be split.
As a result, allocating more than half the free GPU memory will often end up allocating all the GPU memory, causing future allocations to fail until memory is freed. tf.reduce_sum(t) requires 4 bytes to be allocated for the output, which causes the OOM error. In practice, it is rare that a single allocation allocates more than half the GPU memory.
See here for the logic of when to split a chunk.
I have been assigned an internal bug to fix this for a few months, but unfortunately fixing this is not a priority right now. Fixing it would require doing a large amount of benchmarking to ensure no performance regressions from the change.

@reedwm I made another test as below, where I removed tf.reduce_sum(t). And my test verifies your conclusion. When no  tf.reduce_sum(t) is required, the  NUM_ELEMS = int((3.5 * GPU_MEMORY_BYTES / 8) / 4 ) will run without any problem.
I do think this is a serious problem. When I am training my data, I can only use batch size of 1/4 or even 1/8 compared with people using other platforms. Batch size is so important for performance. If you could fix this memory allocation issue asap, it would be really great, especially for regular users, like me, who do not have so big GPUs as Google has. Thank you.
    NUM_ELEMS = int((3.5 * GPU_MEMORY_BYTES / 8) / 4 )
def Test7():
  with tf.device("/gpu:0"):
	t = tf.ones([2, NUM_ELEMS], tf.float32)
  config = tf.ConfigProto(gpu_options=tf.GPUOptions(visible_device_list='0'),
						  allow_soft_placement=False)
  config.graph_options.optimizer_options.opt_level = tf.OptimizerOptions.L0
  with tf.Session(config=config) as sess:
	sess.run(t)

@ybsave what model and data are you using where you can only use a batch size of 1/4 compared to another platform? This issue only affects allocations that are multiple gigabytes, and most models have significantly smaller allocations than that.

@reedwm This happened when I was testing the ImageNet training using Resnet101 model. I can only use a batch size no more than 48 images in my one 8G GPU.

@ybsave What implementation of ResNet101 were you using? When I run ResNet101 using tf_cnn_benchmarks.py, the maximum batch size I can run with on my 8GB GTX 1080 is 61. The command line I use is
python tf_cnn_benchmarks.py --model=resnet101 --batch_size=61

Also, you mentioned other frameworks could be run with higher batch sizes. What are those frameworks?
When I run ResNet1010 using a batch size of 62, the logs have
2017-10-12 12:49:09.307354: W tensorflow/stream_executor/cuda/cuda_dnn.cc:2223]
2017-10-12 12:49:19.307640: W tensorflow/core/common_runtime/bfc_allocator.cc:273] Allocator (GPU_0_bfc) ran out of memory trying to allocate 23.73MiB.  Current allocation summary follows.
2017-10-12 12:49:19.307857: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (256): 	Total Chunks: 467, Chunks in use: 225. 116.8KiB allocated for chunks. 56.2KiB in use in bin. 22.0KiB client-requested in use in bin.
2017-10-12 12:49:19.307889: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (512): 	Total Chunks: 107, Chunks in use: 96. 53.5KiB allocated for chunks. 48.0KiB in use in bin. 48.0KiB client-requested in use in bin.
2017-10-12 12:49:19.307913: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (1024): 	Total Chunks: 603, Chunks in use: 601. 603.2KiB allocated for chunks. 601.2KiB in use in bin. 601.0KiB client-requested in use in bin.
2017-10-12 12:49:19.307936: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (2048): 	Total Chunks: 136, Chunks in use: 134. 273.5KiB allocated for chunks. 269.5KiB in use in bin. 268.0KiB client-requested in use in bin.
2017-10-12 12:49:19.307957: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (4096): 	Total Chunks: 291, Chunks in use: 291. 1.14MiB allocated for chunks. 1.14MiB in use in bin. 1.14MiB client-requested in use in bin.
2017-10-12 12:49:19.307978: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (8192): 	Total Chunks: 47, Chunks in use: 46. 379.0KiB allocated for chunks. 371.0KiB in use in bin. 368.0KiB client-requested in use in bin.
2017-10-12 12:49:19.308019: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (16384): 	Total Chunks: 2, Chunks in use: 2. 32.0KiB allocated for chunks. 32.0KiB in use in bin. 32.0KiB client-requested in use in bin.
2017-10-12 12:49:19.308038: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (32768): 	Total Chunks: 1, Chunks in use: 1. 36.8KiB allocated for chunks. 36.8KiB in use in bin. 36.8KiB client-requested in use in bin.
2017-10-12 12:49:19.308056: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (65536): 	Total Chunks: 13, Chunks in use: 13. 897.2KiB allocated for chunks. 897.2KiB in use in bin. 804.8KiB client-requested in use in bin.
2017-10-12 12:49:19.308074: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (131072): 	Total Chunks: 7, Chunks in use: 7. 1.06MiB allocated for chunks. 1.06MiB in use in bin. 976.0KiB client-requested in use in bin.
2017-10-12 12:49:19.308092: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (262144): 	Total Chunks: 15, Chunks in use: 15. 3.75MiB allocated for chunks. 3.75MiB in use in bin. 3.64MiB client-requested in use in bin.
2017-10-12 12:49:19.308109: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (524288): 	Total Chunks: 13, Chunks in use: 12. 7.55MiB allocated for chunks. 6.56MiB in use in bin. 6.50MiB client-requested in use in bin.
2017-10-12 12:49:19.308127: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (1048576): 	Total Chunks: 90, Chunks in use: 90. 90.25MiB allocated for chunks. 90.25MiB in use in bin. 90.00MiB client-requested in use in bin.
2017-10-12 12:49:19.308145: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (2097152): 	Total Chunks: 48, Chunks in use: 48. 109.25MiB allocated for chunks. 109.25MiB in use in bin. 107.00MiB client-requested in use in bin.
2017-10-12 12:49:19.308164: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (4194304): 	Total Chunks: 25, Chunks in use: 25. 129.02MiB allocated for chunks. 129.02MiB in use in bin. 121.59MiB client-requested in use in bin.
2017-10-12 12:49:19.308181: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (8388608): 	Total Chunks: 102, Chunks in use: 101. 1.20GiB allocated for chunks. 1.19GiB in use in bin. 1.14GiB client-requested in use in bin.
2017-10-12 12:49:19.308200: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (16777216): 	Total Chunks: 20, Chunks in use: 20. 481.38MiB allocated for chunks. 481.38MiB in use in bin. 462.82MiB client-requested in use in bin.
2017-10-12 12:49:19.308217: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (33554432): 	Total Chunks: 65, Chunks in use: 65. 2.95GiB allocated for chunks. 2.95GiB in use in bin. 2.90GiB client-requested in use in bin.
2017-10-12 12:49:19.308236: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (67108864): 	Total Chunks: 9, Chunks in use: 9. 854.44MiB allocated for chunks. 854.44MiB in use in bin. 854.44MiB client-requested in use in bin.
2017-10-12 12:49:19.308253: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (134217728): 	Total Chunks: 9, Chunks in use: 9. 1.62GiB allocated for chunks. 1.62GiB in use in bin. 1.62GiB client-requested in use in bin.
2017-10-12 12:49:19.308270: I tensorflow/core/common_runtime/bfc_allocator.cc:627] Bin (268435456): 	Total Chunks: 0, Chunks in use: 0. 0B allocated for chunks. 0B in use in bin. 0B client-requested in use in bin.

Since for each bin, the "client-requested in use in bin" is almost as high as "use in bin", this issue of only using half a chunk is not occurring.

@reedwm I used the Resnet implementation at https://github.com/tensorflow/models/blob/master/official/resnet/resnet_model.py; I made a few modifications by using slim to simplify the model definitions.
Another person told me that he used Caffe on Resnet 101 for ImageNet with about batch size up to 100. But I am not aware what implementations he used. Sorry about that.
From your posted output, it seems that the Tensorflow GPU memory allocations are performed in several sub-steps by allocating 2*previous memory one by one. So, it means as long as the single biggest allocation, e.g. 1.62G in your post, is smaller than half of the GPU, e.g., 4G, the problem should not appear, no matter of the total allocation so far, right?

Yes, the problem will almost certainly not occur if the biggest allocation is less than half the GPU. It can theoretically occur in any case where an allocation is about half the size of the chunk its assigned to, but such cases are rare.
Note all models I know of will not allocate more than half the memory it uses in a single allocation. So I don't think this problem occurs in practice, but feel free to update this bug if you find out it does.
If you find out the Caffe Resnet50 implementation and find that it supports higher batch sizes then the Resnet implementation on the same hardware, update this issue. I will update this issue when I fix the issue involving a whole chunk being allocated if just half of it is needed.

It has been 14 days with no activity and this issue has an assignee.Please update the label and/or status accordingly.

The allocation issue has been fixed (although not by me). Closing this issue.

@reedwm In which commit was this fixed ? I'm still noticing weird behavior regarding allocation. For instance, it's impossible to allocate a tensor filled with zeros that's above half the total GPU memory. I have a GPU with 12GB of vram yet I can't allocate more than ~5.5GB. Does not make any sense.
See https://github.com/tensorflow/tensorflow/issues/18380#issuecomment-380110126

This was fixed in 9fe7c29605a5ee1519cceba8e67a6d8413444fac.


[Bug] Discord instantly crash

Before Reporting

[X] I found no existing issues matching my bug
[X] My issue is not caused by a plugin or theme

Describe the Bug

getting that error on every launch
running the --vanilla version works however

All plugins disabled
Only dracula and EmojiReplace themes enabled, but they don't cause the bug

Expected Behavior
I expect Discord to launch normally
Steps To Reproduce

Install BetterDiscord 1.9.0
Run Discord

(side note : prior versions worked just fine)
Operating System
Windows
Discord Version
PTB
BetterDiscord Version
v1.9.0
Anything else?
No response

Use Stable or remove all plugins from plugins folder if preferred until fixed.

i have the same problem
emptying the plugin folder works

I Cant event open discord it instantly goes to discord crash screen cant reach plugins folder

I Cant event open discord it instantly goes to discord crash screen cant reach plugins folder

Plugins folder is located at %APPDATA%\BetterDiscord\plugins

I think it's not a problem with BetterDiscord. When I uninstalled bd and opened normal PTB, it worked fine until I tried to open direct messages. Then it crashed.

+1 @DiaxManPl
i renamed the plugins folder, discord opened up just fine, but as you say opening any PM lead to a crash

See https://github.com/BetterDiscord/BetterDiscord/commit/fbff8e2e52b8076cbab5e908ecdb2524665702e5, this commit should fix the crashing.

Crashing when entering a DM is likely a Discord issue as I have tested with BD uninstalled.

I can't confirm that.
I come to the DM as normal and can read and write there

See fbff8e2, this commit should fix the crashing. Either do a manual to apply or download the betterdiscord.asar from the commit artifact https://github.com/BetterDiscord/BetterDiscord/suites/11792215423/artifacts/615230861

I confirm that the new asar fixes both the plugins and PM crash
also some plugins "reloaded" the interface while enabled/disabled (to apply I assume) and it scrolled the plugins list to the top. I notice that it's no longer the case, and that overall BD is more fluid
All the team made a great job 🥰

think to ship that new asar as an official release, as other people also faced it

See fbff8e2, this commit should fix the crashing. Either do a manual to apply or download the betterdiscord.asar from the commit artifact https://github.com/BetterDiscord/BetterDiscord/suites/11792215423/artifacts/615230861

Can confirm that fixed it for me too. BD was also crashing instantly for me with a library plugin loaded before installing your asar.


Issue with /docs/admin/kubelet/

This is a...

[ ] Feature Request
[x ] Bug Report

Problem:
Latest kubelet documentation is missing the api-servers parameters
Proposed Solution:
Readd the documentation for the api-servers param
Page to Update:
http://kubernetes.io/...

--api-servers is deprecated, --kubeconfig should be used instead

The deprecated flag is now removed. There is no need to fix it.


[Fix] Use copy instead of reference for overriding message flags

Pull request checklist:

[x] CHANGELOG.md was updated, if applicable

(Note: I also included the initial attempt at fixing this issue (#2090) in order to make the development process more trackable.)
Description
Fixes #2195, fixes #2196.
This PR can be seen as a follow-up to https://github.com/Chatterino/chatterino2/pull/2090.
Apparently, boost::optional did not make a proper copy of the message flags when just using the assignment operator. This commit is explicit about copying, and preserves the message flags.

I don't understand why this would happen but sure.

I don't understand why this would happen but sure.

Me neither, it is weird behavior for sure. Since this does not happen in debug mode, I assume it is maybe related to an internal optimization boost::optional does?


dat.close() throwing TypeError: clear is not a function

I am getting this error when trying to close a dat that i had just created and am the owner of.
Is this something that I am doing wrong - or a problem within dat-node?
    at /Users/b/documents/84.DatLibrary/dat-cardcat/node_modules/recursive-watch/index.js:23:5
    at EventEmitter.destroy (/Users/b/documents/84.DatLibrary/dat-cardcat/node_modules/mirror-folder/index.js:257:21)
    at closeFileWatch (/Users/b/documents/84.DatLibrary/dat-cardcat/node_modules/dat-node/dat.js:220:19)
    at Dat.close (/Users/b/documents/84.DatLibrary/dat-cardcat/node_modules/dat-node/dat.js:203:3)
    at _bluebird2.default (/Users/b/documents/84.DatLibrary/dat-cardcat/src/dat.js:272:54)
    at Promise._execute (/Users/b/documents/84.DatLibrary/dat-cardcat/node_modules/bluebird/js/release/debuggability.js:300:9)
    at Promise._resolveFromExecutor (/Users/b/documents/84.DatLibrary/dat-cardcat/node_modules/bluebird/js/release/promise.js:483:18)
    at new Promise (/Users/b/documents/84.DatLibrary/dat-cardcat/node_modules/bluebird/js/release/promise.js:79:10)
    at DatWrapper.close (/Users/b/documents/84.DatLibrary/dat-cardcat/src/dat.js:272:12)
    at Context.done (/Users/b/documents/84.DatLibrary/dat-cardcat/test/dat.test.js:118:18)
    at callFnAsync (/Users/b/documents/84.DatLibrary/dat-cardcat/node_modules/mocha/lib/runnable.js:371:21)
    at Hook.Runnable.run (/Users/b/documents/84.DatLibrary/dat-cardcat/node_modules/mocha/lib/runnable.js:318:7)
    at next (/Users/b/documents/84.DatLibrary/dat-cardcat/node_modules/mocha/lib/runner.js:309:10)
    at Immediate.<anonymous> (/Users/b/documents/84.DatLibrary/dat-cardcat/node_modules/mocha/lib/runner.js:339:5)
    at runCallback (timers.js:637:20)
    at tryOnImmediate (timers.js:610:5)
    at processImmediate [as _immediateCallback] (timers.js:582:5)```

@e-e-e looks like a bug in recursive-watch. Can you paste the code that is causing this?
It looks like fs.lstat is failing on the directory/file you're sharing. The clear function should get set. We should probably catch that error but it'll be helpful to know what your case is.
There may be an option in dat-node we should be requiring but aren't enforcing.

@joehand here is a snipet that i used to replicate it - it has to do with the watch options, as the original tests which were causing me issues was fixed as a side effect of removing it.
const createDatAsync = Promise.promisify(createDat);
const temporaryDir = './temp';

describe.only('replicate', () => {
  let close;
  let externalLibraryKey;

  before((done) => {
    temp.track();
    shareLibraryDat((err, shareKey, closeShare) => {
      close = closeShare;
      externalLibraryKey = shareKey;
      done(err);
    });
  });
  after((done) => {
    temp.cleanupSync();
    close(done);
  });

  it('breaks', () => {
    const opts = {
      latest: true,
      indexing: true,
    };
    const tmpPath = temp.mkdirSync(temporaryDir);
    return createDatAsync(tmpPath, opts)
      .then((dat) => {
        const importOpts = {
          key: externalLibraryKey,
          watch: true,
          count: true,
          dereference: true,
          indexing: true,
        };
        dat.importFiles(importOpts, () => {
          console.log('finished importing');
        });
        return new Promise(resolve => dat.close(resolve));
      });
  });
});

I thought it may also be a result of temp cleaning up the directory before the dat is properly closed, but it is even caused by us waiting until close is successful before cleaning up.

I thought it may also be a result of temp cleaning up the directory before the dat is properly closed, but it is even caused by us waiting until close is successful before cleaning up.

Ya that would have been my guess too, since close relies on fs.lstat(temp) here. I'll see if I can reproduce.

cool if its temp - it could be that the dat close callback is firing before the the mirroring process is closed properly.

I misread before, clear should be set when dat.importFiles is called. Can you see what happens here if you run lstat before import:
 return createDatAsync(tmpPath, opts)
      .then((dat) => {
        const importOpts = {
          key: externalLibraryKey,
          watch: true,
          count: true,
          dereference: true,
          indexing: true,
        };
        fs.lstat(temp, (err, stat) {
          console.log(err, stat) // what happens here?
          dat.importFiles(importOpts, () => {
            console.log('finished importing');
          });
        })
        return new Promise(resolve => dat.close(resolve));
      });

If nothing looks wrong there, can you add a console log for the lstat values in recurisve-watch. Sorry, still kind of searching in the dark here, I haven't been able to reproduce this.

Sorry for the slow reply - I ran fs.lstat on tempDir, and it returns fine
null { dev: 16777217,
  mode: 16832,
  nlink: 3,
  uid: 501,
  gid: 20,
  rdev: 0,
  blksize: 4096,
  ino: 37143144,
  size: 102,
  blocks: 0,
  atime: 2017-06-21T08:10:51.000Z,
  mtime: 2017-06-21T08:10:51.000Z,
  ctime: 2017-06-21T08:10:51.000Z,
  birthtime: 2017-06-21T08:10:51.000Z }

but the clear error is still raised.

@joehand perhpas you can see its replicate for you by running the test here https://github.com/sdockray/dat-cardcat/blob/master/test/issue.test.js
It could also just be our code causing it in some weird way.


Error prone compile error with using IntelliJ

@BalloonWen and I encounter the same issue after updating the version to 1.6.1-SNAPSHOT
The error message is shown below:
Error:java: java.lang.RuntimeException: java.lang.NoSuchMethodError: com.sun.tools.javac.util.JavacMessages.add(Lcom/sun/tools/javac/util/JavacMessages$ResourceBundleHelper;)V
Error:java: Caused by: java.lang.NoSuchMethodError: com.sun.tools.javac.util.JavacMessages.add(Lcom/sun/tools/javac/util/JavacMessages$ResourceBundleHelper;)V
Error:java: 	at com.google.errorprone.BaseErrorProneJavaCompiler.setupMessageBundle(BaseErrorProneJavaCompiler.java:202)
Error:java: 	at com.google.errorprone.ErrorProneJavacPlugin.init(ErrorProneJavacPlugin.java:40)
After commenting out the plugin, the compiler can work properly

                    <!--<path>-->
                        <!--<groupId>com.google.errorprone</groupId>-->
                        <!--<artifactId>error_prone_core</artifactId>-->
                        <!--<version>2.3.3</version>-->
                    <!--</path>-->
                <!--</annotationProcessorPaths>-->

ok ill help you on 18:00 or 5:00 Pm Okay. thats when im avaliable

I just made sure that it could be compiled with the Maven and didn't realize that the IntelliJ IDEA is not working. @noahwolf2001 Since you know what is the issue, we will leave it to you to help. Thanks in advance.

sorry i didnt come at the desired time im here now

thanks steve but if you could see if the prox 15 would be available for me soon i'd appreciate the assistance of the server2server though

@noahwolf2001 The server to server is a demo application I created years ago. It should be removed as the server to server communication can be done with the client module provided in light-4j. Take a look at this tutorial
https://doc.networknt.com/tutorial/common/discovery/

@noahwolf2001 Do you know what is the root cause that the new version of the error_prone_core is not working with IntelliJ IDEA?

@jiachen1120 has found the IntelliJ IDEA plugin to resolve the issue. Here is the document on how to install the plugin. https://doc.networknt.com/tool/idea/errorprone-plugin/

com.sun.tools.javac.util.JavacMessages:

  @Override
    public void add(String bundleName) throws MissingResourceException {
        add(locale -> ResourceBundle.getBundle(bundleName, locale));
    }

    public void add(ResourceBundleHelper ma) {
        bundleHelpers = bundleHelpers.prepend(ma);
        if (!bundleCache.isEmpty())
            bundleCache.clear();
        currentBundles = null;
    }

the add method with lambda:
/** Registers our message bundle. */
public static void setupMessageBundle(Context context) {
ResourceBundle bundle = ResourceBundle.getBundle("com.google.errorprone.errors");
JavacMessages.instance(context).add(l -> bundle);
}

@pli2014 We have removed the errorprone from the 2.0.x branch, and this issue is resolved already.


Convert Protect Tree to use TreeBuilder

Purpose or Intent
Convert Protect Tree to use TreeBuilder
Before:

After:

Steps for Testing/QA
Compute -> Infrastructure -> Virtual Machines -> Select one or more VMs -> Policy -> Manage Policies
@miq-bot add_label wip, ui, technical debt

@miq-bot remove_label wip


DynamoDbEnhancedClient: Add StreamSpecification to CreateTableEnhancedRequest

Type: Feature
Is your feature request related to a problem? Please describe.
Right now when using table.createTable we cannot specify any StreamSpecification.
This means that you must create the schema using CreateTableRequest instead.
Describe the solution you'd like
The CreateTableEnhancedRequest should provide a streamSpecification method to allow the user to specify a StreamSpecification to generate the table schema.
Describe alternatives you've considered
Using CreateTableRequest instead. But I'm not sure what I should create to have the same behavior as the DynamoDbTable.createTable method.

This is/was an issue with the AWS SDK rather than Spring Cloud AWS unless I am missing something? Closing for now but if I misunderstood i am happy to reopen.


How to set the width of PlantUML UML?

I include some PlantUML diagram to the AsciiDoctor.
If I set the width to 100%, the HTML is OK. But the PDF is too small.
If I set the width to 960px, the PDF is OK.
Why does not the 100% width work  for PDF?

I guess you have to use either pdfwidth=100% or scaledwidth=100% ?
Check documentation: https://asciidoctor.org/docs/user-manual/#pdfwidth
It states that width for pdf accepts pixels only.

@habamax is correct. Currently, Asciidoctor PDF assumes that the value of the width attribute is in pixels. It ignores the % unit. You must specify the pdfwidth attribute if you want to use a % width in PDF.
[plantuml,width=50%,pdfwidth=50%]
....
E.T. -> Home: Phone
rnote over Home: silence
....

I don't see any reason not to support the % value on the width attribute in Asciidoctor PDF, so I'll go ahead and add it.


Added support for DropBox business accounts

Fixes #3083

@gave92 Great work! LGTM

@gave92 Great work! LGTM


Ref desc2

I was trying to get rid of usage numbers as keys for LUA_REGISTRYINDEX, but it's like rewrite tons of code (http://www.lua.org/pil/27.3.2.html). These changes remove usage invalidoid for storing tuple info for all queries. Triggers works in an old way. Fix #1
Added useful helper functions for debugging lua/C code (just enable PLLUA_DEBUG)  that change out info(showed source code last used lua c api function).
There are lots of changes, and I'm not sure if everything is clear from the commit comment. Any ideas, suggestions, reviews are welcome.

Could you test this function and let me know if it returns different results each time it is called :
CREATE OR REPLACE FUNCTION random_string_pllua(string_length INTEGER, caseinsensitive BOOLEAN DEFAULT false) RETURNS text
LANGUAGE pllua VOLATILE
AS $$
	local alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
	local alnum = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
	local output = ''
	for i = 1, string_length do
		if i > 2 then
			local pos = math.random(1, alnum:len())
			output = output .. alnum:sub(pos, pos)
		else
			local pos = math.random(1, alpha:len())
			output = output .. alpha:sub(pos, pos)
		end
	end
	if caseinsensitive then
		output = string.lower(output)
	end
	return output
$$;

Tested with current pllua, it works, but with you unstable fork, it always returns the same result.

Previous problem seems to be related to my version of luajit because this function works correctly with lua vanilla, even with your unstable fork.

Hi Eugwne, I think you can merge your PR now. I have reviewed and tested it.


Quad node is not selectable via 3D viewport

Operating system or device:
Windows 7 64bit
Issue description (what happened, and what was expected):
If you load the attached project you will see that if you try to click on the quad in the 3D view, nothing happens. Alt + RMB also does not list the quad underneath the mouse cursor.
A similar thing happens with MeshInstance:
Steps to reproduce:

add a mesh instance node to the scene and load "plane.msh" (included in the project dir)
the transform gizmo will be visible
if you unselect the object by clicking somewhere else, the object is no longer selectable via the 3D view
if you add another object, try a TestCube node for example, the MeshInstance is now selectable via the 3D view. Despite this, Quads are still not selectable.

These may be unrelated, but I thought I'd mention them both here since they are similar and I suspect they might stem from the same thing.
Here's the project: https://dl.dropboxusercontent.com/u/3292249/quad_select.zip
(still can't attach zip files for some reason?)

Its not only about Quads, other type of meshes is affected too(the problem still exist 3.1). If you create any new MeshInstance it will register clicks only after first selection in Scene tree

CC @JFonS


feat: add redis registry

What type of PR is this?
feat: A new feature
What this PR does / why we need it (English/Chinese):
en: Support redis registry.
zh: 添加redis作为注册中心
Which issue(s) this PR fixes:
Fixes #23

ci need to resolve

add license https://github.com/hertz-contrib/registry/tree/main/licenses

add license https://github.com/hertz-contrib/registry/tree/main/licenses

done, thx

lgtm


Install config-visualizer-gui, move Python installation to basics

@fsimonis any comments/suggestions?
I have not tested this yet, I plan to test all updates together.

We could also install the icon and the .desktop file for better integration.
https://raw.githubusercontent.com/precice/config-visualizer-gui/main/data/org.precice.config_visualizer.svg
https://gist.githubusercontent.com/fsimonis/a08c3771abf808b0534d658bcb563f90/raw/e091d78c24b04d0fc903b8de4909528628d22b7b/org.precice.configvisualizer.desktop

Added the Desktop file (thanks!), but not the picture. I am not sure where to add it, and the linked file does not refer to it.
See also https://github.com/precice/config-visualizer-gui/issues/3


[#3159] Support Apache Avro

This pull request resolves #3159.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: jangalinski:x: zambrovskiYou have signed the CLA already but the status is still pending? Let us recheck it.

Not ready for the final review yet.

Hi - first off, great stuff. Love seeing this get more traction for interoperability.
Coming from a Kafka side of things, I have had to additionally configure the following properties on the consumption side:

specific.avro.reader - Map to the SpecificRecord Types as opposed to GenericRecord
avro.use.logical.type.converters - Try to honor the logicalType definition in the schema (i.e. BigDecimal type instead of ByteBuffer), and
avro.remove.java.properties - Removes Java-specific properties from the generated schemas (i.e. the $SCHEMA field) such as avro.java.string (which the Avro Maven Plugin likes to add, see the note here at the bottom of this section).

I flew over the PR but did not notice too much in the way of configuration options regarding the above three concerns (it is possible I have overlooked this).
I think it would be fine if Axon provided an opinionated approach (i.e. setting the last two properties to true), but this should probably be explicitly documented. I know for a fact that avro.remove.java.properties: false causes interoperability issues with e.g. Confluent Schema Registry.
Hopefully this comment can save a bit of pain down the road. :)

Hi - first off, great stuff. Love seeing this get more traction for interoperability. Coming from a Kafka side of things, I have had to additionally configure the following properties on the consumption side:

specific.avro.reader

Map to the SpecificRecord Types as opposed to GenericRecord

avro.use.logical.type.converters

Try to honor the logicalType definition in the schema (i.e. BigDecimal type instead of ByteBuffer), and

avro.remove.java.properties

Removes Java-specific properties from the generated schemas (i.e. the $SCHEMA field) such as avro.java.string (which the Avro Maven Plugin likes to add, see the note here at the bottom of this section).

I flew over the PR but did not notice too much in the way of configuration options regarding the above three concerns (it is possible I have overlooked this).
I think it would be fine if Axon provided an opinionated approach (i.e. setting the last two properties to true), but this should probably be explicitly documented. I know for a fact that avro.remove.java.properties: false causes interoperability issues with e.g. Confluent Schema Registry.
Hopefully this comment can save a bit of pain down the road. :)

Interesting. Where do you configure this properties, and what stack are you using? Is it confluent?
Current implementation assumes that your classes have been generated by Apache Maven Avro Plugin. What tool are you using to generate Java classes out of Avro schema?
Cheers,
Simon

Interesting. Where do you configure this properties, and what stack are you using? Is it confluent?

We're using a Confluent Schema Registry together with Kafka for schema management. Our use case goes like: producer registers schemas to Schema Registry -> Consumers fetch schemas -> Consumers generate class files from schemas.
The properties I mentioned are all consumer properties that interact with the Confluent KafkaAvroDeserializer:
# Only relevant when using io.confluent.kafka.serializers.KafkaAvroDeserializer
kafka.consumer.properties.avro.use.logical.type.converters: true
kafka.consumer.properties.avro.remove.java.properties: true
kafka.consumer.properties.specific.avro.reader: true

These may seem similar to the avro-maven-plugin settings - because they are essentially the same settings, configurable at deserialization time. See KafkaAvroDeserializerConfig.

Current implementation assumes that your classes have been generated by Apache Maven Avro Plugin. What tool are you using to generate Java classes out of Avro schema?

The resulting Java-specific string was generated by both the avro-maven-plugin (as of 1.11.0, by now a little outdated) as well as the unofficial Avro Gradle Plugin (which has since been archived and donated to Apache, so that's kind of in-between right now).
The problem lies within the $SCHEMA of the generated classes themselves, i.e.:
...
{
  "name":"myStringProperty",
  "type":{
    "type":"string",
    "avro.java.string":"String"
  }
}
...

The cause is the following Avro bug: https://issues.apache.org/jira/browse/AVRO-2838.
Due to this, I have to pass the consumer.properties.avro.remove.java.properties: true to my Kafka Consumers which are Schema Registry aware, due to the schema being semantically changed by the generator (the types are not compatible as-is). I am not aware as to whether other Schema Registries have similar handling.
I suppose the required handling here (if any) depends on where the Schemas are managed. I do not think it makes sense to support something like Confluent Schema Registry directly as this requires Kafka (at the time of this writing).
What it boils down to is that this probably should be at least noted somehow in the documentation under "Requirements" or something similar, otherwise users may get a nasty surprise when they try to connect different systems using a centralized schema management (which, as far as I can tell, is outside of the scope of this issue/PR).

In doing so, the logical type resolution is performed by the SPI-like detection of the original Avro Jva Stack and the $SCHEMA is part of the SpecificRecordBase class.

If the $SCHEMA field is parsed at all, the above issue may be encountered. I don't see any way around this other than explicitly handling the Avro generator bug (which is what Confluent has essentially done), but I'm not super deeply versed in the Avro generator specifics.
If I can help out with further information, please let me know.

I followed your link. I think we can describe this, but:

The schema included into the class is full pairwise-compatible to the written "original" using the SchemaCompatilibty.checkReaderWriterCompatibility.
The fact that Confluence is determining the schema as incompatible in their stack, is probably due to the fact that Confluent is not paying much attention to the original Avro Specification. There ist is defined how the schemas are compared: https://avro.apache.org/docs/1.12.0/specification/#schema-resolution. In fact it is absolutely ok to add any number of additional attributes (which are not reserved by Avro specification) on any node (this makes Avro extensible format), and those should not break the compatibility. Having said that - sorry if Confluent ignores that fact and breaks because the Code generator includes the legally modified schema into a static field.

With the arguments above, I don't think it is a problem of Avro or problem of this serializer. At the end, we a static method SpecificRecordBased#getClassSchema. Even if the proposal of the referenced issue will be implemented, we will still get the correct schema, and the schema is compatible with the hand-written by the user.
My two cents on that..
Cheers,
Simon


Stubout Quiz Component

Quiz Component
Description
This Story is responsible for members of the team to build a new quiz component to allow for the ability to track and validate user responses for lab 6 and other labs in the future. This will be a story that will involve members of the team to have to build a functional React Component(or components) to handle the desired behavior needed to observe and track input from the user. This story also will need for this component to have to ability to be database driven at some point, but for now, this is expected to be able to parse and auto questions and answers to the page in an accessible manner.
Instructions on how to complete this Story

Create a functional react Component
add said component to the router for the lab.
create a JSON list of iterable objects to store both questions and answers
Receive Json via props and store it in the internal state of the component.
Create a function to iterate the list of questions
add a handle submit that only is accessible if they have completed the quiz
add a service to make a request to the server to add their answers to the database
Style the component

Acceptance Criteria

Given when the user selects an answer felid then we are able to select next to move to the next question
Given when the user selects the back button they are able to navigate back to their previous question and see their previously answered questions.
Given when the user is at the end of all of their questions then they can hit the submit button
Given when the user hits the submit button they are then they can add an entry into the database.
Given when the component is provided a JSON list of objects they are able to render that info to the page without it crashing or throwing errors
This component must be a functional react component and implement a state and use effect Hooks.

This is gonna be chunked down and spawned a new issue for the API integration


Allow adding multiple tags to a single changelog entry

It's possible you want something to be added in multiple categories. I think this can still be represented by multiple yml files though.

On second thought, perhaps treating the categories as "tags" would make the tool more extensible later

I did rename categories to tags. Now I just need to allow you to specify multiple for an entry


Xenko 3.1 ScrollingText Component Error

Release Type: Official Release
Version: <IP_ADDRESS>-beta01-0318
Platform(s): Windows 10
Describe the bug
In the editor when adding a ScrollingText element to a UI page in the page editor, it causes the editor to hang.  After close and trying to relaunch the project eventually throws an error on the UI page:
"Error:Object reference not set to an instance of an object."  See screenshot below for more info.
To Reproduce
Steps to reproduce the behavior:

Add ScrollingText element to a UI page in the editor.

Expected behavior
I expected to be able to add a scrolling text element to the grid layout.
Screenshots
If applicable, add screenshots to help explain your problem (use GitHub drag & drop)

Log and callstacks
If any, please attach here any log or callstack (preferably in a .txt file using GitHub drag and drop)
Additional context
Add any other context about the problem here.

This was caused by an old script that was being called sorry.  Error only occured after trying to change UI.


Add missing oracle logo

Jira: https://issues.redhat.com/browse/RHCLOUD-20369
Follow-up to: https://github.com/RedHatInsights/frontend-assets/pull/57

/retest

@MikelAlejoBR I haven't been able to test in the UI. If you're able to I'd appreciate it! Thanks

Hey @epwinchell This is screenshot from stage, should not it be bigger ?

@lpichler It's the wrong image for this screen. Creating a follow-up PR...


Adds support for retrieving credentials in the Cloud Shell environment.

LGTM.

Which implementing class of JsonFactory should I use?  It seems that all of them would add another dependancy?

Fixed deps issues.

This LGTM. @anthmgoogle still look good to you?
@wilford if you're ready and @anthmgoogle LGTMs (because I consider mine more of OWNERS approval), then I'll go ahead and merge it.

I'm ready whenever @anthmgoogle https://github.com/anthmgoogle  is.
Thanks!
On 4 August 2015 at 11:04, Eric Anderson<EMAIL_ADDRESS>wrote:

This LGTM. @anthmgoogle https://github.com/anthmgoogle still look good
to you?
@wilford https://github.com/wilford if you're ready and @anthmgoogle
https://github.com/anthmgoogle LGTMs (because I consider mine more of
OWNERS approval), then I'll go ahead and merge it.
—
Reply to this email directly or view it on GitHub
https://github.com/google/google-api-java-client/pull/955#issuecomment-127694348
.

LGTM. Thanks. We should be ready to merge now.

@wilford, checkstyle fails. Please run mvn verify and fix the style failures.

Ah, my bad.  Fixed checkstyle errors.
On 4 August 2015 at 11:32, Eric Anderson<EMAIL_ADDRESS>wrote:

@wilford https://github.com/wilford, checkstyle fails. Please run mvn
verify and fix the style failures.
—
Reply to this email directly or view it on GitHub
https://github.com/google/google-api-java-client/pull/955#issuecomment-127704640
.

Cherry-picked as 3d866eb7


[WIP] Add ns_itype test

Setup ns_itype test, but I'm not sure if this is set correctly or not :
The original test seem to do things in complecated ways, so I'm worried that I might have missed something.
https://github.com/opencontainers/runtime-tools/blob/master/validation/linux_ns_itype/linux_ns_itype.go#L58 here, it loops through the namespaces, which are defined https://github.com/opencontainers/runtime-tools/blob/master/validation/util/linux_namespace.go here ; and then removes them from the default spec, https://github.com/opencontainers/runtime-tools/blob/master/validation/linux_ns_itype/linux_ns_itype.go#L70 here. But this essentially removes all namespaces from the spec. so in my implementation, I have used the builder with empty vec to remove all namespaces. Then using procfs, I have directly compared the namespace inodes of host and container.
Is it correct? @utam0k @yihuaf can you please take a look?

Currently I have left a few extra comments and commented code, If this is correct, I'll fix that in another commit, I have opened this PR because I wasn't sure if the current implementation is correct or not.

Super. Looking forward to the final PR :)

Just fyi, the correct way to compare namespaces is with inode and device id, but the eq implementation of procfs namespace does that already for you, so you are fine.

Ohh, I originally compared only by inode before changing it to direct comparison of HashMaps :sweat_smile:  Thanks for the info!

How about making sure that unwrap comes with the appropriate error wording?


[CT-3469] Refactor: add autocomplete to navbar, fix redirect

Ticket
Making function suggestions redirect straight to topic page instead of global search results page.
Was going to do the same for packages suggestions, however there are some broken links so a risk that the suggestion will link to a "oops, page not found".
Changes

OnSearch function ensures that the searchbar clears and the autocomplete disappears once a search has been made. (This is has more of a ui effect on the navbar search as the autocomplete would cover search results otherwise).

I have also wrapped autosuggestion text to ensure there is no overflow.

I have changed the function redirect to point to specific topic pages and placed in a switch statement.

Pictures
Before (Desktop):

After (Desktop):

Before (Mobile):

After (Mobile):

Here I think we should remove this, and just pick the 5 items with the highest score that start with what the user entered:
https://github.com/datacamp/rdocumentation-2.0/blob/bd0936d18661797a609c866984599d36f30ea89f/components/Autocomplete.tsx#L44-L45
So something similar to this:
     const relevantPackages = packages?.sort((pA, pB) => pB.score-pA.score)
                             ?.filter(p => p.toLowerCase().startsWith(query.toLowerCase()))
                             ?.slice(0, 5);


fix(tracer.js): handling null err.config

:tada: This PR is included in version 1.46.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Karen/r2.6

third party program files for TF 2.6 release.

@rsketine I've just added the Intel-tensorflow-build-container.md, please review.  Thanks.


Add VPCEndpointService resource to ec2 controller

Is your feature request related to a problem?
I want to create and manage VPCEndpointService using ACK
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVpcEndpointServiceConfiguration.html
Describe the solution you'd like
yaml managed solution similarto other AWS resources
Describe alternatives you've considered
None

Thank you for opening this ticket @ib-ak . The VPCEndpointService resource can be generated and we can, at least, quickly support the create/delete operations. Would you be interested in contributing to the ec2-controller? Happy to support and provide guidance for this issue.

sure @A-Hilaly Let me know where to start and I will try find time to work on it.

Awesome! Check out our contributions documentation here https://aws-controllers-k8s.github.io/community/docs/contributor-docs/overview/.
Especially for this issue, you'll have to re-generate the ec2-controller after removing the VPCEndpointService from the ignored resources list.
If you come across any building/generation issues you can reach out to us here https://kubernetes.slack.com/archives/C0402D8JJS1

@A-Hilaly is there an invite link to the above mentioned slack channel ? I am looking info on hook generation, paritcularly around tag comparison. Do I need to do it manually?

@ib-ak to join the kubernetes slack please visit http://slack.kubernetes.io/

I am looking info on hook generation, paritcularly around tag comparison. Do I need to do it manually?

Some part of it yeah. But you can definitely start with tags and add support for them later. Also, you could reuse some of the tags code used in other resources within the same controller, i believe it should be the same API call.

Hello, I'd like to contribute to this functionality, can someone guide me for the next steps?
Thanks

With the latest PR merged, I believe we can close this issue.


pass the set state function to a non-descendent component

Is there a way to pass setStateX from ComponentB to ComponentA without lifting the state from ComponentB to ParentComponent?
ComponentA has an event to trigger the state change within ComponentB.
And it's not good to lift the state up to ParentComponent due to design reason. It makes ComponentB not re-useable.
Image.

You can use Context to achieve that - https://beta.reactjs.org/apis/react/createContext

Hi @shanpriyan,
Here is my post regarding to this question in Stackoverflow.
In the stackoverflow post, it has more detailed descriptions about this problem.  The issue is still unresovled from my view.
And the useContext approach sanbox implemented by a friend. But it's the samething, it will lift up the state.

I hope this answer will solve your issue - https://stackoverflow.com/a/74057911/17948948

@shanpriyan  Yes, it's the best answer so far.
Is it possible to pass the state to non-descendent component from React Core? Like a new feature for React? Is it doable or not?
I think I am talking about feature request for React.

I don't think its possible to pass a state to non-descendant from React Core, However if you want to access state from a non-descendant you can use a third party state management library to accomplish that.

Support requests filed as GitHub issues often go unanswered. We want you to find the answer you're looking for, so we suggest the following alternatives:
Coding Questions
If you have a coding question related to React and React DOM, it might be better suited for Stack Overflow. It's a great place to browse through frequent questions about using React, as well as ask for help with specific questions.
https://stackoverflow.com/questions/tagged/react
Talk to other React developers
There are many online forums which are a great place for discussion about best practices and application architecture as well as the future of React.
https://reactjs.org/community/support.html


Multi-network support

Currently, devc does not support the scenario for keeping a container connected to multiple networks. There is a limitation in Docker where users can only specify one network using the --net option in the docker run command (specified for devc through dockerRunOpts). More info here: https://github.com/moby/moby/issues/17750. As discussed in the referenced issue, it is possible for users to add containers to a network using the docker network connect command once a container has been created or started. This leads to an issue with devc, because every time an image rebuild or container restart is required, the container will be destroyed and will not be added back to the networks it was connected to through the docker network connect command.

One way for devc to support multi-networks is to track all the networks a container is connected to through the docker network connect command, and ensure that the new container created during a container restart is connected to those networks.

Another possibility is to have a parameter where users specify all the networks a container should be connected to, and devc can connect the container once it is running on startup and restarts.

Both of these options will not solve the potential user issue where they may require the container to be connected to multiple networks before starting up. As mentioned in the referenced issue above, this scenario would require the container to be created, then connected to the necessary networks, and then started. This may be another scenario that should be considered here.

Cancelling. This can be reopened if there is a need for it.

Cancelling. This can be reopened if there is a need for it.


Added ./images to dev serve path, updated all offensive image paths

Ends up a few paths hardcoded for dev env slipped through, those have been removed and updated to paths that work for dev and prod

closes #316
@chriskacerguis 🌮
@dtaylor113  I promise blueprints hasn't been broken 🔒 📿
@evertmulder can you confirm this to be a satisfactory solution?

@miq-bot add_label euwe/yes

Euwe Backport conflict:
$ git cherry-pick -e -x -m 1   1bcb7c6
error: could not apply 1bcb7c6... Merge pull request #318 from AllenBW/bug/316-profile-images-not-found
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'

$ git status
On branch euwe
Your branch is up-to-date with 'upstream/euwe'.
 as appropriate to mark resolution)

	deleted by us:   client/app/components/blueprints/blueprint-canvas/_blueprint-canvas.sass
	both modified:   client/app/services/profiles-state.service.js
	both modified:   client/app/states/designer/blueprints/editor/_editor.sass
	both modified:   client/app/states/services/details/details.html
	deleted by us:   server/utils/serviceApp.js
	deleted by us:   tests/profiles/profiles-details.directive.spec.js

$ git diff

diff --cc client/app/services/profiles-state.service.js
index c11cbd8,ef78684..0000000
--- a/client/app/services/profiles-state.service.js
+++ b/client/app/services/profiles-state.service.js
@@@ -5,65 -5,60 +5,86 @@@
        .factory('ProfilesState', ProfilesStateFactory);

    /** @ngInject */
 -  function ProfilesStateFactory(CollectionsApi, EventNotifications, sprintf) {
 +  function ProfilesStateFactory(CollectionsApi, EventNotifications, sprintf, $q) {
      var profileState = {};

++<<<<<<< HEAD
 +    profileState.providersInfo = [
 +      {
 +        keyword: 'amazon',
 +        title: 'Amazon EC2',
 +        image: 'assets/images/providers/vendor-amazon.svg',
 +      },
 +      {
 +        keyword: 'azure',
 +        title: 'Azure',
 +        image: 'assets/images/providers/vendor-azure.svg',
 +      },
 +      {
 +        keyword: 'google',
 +        title: 'Google Compute Engine',
 +        image: 'assets/images/providers/vendor-google.svg',
 +      },
 +      {
 +        keyword: 'openstack',
 +        title: 'OpenStack',
 +        image: 'assets/images/providers/vendor-openstack_infra.svg',
 +      },
 +      {
 +        keyword: 'vmware',
 +        title: 'VMware vCloud',
 +        image: 'assets/images/providers/vendor-vmware_cloud.svg',
 +      },
 +    ];
++=======
+     var providerTypes = {
+       amazon: 'Amazon EC2',
+       azure: 'Azure',
+       google: 'Google Compute Engine',
+       openstack: 'OpenStack',
+       vmware: 'VMware vCloud',
+       unknown: 'Unknown',
+     };
+     var providerImages = {
+       amazon: 'images/providers/vendor-amazon.svg',
+       azure: 'images/providers/vendor-azure.svg',
+       google: 'images/providers/vendor-google.svg',
+       openstack: 'images/providers/vendor-openstack_infra.svg',
+       vmware: 'images/providers/vendor-vmware_cloud.svg',
+       unknown: 'images/providers/vendor-unknown.svg',
+     };
+
+     var providerTypeKeys = ['amazon', 'azure', 'google', 'openstack', 'vmware'];
++>>>>>>> 1bcb7c6... Merge pull request #318 from AllenBW/bug/316-profile-images-not-found

 -    function getProviderKey(typedObject) {
 -      var key;
 +    profileState.getProviderType = function(typedObject) {
 +      var providerType = 'Unknown';

        if (typedObject) {
 -        key = providerTypeKeys.find(function(nextKey) {
 -          return typedObject.type.toLowerCase().indexOf(nextKey) >= 0;
 +        var info = profileState.providersInfo.find(function(providerInfo) {
 +          return typedObject.type.toLowerCase().indexOf(providerInfo.keyword) >= 0;
          });
 +        if (info) {
 +          providerType = info.title;
 +        }
        }

 -      if (!key) {
 -        key = 'unknown';
 -      }
 -
 -      return key;
 -    }
 -
 -    profileState.getProviderTypes = function() {
 -      var returnTypes = [];
 -
 -      angular.forEach(providerTypeKeys, function(key) {
 -        returnTypes.push(providerTypes[key]);
 -      });
 -
 -      return returnTypes;
 +      return providerType;
      };

 -    profileState.getProviderType = function(typedObject) {
 -      return  providerTypes[getProviderKey(typedObject)];
 -    };
 +    profileState.getProviderTypeImage = function(provider) {
 +      var providerImage = 'assets/images/providers/vendor-unknown.svg';
 +
 +      if (provider) {
 +        var info = profileState.providersInfo.find(function(providerInfo) {
 +          return provider.type.toLowerCase().indexOf(providerInfo.keyword) >= 0;
 +        });
 +        if (info) {
 +          providerImage = info.image;
 +        }
 +      }

 -    profileState.getProviderTypeImage = function(typedObject) {
 -      return  providerImages[getProviderKey(typedObject)];
 +      return providerImage;
      };

      profileState.sort = {
diff --cc client/app/states/designer/blueprints/editor/_editor.sass
index bd1a4e7,eabca9a..0000000
--- a/client/app/states/designer/blueprints/editor/_editor.sass
+++ b/client/app/states/designer/blueprints/editor/_editor.sass
@@@ -204,13 -219,13 +204,17 @@@

      .canvas
        //border: 2px solid brown
++<<<<<<>>>>>> 1bcb7c6... Merge pull request #318 from AllenBW/bug/316-profile-images-not-found:client/app/components/blueprints/blueprint-editor/_blueprint-editor.sass
        background-repeat: repeat
 -      height: 756px
 -      width: 1396px

      .canvas-in-connection-mode
-       background-image: url('/client/assets/images/blueprint-designer/canvas-dot-grid-disabled.png')
+       background-image: url('../images/blueprint-designer/canvas-dot-grid-disabled.png')
        background-repeat: repeat

      a
diff --cc client/app/states/services/details/details.html
index f9129b8,66917cc..0000000
--- a/client/app/states/services/details/details.html
+++ b/client/app/states/services/details/details.html
@@@ -203,9 -202,8 +203,13 @@@

                  </button>
                  <button class="btn btn-default open-console-button" ng-if="item['supports_cockpit?'] && item.power_state == 'on'" tooltip="{{'Open Cockpit console for this VM'|translate}}" tooltip-placement="left">
++<<<<<<< HEAD
 +
++=======
+
++>>>>>>> 1bcb7c6... Merge pull request #318 from AllenBW/bug/316-profile-images-not-found
                  </button>
 +

* Unmerged path client/app/components/blueprints/blueprint-canvas/_blueprint-canvas.sass
* Unmerged path server/utils/serviceApp.js
* Unmerged path tests/profiles/profiles-details.directive.spec.js

@AllenBW can you please address?

Backported to Euwe via https://github.com/ManageIQ/manageiq-ui-service/pull/333