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

[example] Ti-example: instant ngp renderer #6673

Merged
merged 5 commits into from
Nov 25, 2022

Conversation

Linyou
Copy link
Contributor

@Linyou Linyou commented Nov 19, 2022

Add a file for ti-example: instant ngp renderer.
For more details, please visit https://github.com/Linyou/taichi-ngp-renderer.

@netlify
Copy link

netlify bot commented Nov 19, 2022

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit 171ec19
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/637a176b205ab3000910e893
😎 Deploy Preview https://deploy-preview-6673--docsite-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@Linyou Linyou changed the title Ti-example: instant ngp renderer [example] Ti-example: instant ngp renderer Nov 19, 2022
@neozhaoliang
Copy link
Contributor

neozhaoliang commented Nov 20, 2022

This is the error when running on my laptop (ubuntu22.04 + intel(GT2) card) using the vulkan backend, have no idea what it's about:

Loading model from ./npy_models/lego.npy
GridEncoding: base resolution: 16, log scale per level:1.31951 feature numbers per level: 2 maximum parameters per level: 524288 level: 16
[W 11/20/22 17:02:25.353 3632306] [type_check.cpp:visit@164] [$4178] Field index 0 not int32, casting into int32 implicitly
File "/home/zhao/China_R_Meeting/taichi_ngp.py", line 472, in raymarching_test_kernel:
                occ = self.density_bitfield[ti.u32(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    idx // 8)] & (1 << ti.u32(idx % 8))
                    ^^^^^^^^^^

[E 11/20/22 17:02:43.171 3632306] [vulkan_device.cpp:submit@1720] Vulkan Error : -4 : failed to submit command buffer


[E 11/20/22 17:02:43.171 3632306] [ir.cpp:~DelayedIRModifier@411] Assertion failure: to_insert_before_.empty()


terminate called after throwing an instance of 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >'

Changing u32 to int does not work either.

@Linyou
Copy link
Contributor Author

Linyou commented Nov 20, 2022

Hi @neozhaoliang.

The code is running fine on my machines (mac and PC laptop with Vulkan), so I am not sure what is happening here. However, I have fixed the type warning that line 472 produce, hope this change can fix the error.

In my experience, the Vulkan backend may crash when doing multiplication using types float32 and float16, in which the types are mismatched. Maybe, the reason for this error is something similar.

@neozhaoliang
Copy link
Contributor

neozhaoliang commented Nov 20, 2022

It still crashes.

Some nits:

  1. this example has keyboard control interfaces, could you please add a helper docstring at the beginning of the file, so that users can know how to play with it?
  2. our CI bot uses pylint to check the coding style, renaming built-in names like input would fail the test, could you please choose other variable names to avoid this?

@Linyou
Copy link
Contributor Author

Linyou commented Nov 20, 2022

It still crashes.

Some nits:

  1. this example has keyboard control interfaces, could you please add a helper docstring at the beginning of the file, so that users can know how to play with it?
  2. our CI bot uses pylint to check the coding style, renaming built-in names like input would fail the test, could you please choose other variable names to avoid this?

Does intel(GT2) card support SharedArray?

Also, I have added the instruction of GUI to the beginning of the file and changed the variable names for pylint test.

Copy link
Contributor

@neozhaoliang neozhaoliang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@neozhaoliang neozhaoliang merged commit 73b3256 into taichi-dev:master Nov 25, 2022
PENGUINLIONG pushed a commit that referenced this pull request Nov 25, 2022
Add a file for ti-example: instant ngp renderer.
For more details, please visit
[https://github.com/Linyou/taichi-ngp-renderer](https://github.com/Linyou/taichi-ngp-renderer).

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
Add a file for ti-example: instant ngp renderer.
For more details, please visit
[https://github.com/Linyou/taichi-ngp-renderer](https://github.com/Linyou/taichi-ngp-renderer).

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants