Skip to content

Commit

Permalink
[pytorch] Fixes binary location check for 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
frankfliu committed Apr 12, 2023
1 parent b46a76f commit 7e26e62
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,7 @@ private static LibTorch copyNativeLibraryFromClasspath(Platform platform) {
if (!m.matches()) {
throw new AssertionError("Unexpected version: " + version);
}
String[] versions = m.group(1).split("\\.");
int minorVersion = Integer.parseInt(versions[1]);
int buildVersion = Integer.parseInt(versions[2]);
String pathPrefix;
if (minorVersion > 10 || (minorVersion == 10 && buildVersion == 2)) {
pathPrefix = "pytorch/" + flavor + '/' + classifier;
} else {
pathPrefix = "native/lib";
}
String pathPrefix = "pytorch/" + flavor + '/' + classifier;

Files.createDirectories(cacheDir);
tmp = Files.createTempDirectory(cacheDir, "tmp");
Expand Down

0 comments on commit 7e26e62

Please sign in to comment.