Using BSRGanX2 from Model zoo, GPU Compute mode is working good on PC wuth RTX 3060, but the same operation is making the app to crash with the below logs in between the verbose operation
Logs
2023-08-26 13:56:29.614 25121 485 Info Unity Conv - name: 1884, inputs: [1883, HRconv.weight, HRconv.bias], fusedActivation: None, group: 1, strides: [1, 1], pads: [1, 1, 1, 1], dilations: [1, 1], autoPad: NotSet, kernelShape: [3, 3], fusedActivation: None
2023-08-26 13:56:29.614 25121 485 Warn Unity Exceeded safe compute dispatch group count limit per dimension [1, 116620, 1] for Conv2D_T16x16_R4x4
2023-08-26 13:56:29.618 25121 485 Error Unity Thread group count is above the maximum allowed limit. Maximum allowed thread group count is 65535.
2023-08-26 13:56:29.618 25121 485 Error Unity Unity.Sentis.ComputeHelper:Dispatch(ComputeFunc, Int32, Int32, Int32)
2023-08-26 13:56:29.618 25121 485 Error Unity Unity.Sentis.GPUComputeBackend:ConvMobile(TensorFloat, TensorFloat, TensorFloat, TensorFloat, Span`1, Span`1, Span`1, FusableActivation)
2023-08-26 13:56:29.618 25121 485 Error Unity Unity.Sentis.GPUComputeBackend:Conv(TensorFloat, TensorFloat, TensorFloat, Int32, Span`1, Span`1, Span`1, FusableActivation)
2023-08-26 13:56:29.618 25121 485 Error Unity Unity.Sentis.Layers.Conv:Execute(Tensor[], ExecutionContext)
2023-08-26 13:56:29.618 25121 485 Error Unity Unity.Sentis.<StartManualSchedule>d__33:MoveNext()
2023-08-26 13:56:29.618 25121 485 Error Unity Unity.Sentis.GenericWorker:Execute()
2023-08-26 13:56:29.618 25121 485 Error Unity <PerformOperation>d__10:MoveNext()
2023-08-26 13:56:29.618 25121 485 Error Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2023-08-26 13:56:29.618 25121 485 Error Unity [ line -1636289176]
Code
IEnumerator PerformOperation()
{
Debug.Log(tex.height);
Debug.Log(tex.width);
yield return null;
originalImage.sprite = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0.5f, 0.5f),
100f, 0, SpriteMeshType.FullRect);
yield return null;
_runtimeModel = ModelLoader.Load(modelAsset);
Debug.Log(_runtimeModel);
yield return null;
_worker = WorkerFactory.CreateWorker(BackendType.GPUCompute, _runtimeModel, true);
_tensor = TextureConverter.ToTensor(tex, width: tex.width / 2, height: tex.height / 2, 3);
_worker.Execute(_tensor);
Debug.LogError("_worker Executed");
yield return null;
_peekOutput = _worker.FinishExecutionAndDownloadOutput() as TensorFloat;
_peekOutput.MakeReadable();
RenderTexture rt;
Debug.LogError("Got data");
rt = TextureConverter.ToTexture(_peekOutput, width: tex.width, height: tex.height);
rawImage.texture = rt;
_peekOutput?.Dispose();
_tensor?.Dispose();
_worker?.Dispose();
Debug.LogError("Executed...");
}
Platform Info
Device : OnePlus Nord CE 3
OS : A13