Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
i-chaochen authored and hsharsha committed Aug 22, 2024
1 parent 84a0333 commit ef368c5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion xla/debug_options_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ DebugOptions DefaultDebugOptionsIgnoringFlags() {
opts.set_xla_llvm_enable_invariant_load_metadata(true);
opts.set_xla_llvm_disable_expensive_passes(false);
opts.set_xla_backend_optimization_level(3);
opts.set_xla_gpu_autotune_level(4);
opts.set_xla_gpu_autotune_level(5);
opts.set_xla_gpu_autotune_max_solutions(0);
opts.set_xla_cpu_multi_thread_eigen(true);
opts.set_xla_gpu_cuda_data_dir("./cuda_sdk_lib");
Expand Down
6 changes: 5 additions & 1 deletion xla/service/gpu/buffer_comparator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ static absl::StatusOr<bool> DeviceCompare(
return result == 0;
}

// Host side comparison code that does the same thing, but reports some of the
// differences as well. It only print logs for debugging.
//
// Returns true if no differences were seen, false otherwise.
template <typename ElementType, typename ComparisonType>
static absl::StatusOr<bool> HostCompare(const ComparisonParams& params) {
int64_t n = params.current.size() / sizeof(ElementType);
Expand Down Expand Up @@ -195,7 +199,7 @@ absl::StatusOr<bool> BufferComparator::CompareEqual(
"fp8_e5m2_comparison", buffer_comparator::fp8_e5m2_comparison(),
params);
#endif // GOOGLE_CUDA
#if TENSORFLOW_USE_ROCM && TF_ROCM_VERSION >= 60300
#if TENSORFLOW_USE_ROCM && TF_ROCM_VERSION >= 60200
case xla::F8E4M3FNUZ:
return CompareEqualParameterized<tsl::float8_e4m3fnuz, float>(
"fp8_e4m3fnuz_comparison",
Expand Down
2 changes: 1 addition & 1 deletion xla/service/gpu/buffer_comparator.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class BufferComparator {
se::DeviceMemoryBase expected) const;
private:
Shape shape_;
float relative_tol_; // relative tolerance for comparison
double relative_tol_; // relative tolerance for comparison
bool verbose_; // whether to print out error message on mismatch
};

Expand Down
2 changes: 1 addition & 1 deletion xla/service/gpu/gemm_algorithm_picker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ class GemmAutotuner {
comparator.CompareEqual(stream_, /*current=*/OutputBuffer(),
/*expected=*/reference_buffer));
if (!outputs_match) {
LOG(ERROR) << "Results mismatch between different GEMM algorithms. "
LOG(WARNING) << "Results mismatch between different GEMM algorithms. "
<< "This is likely a bug/unexpected loss of precision.";
CHECK(!autotune_config_.should_crash_on_check_failure());

Expand Down

0 comments on commit ef368c5

Please sign in to comment.