Skip to content

Instantly share code, notes, and snippets.

@skye
Created August 13, 2021 18:16
Show Gist options
  • Save skye/931c8371b858cab96bae251652bfdf11 to your computer and use it in GitHub Desktop.
Save skye/931c8371b858cab96bae251652bfdf11 to your computer and use it in GitHub Desktop.
$ TF_CPP_VMODULE=bfc_allocator=1,stream_executor_pimpl=1 XLA_PYTHON_CLIENT_PREALLOCATE=false TF_CPP_MIN_LOG_LEVEL=0 python3 -c "import jax; jax.numpy.add(1,1)"
2021-08-13 11:12:50.269963: I external/org_tensorflow/tensorflow/compiler/xla/service/service.cc:171] XLA service 0x28efc10 initialized for platform Interpreter (this does not guarantee that XLA will be used). Devices:
2021-08-13 11:12:50.269987: I external/org_tensorflow/tensorflow/compiler/xla/service/service.cc:179] StreamExecutor device (0): Interpreter, <undefined>
2021-08-13 11:12:50.274779: I external/org_tensorflow/tensorflow/compiler/xla/pjrt/tfrt_cpu_pjrt_client.cc:163] TfrtCpuClient created.
ERROR:absl:preallocate false
2021-08-13 11:12:50.384306: I external/org_tensorflow/tensorflow/compiler/xla/service/service.cc:171] XLA service 0x2a6e610 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2021-08-13 11:12:50.384362: I external/org_tensorflow/tensorflow/compiler/xla/service/service.cc:179] StreamExecutor device (0): GeForce GTX 1080, Compute Capability 6.1
2021-08-13 11:12:50.384904: I external/org_tensorflow/tensorflow/compiler/xla/pjrt/gpu_device.cc:309] Using BFC allocator.
2021-08-13 11:12:50.384988: I external/org_tensorflow/tensorflow/compiler/xla/pjrt/gpu_device.cc:272] XLA backend will use up to 7555173580 bytes on device 0 for BFCAllocator.
2021-08-13 11:12:50.385027: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:68] Creating new BFCAllocator named: GPU_0_bfc
2021-08-13 11:12:50.385045: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 256B
2021-08-13 11:12:50.385060: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 512B
2021-08-13 11:12:50.385094: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 1.0KiB
2021-08-13 11:12:50.385110: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 2.0KiB
2021-08-13 11:12:50.385125: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 4.0KiB
2021-08-13 11:12:50.385141: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 8.0KiB
2021-08-13 11:12:50.385157: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 16.0KiB
2021-08-13 11:12:50.385172: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 32.0KiB
2021-08-13 11:12:50.385188: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 64.0KiB
2021-08-13 11:12:50.385204: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 128.0KiB
2021-08-13 11:12:50.385219: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 256.0KiB
2021-08-13 11:12:50.385234: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 512.0KiB
2021-08-13 11:12:50.385250: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 1.00MiB
2021-08-13 11:12:50.385264: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 2.00MiB
2021-08-13 11:12:50.385279: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 4.00MiB
2021-08-13 11:12:50.385294: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 8.00MiB
2021-08-13 11:12:50.385310: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 16.00MiB
2021-08-13 11:12:50.385325: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 32.00MiB
2021-08-13 11:12:50.385341: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 64.00MiB
2021-08-13 11:12:50.385356: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 128.00MiB
2021-08-13 11:12:50.385372: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 256.00MiB
2021-08-13 11:12:50.385389: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:68] Creating new BFCAllocator named: xla_gpu_host_bfc
2021-08-13 11:12:50.385404: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 256B
2021-08-13 11:12:50.385420: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 512B
2021-08-13 11:12:50.385435: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 1.0KiB
2021-08-13 11:12:50.385450: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 2.0KiB
2021-08-13 11:12:50.385464: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 4.0KiB
2021-08-13 11:12:50.385479: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 8.0KiB
2021-08-13 11:12:50.385494: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 16.0KiB
2021-08-13 11:12:50.385528: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 32.0KiB
2021-08-13 11:12:50.385544: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 64.0KiB
2021-08-13 11:12:50.385559: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 128.0KiB
2021-08-13 11:12:50.385574: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 256.0KiB
2021-08-13 11:12:50.385589: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 512.0KiB
2021-08-13 11:12:50.385604: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 1.00MiB
2021-08-13 11:12:50.385618: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 2.00MiB
2021-08-13 11:12:50.385633: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 4.00MiB
2021-08-13 11:12:50.385647: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 8.00MiB
2021-08-13 11:12:50.385663: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 16.00MiB
2021-08-13 11:12:50.385678: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 32.00MiB
2021-08-13 11:12:50.385693: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 64.00MiB
2021-08-13 11:12:50.385708: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 128.00MiB
2021-08-13 11:12:50.385724: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:71] Creating bin of max chunk size 256.00MiB
2021-08-13 11:12:50.388093: I external/org_tensorflow/tensorflow/stream_executor/tpu/tpu_platform_interface.cc:74] No TPU platform found.
2021-08-13 11:12:50.452065: I external/org_tensorflow/tensorflow/stream_executor/stream_executor_pimpl.cc:504] Called StreamExecutor::Allocate(size=2097152, memory_space=0) returns 0x7f700aa00000
2021-08-13 11:12:50.452130: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:155] Extending allocation by 2.00MiB bytes for GPU_0_bfc.
2021-08-13 11:12:50.452153: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:160] Total allocated bytes: 2.00MiB
2021-08-13 11:12:50.452170: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:163] Allocated memory at 0x7f700aa00000 to 0x7f700ac00000
2021-08-13 11:12:50.453904: I external/org_tensorflow/tensorflow/stream_executor/stream_executor_pimpl.cc:558] Called StreamExecutor::HostMemoryAllocate(size=2097152) returns 0x7f700ac00000
2021-08-13 11:12:50.453941: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:155] Extending allocation by 2.00MiB bytes for xla_gpu_host_bfc.
2021-08-13 11:12:50.453960: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:160] Total allocated bytes: 2.00MiB
2021-08-13 11:12:50.453976: I external/org_tensorflow/tensorflow/core/common_runtime/bfc_allocator.cc:163] Allocated memory at 0x7f700ac00000 to 0x7f700ae00000
2021-08-13 11:12:50.492430: I external/org_tensorflow/tensorflow/stream_executor/stream_executor_pimpl.cc:587] Called StreamExecutor::SynchronizeAllActivity()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment