let absoluteSumModule = (new DeviceReduceModule<float32>(GPUModuleTarget.Worker(worker), fun a b -> a+b)).Create(128000)
我尝试了各种 maxNumItems 设置,但无论它抛出什么异常。与上次不同,我什至不知道错误可能是什么,所以我在这里包含了整个转储。
Failure
(Description "$f0(sm52,64)",
Exception
System.OverflowException: Value was either too large or too small for a UInt16.
at Alea.CUDA.UsageByInstanceUtil.f@1-46(Object clrModuleInstance, IRModuleBuildingContext ctx, FieldInfo fieldInfo)
at Alea.CUDA.UsageByInstanceUtil.cudafy@104.Invoke(IRModuleBuildingContext ctx)
at <StartupCode$Alea-CUDA>.$Compilation.compile@490[T](Template`1 template, FSharpOption`1 bitcodeCache, IRModuleBuildingContext ctx, Unit unitVar0)
at <StartupCode$Alea-CUDA>.$Compilation.compile@515-7[T](Template`1 template, FSharpOption`1 bitcodeCache, IRModuleBuildingContext ctx, Unit unitVar0),
System.OverflowException: Value was either too large or too small for a UInt16.
at Alea.CUDA.UsageByInstanceUtil.f@1-46(Object clrModuleInstance, IRModuleBuildingContext ctx, FieldInfo fieldInfo)
at Alea.CUDA.UsageByInstanceUtil.cudafy@104.Invoke(IRModuleBuildingContext ctx)
at <StartupCode$Alea-CUDA>.$Compilation.compile@490[T](Template`1 template, FSharpOption`1 bitcodeCache, IRModuleBuildingContext ctx, Unit unitVar0)
at <StartupCode$Alea-CUDA>.$Compilation.compile@515-7[T](Template`1 template, FSharpOption`1 bitcodeCache, IRModuleBuildingContext ctx, Unit unitVar0))
System.Exception: Compiling failed.
at Alea.CUDA.Worker.LoadProgram[T](Template`1 template, CompileOptions options)
at <StartupCode$Alea-CUDA>.$UsageByInstance.-ctor@271-215.Invoke(Unit _arg1)
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at <StartupCode$Alea-CUDA>.$UsageByInstance.-ctor@77-214.Invoke(Unit _arg1)
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at Alea.CUDA.Unbound.DeviceReduceModule`1.Create(Int32 maxNumItems)
at <StartupCode$FSI_0002>.$FSI_0002.main@() in C:\Users\Marko\Documents\Visual Studio 2015\Projects\Load MNIST\Load MNIST\utils.fsx:line 28
Stopped due to error