PR #11568: Improve NVTX ranges emitted during compilation
PR #11568: Improve NVTX ranges emitted during compilation

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

New ranges:
 - XlaBufferAssignment
 - XlaCompileCudnnFusion
 - XlaCompileGpuAsm
 - XlaCreateGpuExecutable
 - XlaDumpHloModule
 - XlaDumpLlvmIr
 - XlaEmitGpuAsm
 - XlaEmitLlvmIr
 - XlaMemoryScheduler
 - XlaOptimizeLlvmIr

Tweaked XlaCompile, XlaCompileBackend and XlaPass to improve consistency. To allow more explicit range names, the `llvm::Module` is now set to the corresponding HLO module name, where previously it was an empty string.

Because part of #9896 was reverted, `GOOGLE_CUDA` needs to be defined in more translation units to make the NVTX ranges appear. This is done in a separate PR, https://github.com/openxla/xla/pull/11611, on the request of @cheshire.
Copybara import of the project:

--
998bebdee84498eb5ec2df97b9ba94b84d8162cb by Olli Lupton <olupton@nvidia.com>:

Improve NVTX ranges emitted during compilation

New ranges:
 - XlaBufferAssignment
 - XlaCompileCudnnFusion
 - XlaCompileGpuAsm
 - XlaCreateGpuExecutable
 - XlaDumpHloModule
 - XlaDumpLlvmIr
 - XlaEmitGpuAsm
 - XlaEmitLlvmIr
 - XlaMemoryScheduler
 - XlaOptimizeLlvmIr

Tweaked XlaCompile, XlaCompileBackend and XlaPass to improve
consistency. To allow more explicit range names, the llvm::Module is now
set to the corresponding HLO module name, where previously it was an
empty string.

Because part of openxla#9896 was reverted, additional changes to define the
GOOGLE_CUDA macro are needed in order for the new ranges to appear.

Merging this change closes #11568

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/11568 from olupton:nvtx-compilation-annotations 998bebdee84498eb5ec2df97b9ba94b84d8162cb
