Make LLVMCompilerTest less stateful.
Instead of assigning the pre and post optimization to a singleton xla::Compiler object, prefer creating a short-lived CpuCompiler or a GpuCompiler instance on the stack. Without this change, adding a second test case on the (Cpu|Gpu)Compiler in the same process triggers a use-after-free. (Btw, LLVMCompiler should really be spelled LlvmCompiler per Google C++ style, I'll do that rename shortly). PiperOrigin-RevId: 175218617
Loading
Please sign in to comment