Skip to content

Commit

Permalink
Rollback of PR #59536
Browse files Browse the repository at this point in the history
Fix the Mac build by rolling back #59536

#59536 broke building on Mac. The error is:

    error: no member named 'isnan' in namespace 'std'; did you mean simply 'isnan'?

PiperOrigin-RevId: 510557348
  • Loading branch information
reedwm authored and tensorflower-gardener committed Feb 18, 2023
1 parent b806bef commit b3cc517
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -16,8 +16,6 @@ limitations under the License.
#ifndef MLIR_HLO_TOOLS_MLIR_INTERPRETER_FRAMEWORK_TENSOR_OR_MEMREF_H_
#define MLIR_HLO_TOOLS_MLIR_INTERPRETER_FRAMEWORK_TENSOR_OR_MEMREF_H_

#include <math.h>

#include <cstddef>
#include <cstdint>
#include <iterator>
Expand Down Expand Up @@ -280,8 +278,8 @@ struct TensorOrMemref {
for (const auto& indices : view.indices(true)) {
// Treat NaNs as equal.
if constexpr (std::is_floating_point_v<T>) {
bool thisnan = std::isnan(at(indices));
bool othernan = std::isnan(other.at(indices));
bool thisnan = isnan(at(indices));
bool othernan = isnan(other.at(indices));
if (thisnan || othernan) {
if (thisnan && othernan) continue;
return false;
Expand Down

0 comments on commit b3cc517

Please sign in to comment.