Commit bed00207 authored by Justin Lebar's avatar Justin Lebar Committed by TensorFlower Gardener
Browse files

[SE] Allow context reuse in CreatedContexts::Add.

It's possible for an already-existing context to be returned by
cuDevicePrimaryCtxRetain.  Previously, this would be handled incorrectly
by CreatedContexts::Add, which was assuming that inserts into the map
always succeeded.

This makes XLA work with
TF_CUDA_PLATFORM_GPU_DEVICE_SCHEDULE=blocking_sync, although exactly how
that flag is related to this bug is unclear to me.  It seems like some
sort of race condition, maybe?
PiperOrigin-RevId: 207010059
parent 626317cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment