Skip to content

Commit

Permalink
fix compile error
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz committed Nov 13, 2024
1 parent 1b3fd5e commit 9d95778
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/api_cc/src/DeepPotJAX.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ void deepmd::DeepPotJAX::init(const std::string& model,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x20, 0x1, 0x38, 0x1}};

// Convert the desired percentage into a byte-array.
auto bytes = reinterpret_cast<std::uint8_t*>(0.9);
double gpu_memory_fraction = 0.9;
auto bytes = reinterpret_cast<std::uint8_t*>(&gpu_memory_fraction);

// Put it to the config byte-array, from 3 to 10:
for (std::size_t i = 0; i < sizeof(gpu_memory_fraction); ++i) {
Expand Down

0 comments on commit 9d95778

Please sign in to comment.