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

acc-bakeryoptix PTX parsing fails #195

Open
xCuri0 opened this issue Apr 4, 2024 · 1 comment
Open

acc-bakeryoptix PTX parsing fails #195

xCuri0 opened this issue Apr 4, 2024 · 1 comment

Comments

@xCuri0
Copy link

xCuri0 commented Apr 4, 2024

https://github.com/ac-custom-shaders-patch/acc-bakeryoptix. For testing a KN5 file is needed which can be found in any Assetto Corsa car/track mod download.

rayhit PTX dumped at runtime https://gist.github.com/xCuri0/36207c7ca7c29e936d971c497c183cfe

Using ZLUDA built with Optix on RX 580 Adrenalin 24.1.1 Windows 10 22H2. I had to do a few changes to override optix.6.0.0.dll instead of optix.6.6.0.dll and make it runtime compile on gfx803 but that shouldn't be relevant here

Downloaded HIP-RT 1.2 from here #108 (comment), AMD seems to no longer officially provide older versions.

The raybb and rayIntersection PTX parse and compile without any issues, but rayhit fails during PTX parsing giving errors like this till the PTX file ends

 err: User { error: UnrecognizedDirective { start: 6624, end: 6877 } }


 err: User { error: UnrecognizedDirective { start: 6877, end: 6971 } }


 err: User { error: UnrecognizedDirective { start: 6971, end: 7028 } }

To get these errors to show I added the following after let maybe_ast = ptx::ModuleParser::new().parse(&mut errors, txt); in ptx\src\lib.rs

        for error in &errors {
            println!("\n err: {:?}\n", error);
        }

According to @vosen this is caused by the PTX using unimplemented ldu instruction.

@vosen
Copy link
Owner

vosen commented Apr 4, 2024

If you want to just compile ptx, one of ZLUDA subprojects is zoc - zluda offline compiler. It's built when you are doing a debug build (cargo xtask) or can be built explicitly (cargo build -p offline_compiler). This will create zoc binary in target/debug. Pass --help to print options

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

2 participants