Skip to content

Assertion `originalLType->isStructTy()' failed #53

Open

Description

@mneilly

I ran across dcompute and thought I would give it a try. What is the combination of dcompute and ldc that is expected to work? I have tried ldc 1.4.0 thru 1.15 with dcompute 0.1.0 and master and have not found a combination that works when I try "dub test dcompute".

Depending upon the combination I get different errors including:

../../../.dub/packages/dcompute-master/dcompute/source/dcompute/driver/error.d(165,43): Error: non-constant nested delegate literal expression __lambda9

../../../.dub/packages/dcompute-0.1.0/dcompute/source/dcompute/driver/error.d(143,13): Error: undefined identifier fprintf             
                                                                             
../../../.dub/packages/dcompute-0.1.0/dcompute/source/dcompute/driver/ocl/context.d(144,19): Error: undefined identifier clCreateProgramWithIL 

master/dcompute/source/dcompute/tests/main.d(106): Enforcement failed                            

ldc2: /home/vsts/work/1/s/gen/abi-x86-64.cpp:303: void X86_64TargetABI::rewriteArgument(IrFuncTy&, IrFuncTyArg&, {anonymous}::RegCount&): Assertion `originalLType->isStructTy()' failed.                                                                                        

/usr/local/ldc2-1.13.0-beta2-linux-x86_64/bin/../import/std/array.d(2975,13): Error: TypeInfo cannot be used with -betterC

Activity

  1. thewilsonator commented on Mar 25, 2019

    @thewilsonator
    Collaborator

    Try with the latest LDC beta.

  2. mneilly commented on Mar 25, 2019

    @mneilly
    Author

    Unfortunately, I cannot get that to work either as it gets the 'enforcement failed error'.

    (ldc-1.15.0-beta2)$ dub test dcompute --compiler=ldc2
    Building package dcompute in /home/mneilly/.dub/packages/dcompute-master/dcompute/
    Executable configuration "unittest" of package dcompute defines no main source file, this may cause certain build modes to fail. Add an explicit "mainSourceFile" to the package description to fix this.
    Running custom 'unittest' configuration.
    Performing "unittest" build using ldc2 for x86_64.
    derelict-util 3.0.0-beta.2: building configuration "library"...
    derelict-cl 3.2.0: building configuration "library"...
    derelict-cuda 3.1.1: building configuration "library"...
    taggedalgebraic 0.10.13: target for configuration "library" is up to date.
    dcompute ~master: building configuration "unittest"...
    To force a rebuild of up-to-date targets, run again with --force.
    Running ../../../.dub/packages/dcompute-master/dcompute/dcompute 
    object.Exception@../../../.dub/packages/dcompute-master/dcompute/source/dcompute/tests/main.d(106): Enforcement failed
    ----------------
    ??:? [0x55b341cfea80]
    ??:? [0x55b341d08d3a]
    ??:? [0x55b341cf026d]
    exception.d:516 [0x55b341cba4a0]
    exception.d:436 [0x55b341ca9465]
    main.d:106 [0x55b341ca8a79]
    ??:? [0x55b341cefeef]
    ??:? [0x55b341cefde7]
    __entrypoint.d:8 [0x55b341caa5d4]
    ??:? __libc_start_main [0x7f78136f42e0]
    ??:? [0x55b341ca8219]
    Program exited with code 1
    
  3. thewilsonator commented on Mar 25, 2019

    @thewilsonator
    Collaborator

    You appear to be using OpenCL, which means that you need to figure out which device (if any) supports OpenCL 2.1 (for me that is the Intel experimental CPU) and adjust https://github.com/libmir/dcompute/blob/master/source/dcompute/tests/main.d#L24 to match whatever index that device is. I insulated the Nvidia 1.2 before the intel ones so that is index zero, then the intel 1.2 one is index one and the experimental 2.1 device is index 2.

  4. mneilly commented on Mar 25, 2019

    @mneilly
    Author

    Thanks for the responses (and the creation of dcompute!). :)

    I'm not intending to use CL. I see version = DComputeTestCUDA; at the top of ~/.dub/packages/dcompute-master/dcompute/source/dcompute/tests/ and I see that .dub/obj/kernels_cuda210_64.ptx was created...

    If I comment out the enforce I see that res[] is all zero.

  5. thewilsonator commented on Mar 25, 2019

    @thewilsonator
    Collaborator

    Hmm, I'll have to look into that then.

  6. thewilsonator commented on Dec 11, 2019

    @thewilsonator
    Collaborator

    This may have been fixed by ldc-developers/ldc#3251

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions