Skip to content

[SYCL][CUDA] Allow "ptx" as device object format #10801

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

Closed
wants to merge 1 commit into from

Conversation

stefanatwork
Copy link
Contributor

This allows one to compile SYCL device code to plain PTX directly: -fsycl-targets=nvptx64-nvidia-cuda -fsycl-device-obj=ptx -S

This allows one to compile SYCL device code to plain PTX directly:
-fsycl-targets=nvptx64-nvidia-cuda -fsycl-device-obj=ptx -S
@stefanatwork stefanatwork requested a review from a team as a code owner August 14, 2023 07:45
@stefanatwork
Copy link
Contributor Author

This PR is intended to address #8797

@mdtoguchi
Copy link
Contributor

@stefanatwork, could you add a test?

@jinz2014
Copy link
Contributor

@mdtoguchi Could you please explain what the test looks like ? Thanks.

@mdtoguchi
Copy link
Contributor

@mdtoguchi Could you please explain what the test looks like ? Thanks.

The test would use the option -fsycl-device-obj=ptx and verify the behaviors being performed in the driver (usually by verifying the -ccc-print-phases or expected -### output).

I also noticed that there is no documentation of this new argument - do we need to update the -help information or user guide?

@jinz2014
Copy link
Contributor

jinz2014 commented Dec 12, 2023

@mdtoguchi Could you please explain what the test looks like ? Thanks.

The test would use the option -fsycl-device-obj=ptx and verify the behaviors being performed in the driver (usually by verifying the -ccc-print-phases or expected -### output).

I also noticed that there is no documentation of this new argument - do we need to update the -help information or user guide?

It is a good idea to add the new argument to the doc/help! Not familiar with driver test, I will ping @npmiller @jchlanda. Thanks.

@jchlanda
Copy link
Contributor

@mdtoguchi Could you please explain what the test looks like ? Thanks.

The test would use the option -fsycl-device-obj=ptx and verify the behaviors being performed in the driver (usually by verifying the -ccc-print-phases or expected -### output).
I also noticed that there is no documentation of this new argument - do we need to update the -help information or user guide?

It is a good idea to add the new argument to the doc/help! Not familiar with driver test, I will ping @npmiller @jchlanda. Thanks.

WRT the test, you could look at how different phases are inspected in: https://github.com/intel/llvm/blob/sycl/clang/test/Driver/sycl-spirv-obj.cpp#L1 (that's with the use of -ccc-print-phases switch) and make sure that it matches your expectation.

@al42and
Copy link
Contributor

al42and commented Dec 14, 2023

Could this new flag be used in the "normal" SYCL flow, not to produce PTX, but to do the device code compilation per-object, before the linking stage?

Copy link
Contributor

This pull request is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be automatically closed in 30 days.

@github-actions github-actions bot added the Stale label Sep 15, 2024
Copy link
Contributor

This pull request was closed because it has been stalled for 30 days with no activity.

@jchlanda
Copy link
Contributor

I've resurrected this patch here: #17390

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

Successfully merging this pull request may close these issues.

5 participants