Alea GPU how to get Licensemanager.exe

257 Views Asked by At

I am working on some GPU calculation algo using Alea GPU for the first time. I am unable to find licensemanager.exe file to install the license. I have signed up for community account and have the license code. I was unable to find licensmanager.exe and hence getting compiler error. Attached is image for your reference.

Sample test

Can anybody please advice what I am doing wrong?

public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        [AOTCompile]
        static void SquareKernel(deviceptr<double> outputs, deviceptr<double> inputs, int n)
        {
            var start = blockIdx.x * blockDim.x + threadIdx.x;
            var stride = gridDim.x * blockDim.x;
            for (var i = start; i < n; i += stride)
            {
                outputs[i] = inputs[i] * inputs[i];
            }
        }
        static double[] SquareGPU(double[] inputs)
        {
            var worker = Worker.Default;
            using (var dInputs = worker.Malloc(inputs))
            using (var dOutputs = worker.Malloc<double>(inputs.Length))
            {
                const int blockSize = 256;
                var numSm = worker.Device.Attributes.MULTIPROCESSOR_COUNT;
                var gridSize = Math.Min(16 * numSm, Common.divup(inputs.Length, blockSize));
                var lp = new LaunchParam(gridSize, blockSize);
                worker.Launch(SquareKernel, lp, dOutputs.Ptr, dInputs.Ptr, inputs.Length);
                return dOutputs.Gather();
            }
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            try
            {
                var inputs = Enumerable.Range(0, 101).Select(i => -5.0 + i * 0.1).ToArray();
                var outputs = SquareGPU(inputs);
                Debug.Print("inputs = {0}", String.Join(", ", inputs));
                Debug.Print("outputs = {0}", String.Join(", ", outputs));
            }
            catch(Exception ex)
            {

            }
        }
    }
1

There are 1 best solutions below

3
Xiang Zhang On BEST ANSWER

The code looks right, but if you don't have license installed, it will fail. The license manager executable you can find in the nuget package's tool folder.