PR #11394: [XLA GPU] Add command buffer BarrierCmd
PR #11394: [XLA GPU] Add command buffer BarrierCmd

Imported from GitHub PR https://github.com/openxla/xla/pull/11394

This PR adds barrier command into command buffer. The description for the command: 

//===----------------------------------------------------------------------===//
// BarrierCmd
// BarrierCmd insert a barrier from the execution scope created from the
// 'from_stream_id' to the execution scope created from the
// 'execution_stream_id', e.g. Async operator lowered to command buffer requires
// a barrier from the launching stream to the async operator's execution stream.
//===----------------------------------------------------------------------===//

This PR is a split of PR: https://github.com/openxla/xla/pull/11348
Copybara import of the project:

--
56758cb97f5cee224258d722eb42f2f1faf4cd05 by Shawn Wang <shawnw@nvidia.com>:

Add command buffer BarrierCmd

--
c740aea329e9ab5f92442b93d64c88c7f8e8bed7 by Shawn Wang <shawnw@nvidia.com>:

Change NCCL stream id type

--
61cb7c622a0193b404e458e072f282ad0d7a1859 by Shawn Wang <shawnw@nvidia.com>:

fix test failures

Merging this change closes #11394

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/11394 from shawnwang18:shawnw/add_command_buffer_barrier_cmd 61cb7c622a0193b404e458e072f282ad0d7a1859
