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

test code fails on first run #1455

Closed
TomMelt opened this issue May 12, 2024 · 1 comment · Fixed by #1460
Closed

test code fails on first run #1455

TomMelt opened this issue May 12, 2024 · 1 comment · Fixed by #1460
Labels
bug Something isn't working

Comments

@TomMelt
Copy link

TomMelt commented May 12, 2024

Bug summary
When I run this code from the codeplay demo, it fails on first run. The second time it runs fine.

To Reproduce
Steps to reproduce the behavior.

If possible, provide a minimal reproducer. The shorter the reproducing code snippet is, the easier will it be for us to debug and understand the issue.

clone and compile:

git clone --recursive --branch isc24 https://github.com/codeplaysoftware/syclacademy.git
cd syclacademy/Code_Exercises/Introduction_to_SYCL
acpp -I../../External/Catch2/single_include solution.cpp

run:

./a.out

Error I get

$ ./a.out 
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
[AdaptiveCpp Warning] kernel_cache: This application run has resulted in new binaries being JIT-compiled. This indicates that the runtime optimization process has not yet reached peak performance. You may want to run the application again until this warning no longer appears to achieve optimal performance.
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.out is a Catch v2.13.10 host application.
Run with -? for options

-------------------------------------------------------------------------------
usm_in_order_queue
-------------------------------------------------------------------------------
solution.cpp:100
...............................................................................

solution.cpp:100: FAILED:
due to a fatal error condition:
  SIGSEGV - Segmentation violation signal

===============================================================================
test cases:    2 |    1 passed | 1 failed
assertions: 1025 | 1024 passed | 1 failed

Segmentation fault (core dumped)

The second time it runs fine. Also if you use the flag ACPP_ADAPTIVITY_LEVEL=0 ./a.out it works

Expected behavior
A clear and concise description of what you expected to happen.

this is the output I get the second time (successful)

$ ./a.out 
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
[AdaptiveCpp Warning] kernel_cache: This application run has resulted in new binaries being JIT-compiled. This indicates that the runtime optimization process has not yet reached peak performance. You may want to run the application again until this warning no longer appears to achieve optimal performance.
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
'+ptx89' is not a recognized feature for this target (ignoring feature)
===============================================================================
All tests passed (2048 assertions in 2 test cases)

Describe your setup

  • how you have installed AdaptiveCpp, and which version/branch/git commit
  • Describe the dependencies that AdaptiveCpp sits on top of in your setup:
    • clang version and how clang was installed
    • host compiler
    • CUDA version (if applicable)
    • ROCm version and how ROCm was installed (if applicable)
  • How you have compiled your application and which arguments you have passed to acpp. In particular, which backends and hardware you have compiled for.

Optional additional diagnostic information
The following information can potentially help us:

  • For compilation/toolchain or setup-related issues: Setting the environment variable HIPSYCL_DRYRUN=1 during compilation will cause syclcc to print the commands it would execute instead of actually executing. This can help verify the sanity of your setup.
  • syclcc --hipsycl-version prints information about the AdaptiveCpp configuration that may be interesting for setup-related issues.
  • For issues related to the runtime, setting the environment variable ACPP_DEBUG_LEVEL=3 will cause it to print a lot of diagnostic information that might be helpful. Attach the output of your program with ACPP_DEBUG_LEVEL=3 if you think it might be helpful for your issue.
  • Recent AdaptiveCpp versions include a tool called acpp-info, which will print information about available backends and devices. This may be interesting for issues related to e.g. device visibility.

Additional context
Add any other context about the problem here.

@TomMelt TomMelt added the bug Something isn't working label May 12, 2024
@illuhad
Copy link
Collaborator

illuhad commented May 12, 2024

(This was discovered together with me at the SYCL tutorial at ISC and is most likely related to adaptivity level=1 optimizations, perhaps kernel configuration object lifetime)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants