Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A PTX JIT compilation failed #39

Closed
AlexAba opened this issue Oct 18, 2019 · 4 comments
Closed

A PTX JIT compilation failed #39

AlexAba opened this issue Oct 18, 2019 · 4 comments

Comments

@AlexAba
Copy link

AlexAba commented Oct 18, 2019

I have an exception: "A PTX JIT compilation failed" at

var myKernel = accelerator.LoadAutoGroupedStreamKernel<Index, ArrayView<int>>(MyKernel);.

I have windows 10, nVidia GeForce 940MX, Visual Studio 2017

        using (var context = new Context())
        {
            using (var accelerator = new CudaAccelerator(context))
            {
                var myKernel = accelerator.LoadAutoGroupedStreamKernel<Index, ArrayView<int>>(MyKernel);

                using (var buffer2 = accelerator.Allocate<int>(1000))
                using (var buffer = accelerator.Allocate<int>(1000))
                {

                    s1.Start();

                    myKernel(buffer.Length, buffer.View);

                    accelerator.Synchronize();
                    s1.Stop();

                    var data = buffer.GetAsArray();

                    for (var i = 0; i < 100; i++)
                    {
                        Console.Write(" " + data[i]);
                    }
                }
            }
        }
@m4rs-mt
Copy link
Owner

m4rs-mt commented Oct 19, 2019

@AlexAba this sounds like a driver issue. Have you tried updating your graphics drivers (as also proposed in #36)?

@AlexAba
Copy link
Author

AlexAba commented Oct 20, 2019

I have update my drivers to the last version. And when I use 0.5.1 version it's all ok.

@m4rs-mt
Copy link
Owner

m4rs-mt commented Oct 22, 2019

Hmm.... Can you provide the kernel code in such a way that we can investigate the problem more closely?

@AlexAba
Copy link
Author

AlexAba commented Oct 22, 2019

const int n = 10;
static void MyKernel(Index index, ArrayView<int> dataView)
{
int z = 0;
for (int t = 0; t < n; t++)
{
z += 5;
}
dataView[index] = z;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants