Results 1 to 6 of 6

Thread: nvidia 197.45 crash : global initialized with literal

  1. #1
    Senior Member
    Join Date
    Nov 2009
    Posts
    118

    nvidia 197.45 crash : global initialized with literal

    With last nVidia release, initializing a global vector type variable with a literal crash the compiler.

    this example crash in clBuildProgram :

    Code :
    float4 f = (float4)(0.f, 0.f, 0.f, 0.f);
     
    __kernel void test()
    {
    }

    Ati stream on its side absolutely want f to be declared in constant memory space... I don't see this requirement in the specification.

  2. #2
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: nvidia 197.45 crash : global initialized with literal

    Ati stream on its side absolutely want f to be declared in constant memory space... I don't see this requirement in the specification.
    AMD is doing the right thing here. See section 6.5 of the spec: "All program scope variables must be declared in the __constant address space."
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

  3. #3
    Senior Member
    Join Date
    Nov 2009
    Posts
    118

    Re: nvidia 197.45 crash : global initialized with literal

    A global variable must be a program scoped variable?
    Can't we have global kernel scoped variables (initialized at kernel execution)?

    In fact I read this sentence but it was not really clear for me...

  4. #4
    Senior Member
    Join Date
    Nov 2009
    Posts
    118

    Re: nvidia 197.45 crash : global initialized with literal

    By the way using __constant don't change the crash with 197.45.

    With 257.15 beta drivers, without constant we have the same error than ati, and with constant there is an opencl error (it's a bit better than a crash) with a message speaking about "Ptx compilation failed".

  5. #5
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: nvidia 197.45 crash : global initialized with literal

    A global variable must be a program scoped variable?
    All variables declared outside of a kernel (i.e. at program scope) must be constant. The term "global variable" is ambiguous and is better avoided.

    You may get better feedback if you report the problems you are seeing to the company that is shipping the particular SDK you are using.
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

  6. #6
    Senior Member
    Join Date
    Nov 2009
    Posts
    118

    Re: nvidia 197.45 crash : global initialized with literal

    Thanks.
    I'll report to nVidia forum, but I always think that it should be good to have a section on khronos forum to report implementation bugs.

Similar Threads

  1. Replies: 0
    Last Post: 02-13-2013, 06:22 AM
  2. Replies: 1
    Last Post: 02-23-2010, 01:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •