-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
OpenGL backend (stage 1) #535
Conversation
This is a fragment of #495. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good in general except for a few places to be changed slightly.
I found a styling issue. Taichi codebase follows this void foo() {
// ...
} instead of starting |
The formatter we use is |
Sooner or later we may want to introduce something like cpplint to Taichi so that some bugs can be detected early. Not sure if there's a way to set that up just like |
Hmm, I thought the styling is determined by
I see. TBH I don't know much about the CI infra. But can we add a run-linter step? And if that step fails, it means the code doesn't comply with Taichi's coding style, so the authors should format their code before merging? |
Ideally, yes. In practice, I find the version of
Yeah we used to have a githook for running clang-format. Not sure if we should re-enable that. The downside is that with these enabled it would take a couple more seconds for Returning to bed now and happy to talk more about code format issues tmr. (I was getting up to use the bathroom yet for some reason ended up with coding... LOL) |
I see. I guess we can enforce formatting when the project becomes more mature... (And sorry about discussing this here @archibate , this should have been discussed this in #466 ... )
LOL, I thought you travelled to another time zone |
Oh! I see... I think we'd better run |
Why is pytest always crashing these days... |
Actually, is it a legit usage to have multiple OpenGL context in multiple threads? I somehow remembered this singleton design of OpenGL, could that be the root cause...? |
This happens in other PRs too, where GL codes are not merged at all. |
I believe #523 will solve this after its merge. |
Yeah, right before we release v0.6.0, let's reformat everything, and enforce every future commit follow certain code format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've done one more pass. I think this is ready to squash & merge after the potential memory leakages are fixed. What do you think @k-ye?
[skip ci] test inout data[3] success [skip ci] try to pass kernel arguments
fix bug x[4] -> x[4 >> 2] = x[1]
remove opengl from all_archs to prevent test
optional TI_WITH_OPENGL ON (detect auto OFF) TI_WITH_OPENGL guard opengl_api.cpp fix typo
Update profiler.cpp
TI_WITH_OPENGL=OFF by default TI_WITH_OPENGL default to ON
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think i only have a few nits, otherwise LGTM! (I don't have much experience with OpenGL, but i think in general it looks good )
Looks good. Preparing |
Anybody? |
Sorry I have a few meetings this morning. I think this PR looks good now. Merging! Thank you again for this amazing piece of contribution!! |
Related issue id = #492