Skip to content

Commit 02ec89e

Browse files
committed
Revert "Android GPU support with vulkan"
This reverts commit 43622aa.
1 parent 2e38f28 commit 02ec89e

3 files changed

Lines changed: 6 additions & 33 deletions

File tree

Editor/LLMEditor.cs

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -436,23 +436,10 @@ private void CopyToClipboard(string text)
436436

437437
public override void AddSetupExtras(SerializedObject llmScriptSO)
438438
{
439-
if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneWindows ||
440-
EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneWindows64 ||
441-
EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneLinux64)
442-
{
443-
bool useCUBLAS = LLMUnitySetup.CUBLAS;
444-
GUIContent contentCUBLAS = new GUIContent("Light build for Nvidia GPUs", "Use tinyBLAS instead of cuBLAS that takes up less space and has similar performance for quants - doesn't work with i-quants and flash attention");
445-
bool newUseCUBLAS = !EditorGUILayout.Toggle(contentCUBLAS, !useCUBLAS);
446-
if (newUseCUBLAS != useCUBLAS) LLMUnitySetup.SetCUBLAS(newUseCUBLAS);
447-
}
448-
449-
if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android)
450-
{
451-
bool useAndroidVulkan = LLMUnitySetup.AndroidVulkan;
452-
GUIContent contentAndroidVulkan = new GUIContent("Use Android GPU (Vulkan, API>=29)", "Use the Android Vulkan build that works with the Android GPU according to the number of GPU layers");
453-
bool newUseAndroidVulkan = EditorGUILayout.Toggle(contentAndroidVulkan, useAndroidVulkan);
454-
if (newUseAndroidVulkan != useAndroidVulkan) LLMUnitySetup.SetAndroidVulkan(newUseAndroidVulkan);
455-
}
439+
bool useCUBLAS = LLMUnitySetup.CUBLAS;
440+
GUIContent content = new GUIContent("Light build for Nvidia GPUs", "Use tinyBLAS instead of cuBLAS that takes up less space and has similar performance for quants - doesn't work with i-quants and flash attention");
441+
bool newUseCUBLAS = !EditorGUILayout.Toggle(content, !useCUBLAS);
442+
if (newUseCUBLAS != useCUBLAS) LLMUnitySetup.SetCUBLAS(newUseCUBLAS);
456443
}
457444

458445
public override void OnInspectorGUI()

Runtime/LLMBuilder.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,7 @@ public static void BuildLibraryPlatforms(BuildTarget buildTarget)
212212
platforms.Add("osx-arm64");
213213
break;
214214
case BuildTarget.Android:
215-
if (LLMUnitySetup.AndroidVulkan)
216-
platforms.Add("android-arm64-vulkan");
217-
else
218-
platforms.Add("android-arm64");
215+
platforms.Add("android-arm64");
219216
platforms.Add("android-x64");
220217
break;
221218
case BuildTarget.iOS:
@@ -270,7 +267,7 @@ public static void BuildLibraryPlatforms(BuildTarget buildTarget)
270267
{
271268
foreach (string platform in platforms)
272269
{
273-
string source = Path.Combine(LLMUnitySetup.libraryPath, platform, "native", $"libllamalib_{platform}.{MobileSuffix(buildTarget)}");
270+
string source = Path.Combine(LLMUnitySetup.libraryPath, platform, "native", $"libllamalib_{platform}.{MobileSuffix(buildTarget)}");
274271
string target = MobilePluginPath(buildTarget, platform.Split("-")[1].ToUpper());
275272
string pluginDir = PluginDir(buildTarget.ToString());
276273
MoveAction(source, target);

Runtime/LLMUnitySetup.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,6 @@ public class LLMUnitySetup
170170
static string DebugModeKey = "DebugMode";
171171
public static bool CUBLAS = false;
172172
static string CUBLASKey = "CUBLAS";
173-
public static bool AndroidVulkan = false;
174-
static string AndroidVulkanKey = "AndroidVulkan";
175173
static List<Action<string>> errorCallbacks = new List<Action<string>>();
176174
static readonly object lockObject = new object();
177175
static Dictionary<string, Task> androidExtractTasks = new Dictionary<string, Task>();
@@ -211,7 +209,6 @@ static void LoadPlayerPrefs()
211209
{
212210
DebugMode = (DebugModeType)PlayerPrefs.GetInt(DebugModeKey, (int)DebugModeType.All);
213211
CUBLAS = PlayerPrefs.GetInt(CUBLASKey, 0) == 1;
214-
AndroidVulkan = PlayerPrefs.GetInt(AndroidVulkanKey, 0) == 1;
215212
}
216213

217214
public static void SetDebugMode(DebugModeType newDebugMode)
@@ -231,14 +228,6 @@ public static void SetCUBLAS(bool value)
231228
PlayerPrefs.Save();
232229
}
233230

234-
public static void SetAndroidVulkan(bool value)
235-
{
236-
if (AndroidVulkan == value) return;
237-
AndroidVulkan = value;
238-
PlayerPrefs.SetInt(AndroidVulkanKey, value ? 1 : 0);
239-
PlayerPrefs.Save();
240-
}
241-
242231
#endif
243232

244233
public static string GetAssetPath(string relPath = "")

0 commit comments

Comments
 (0)