Add automatic PyTorch library discovery for Python applications (#2623)
* Add automatic PyTorch library discovery for Python applications (#2623)
This commit is contained in:
committed by
GitHub
parent
c83b3aae07
commit
b533f56197
@@ -933,3 +933,9 @@ parse_args(int argc, char** argv, std::vector<char*>& _env)
|
||||
|
||||
return _outv;
|
||||
}
|
||||
|
||||
void
|
||||
add_torch_library_path(std::vector<char*>& envp, const std::vector<char*>& argv)
|
||||
{
|
||||
rocprofsys::common::add_torch_library_path(envp, argv, verbose > 0, updated_envs);
|
||||
}
|
||||
|
||||
@@ -51,6 +51,8 @@ main(int argc, char** argv)
|
||||
_argv.emplace_back(argv[i]);
|
||||
}
|
||||
|
||||
add_torch_library_path(_env, _argv);
|
||||
|
||||
print_updated_environment(_env);
|
||||
|
||||
if(!_argv.empty())
|
||||
|
||||
@@ -35,3 +35,6 @@ get_initial_environment();
|
||||
|
||||
std::vector<char*>
|
||||
parse_args(int argc, char** argv, std::vector<char*>& envp);
|
||||
|
||||
void
|
||||
add_torch_library_path(std::vector<char*>& envp, const std::vector<char*>& argv);
|
||||
|
||||
Reference in New Issue
Block a user