fix: merge gpu arch and os tensorrt models (#3299)

Signed-off-by: James <namnh0122@gmail.com>
This commit is contained in:
NamH 2024-08-07 23:05:28 +07:00 committed by GitHub
parent 602097909d
commit aa7dbdc9fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -174,11 +174,22 @@ export const getEngineAndBranches = async (
continue
}
if (branch.includes('tensorrt-llm')) {
const fileSize = await getFileSizeByRepoAndBranch(name, branch)
engineToBranches.tensorrtllm.push({
name: branch,
fileSize: fileSize,
})
const mergedBranchName = branch.split('-').slice(0, -2).join('-')
let isAlreadyAdded = false
// check if the branch is already added
for (const branch of engineToBranches.tensorrtllm) {
if (branch.name.includes(mergedBranchName)) {
isAlreadyAdded = true
break
}
}
if (!isAlreadyAdded) {
const fileSize = await getFileSizeByRepoAndBranch(name, branch)
engineToBranches.tensorrtllm.push({
name: mergedBranchName,
fileSize: fileSize,
})
}
continue
}
}