Skip to content

Commit

Permalink
Add std::hash to fix nvcc bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemartinlogan committed Jan 16, 2025
1 parent 5e02460 commit 2fe34f3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tasks/hermes_core/src/hermes_core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@
#include "hermes/dpe/dpe_factory.h"
#include "hermes/hermes.h"

/** NOTE(llogan): std::hash function for string. This is because NVCC is bugged
*/
namespace std {
template <>
struct hash<chi::string> {
size_t operator()(const chi::string &text) const { return text.Hash(); }
};
} // namespace std

namespace hermes {

#define HERMES_LANES 32
Expand Down

0 comments on commit 2fe34f3

Please sign in to comment.