Skip to content

Commit

Permalink
call TFE_ContextOptionsSetConfig
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 09efdd3 commit 39f357c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/api_cc/src/DeepPotJAX.cc
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ void deepmd::DeepPotJAX::init(const std::string& model,
}

TF_SetConfig(sessionopts, config.data(), config.size(), status);
check_status(status);

TF_Buffer* runopts = NULL;

Expand All @@ -273,6 +274,8 @@ void deepmd::DeepPotJAX::init(const std::string& model,
check_status(status);

ctx_opts = TFE_NewContextOptions();
TFE_ContextOptionsSetConfig(ctx_opts, config.data(), config.size(), status);
check_status(status);
ctx = TFE_NewContext(ctx_opts, status);
check_status(status);
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
Expand Down

0 comments on commit 39f357c

Please sign in to comment.