Skip to content

Commit

Permalink
Disable NVJitLink and LibNvPtxCompiler support under MSAN
Browse files Browse the repository at this point in the history
NVJitLink and LibNvPtxCompiler as precompiled libraries are not compatible with MSan, so we disable their support so that we at least can run some larger tests under MSAN. This is not ideal because it means these tests will take different code paths but the alternative would be not running them at all.

PiperOrigin-RevId: 696001523
  • Loading branch information
beckerhe authored and Google-ML-Automation committed Nov 13, 2024
1 parent 27e02a9 commit 69d6485
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
8 changes: 8 additions & 0 deletions xla/stream_executor/cuda/nvjitlink_support.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ limitations under the License.

namespace stream_executor {
bool IsLibNvJitLinkSupported() {
// NVJitLink as a precompiled library is not compatible with MSan, so we
// disable its support so that we at least can run some larger tests under
// MSAN. This is not ideal because it means these tests will take different
// code paths but the alternative would be not running them at all.
#ifdef MEMORY_SANITIZER
return false;
#else
return LIBNVJITLINK_SUPPORT && CUDA_SUPPORTS_NVJITLINK;
#endif
}
} // namespace stream_executor
12 changes: 11 additions & 1 deletion xla/stream_executor/cuda/ptx_compiler_support.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,15 @@ limitations under the License.
#include "xla/stream_executor/cuda/ptx_compiler_support.h"

namespace stream_executor {
bool IsLibNvPtxCompilerSupported() { return LIBNVPTXCOMPILER_SUPPORT; }
bool IsLibNvPtxCompilerSupported() {
// Libnvptxcompiler as a precompiled library is not compatible with MSan, so
// we disable its support so that we at least can run some larger tests under
// MSAN. This is not ideal because it means these tests will take different
// code paths but the alternative would be not running them at all.
#ifdef MEMORY_SANITIZER
return false;
#else
return LIBNVPTXCOMPILER_SUPPORT;
#endif
}
} // namespace stream_executor

0 comments on commit 69d6485

Please sign in to comment.