Skip to content

Commit 1f523b6

Browse files
committed
fix error on empty architectures
1 parent 4ea6b12 commit 1f523b6

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

Runtime/LlamaLib/LlamaLib.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -751,10 +751,7 @@ private string GetRuntimeLibraryPath()
751751
private string[] GetAvailableArchitectures(bool gpu)
752752
{
753753
string architecturesString = Marshal.PtrToStringAnsi(Available_Architectures(gpu));
754-
if (string.IsNullOrEmpty(architecturesString))
755-
{
756-
throw new InvalidOperationException("No architectures available for the specified GPU setting.");
757-
}
754+
if (string.IsNullOrEmpty(architecturesString)) return new string[0];
758755

759756
string[] librariesOptions = architecturesString.Split(',');
760757
List<string> libraries = new List<string>();

0 commit comments

Comments
 (0)