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

Cannot create library using dcompute #62

Open
ghost opened this issue Dec 9, 2019 · 2 comments
Open

Cannot create library using dcompute #62

ghost opened this issue Dec 9, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 9, 2019

I created following structure:

.
├── dcompute-app
│   ├── dub.sdl
│   ├── dub.selections.json
│   └── source
│       └── app.d
└── dcompute-lib
    ├── dub.sdl
    ├── dub.selections.json
    └── source
        └── dcomputelibrary
            ├── foo.d // to prevent issue #61 
            └── testkernel.d

dcompute-app depends on dcompute-lib.

Under this condition, I run dub run --compiler=ldc2.
Then the content of .dub/obj/kernels_cuda210_64.ptx becomes almost empty:

	.text
	.file	"dcomputeTargetCUDA"

	.section	".note.GNU-stack","",@progbits

I expected the compiled code of testkernel.d is in it.

This is because ptx is overwritten at dcompute-app build once successfully created at dcompute-lib's build.

@thewilsonator
Copy link
Collaborator

you will need to use -mdcompute-file-prefix=<prefix> (e.g. -mdcompute-file-prefix=dcompute-lib) in your flags to avoid that.

@ghost
Copy link
Author

ghost commented Dec 9, 2019

What you mean is to add that flag to dcompute-lib project?

The flag propagates to dcompute-app and changes the output file of both project.

It does not solve this problem.

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

1 participant