MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / find_available_python_versions

Function find_available_python_versions

src/py/py_loader.cpp:32–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30inline namespace MIGRAPHX_INLINE_NS {
31
32static std::vector<fs::path> find_available_python_versions()
33{
34 std::vector<fs::path> result;
35 auto path = dynamic_loader::path(&load_py).parent_path();
36 for(const auto& entry : fs::directory_iterator{path})
37 {
38 auto p = entry.path();
39 if(not fs::is_regular_file(p))
40 continue;
41 if(not contains(p.stem().string(), "migraphx_py_"))
42 continue;
43 result.push_back(p);
44 }
45 std::sort(result.begin(), result.end(), std::greater<>{});
46 return result;
47}
48
49static dynamic_loader load_py_lib()
50{

Callers 1

load_py_libFunction · 0.85

Calls 7

pathFunction · 0.85
containsFunction · 0.85
pathMethod · 0.80
sortFunction · 0.50
push_backMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected