Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s committed Jan 6, 2025
1 parent 50cd40f commit dd3c040
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pyg_lib/csrc/classes/cpu/hash_map.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <torch/library.h>

namespace pyg {
namespace classes {

struct CPUHashMap : torch::CustomClassHolder {
CPUHashMap(){};
};

TORCH_LIBRARY(pyg, m) {
m.class_<CPUHashMap>("CPUHashMap").def(torch::init());
}

} // namespace classes
} // namespace pyg
7 changes: 7 additions & 0 deletions test/csrc/classes/test_hash_map.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "pyg_lib/csrc/classes/cpu/hash_map.cpp"

#include <gtest/gtest.h>

TEST(CPUHashMapTest, BasicAssertions) {
auto map = pyg::classes::CPUHashMap();
}

0 comments on commit dd3c040

Please sign in to comment.