new: lithostitched support (dfc opts) - #571
Conversation
…feature/litho-integration
|
Thanks for the PR. However the project currently don't accept contributions to the OpenCL subproject due to licensing until we figure out how to properly accept contributions to it. And I would like to change how codegen works inside that subproject at some point as well. Other changes seems good from the first glance. A few problems:
I think compatibility with lithostitched should ideally be provided by C2ME, since there's currently no stable API, and providing a stable API for a compiler backend isn't trivial. |
|
Thanks for the feedback and update. Regarding OCL accel: Haven't decided yet, but I'll either keep the changes and wait, or split that subproject into a later PR once licensing is figured out and contributions open. I'll go ahead and fix the guarding. For integrations handling, I may use a CodeGenRegistry & emitters (slight refactor to generalize the emitters to support dfs -> ast nodes) for now. I won't touch that any further until I see how you refactor it. I don't expect this to be done for quite a while. |
|
Narrowing the scope of this PR to non-OpenCL subprojects. At some point, I'll split those changes into another draft PR that can stay open until licensing is figured out. |
…feature/litho-integration # Conflicts: # c2me-opts-dfc/src/main/java/com/ishland/c2me/opts/dfc/common/ast/opto/passes/FoldConstants.java
|
CPU: AMD Ryzen 5 3600x Performance impact seems to vary wildly depending on noise type, so the natives accel can be cut if deemed unnecessary Misc datapacks for parity testing: |
ishland
left a comment
There was a problem hiding this comment.
Generally looks good. A few problems:
This reverts commit ceb3bca.
…-integration # Conflicts: # c2me-opts-dfc/src/main/java/com/ishland/c2me/opts/dfc/common/ast/McToAst.java # c2me-opts-dfc/src/main/java/com/ishland/c2me/opts/dfc/common/gen/dot/DotGenRegistry.java # c2me-opts-dfc/src/main/java/com/ishland/c2me/opts/dfc/common/gen/jvm/BytecodeGenRegistry.java
* new - setup package structure for lithostitched bindings; handle AxisDensityFunction * fix: missing license header for AxisBindings * new: handle unary lithostitched dfs * refactor: move lithostitched unary nodes to separate subpackage * refactor (again): keep all lithostitched nodes in integration pkg * new: individual binding checks for registering emitters * new - setup package structure for lithostitched bindings; handle AxisDensityFunction * fix: missing license header for AxisBindings * new: handle unary lithostitched dfs * refactor: move lithostitched unary nodes to separate subpackage * refactor (again): keep all lithostitched nodes in integration pkg * new: individual binding checks for registering emitters * new: handle SelectDensityFunction with linear search node * new: handle MixDensityFunction * new: handle ShiftDensityFunction * new: first pass at fast noise bindings & memory struct * refactor: remove guarding on ast node registration * rollback: remove ocl integration content * fix: missing license header * fix: switch lithostitched jvm emitters to DfcObjectCache * new: natives accel for FastNoiseDensityFunction * fix: missing bindings template method handles * new: FastNoise dot and jvm emitters * refactor: use switch statement for builtin integrations * fix: license headers * Revert "refactor: use switch statement for builtin integrations" This reverts commit 98d23e3. * refactor: migrate bindings to dfc frontend registry * fix: use reflection for shadow fields unresolvable by mixin * fix: exception messages in bindings classes * fix: delay FNLState init until lithostitched binds world seed * new: fnl benchmark * change: 64 bit alignment fnl arrays * mirror: table dot gen for SelectNode * fix: exempt FastNoiseLite from license header * fix: license header * mirror: promote FNL to natives after 64k samples * fix: casting * fix: ShiftNode bytecode local var indices * change: separate header file for FNL * refactor: move generic unary nodes to main package * fix: whitespace * refactor: move fnl access fully to bindings * fix: trailing comma * fix: reset ShiftNode emitter EvalType to NORMAL * disable: fnl natives accel * fix: guard TrackingVH assignment * Revert "fix: reset ShiftNode emitter EvalType to NORMAL" This reverts commit ceb3bca. * re-fix: reset ShiftNode emitter EvalType to NORMAL * fix: unused import * update: match new method def format * chore: cleanups * change: disable unused FNL natives to reduce jar size --------- Co-authored-by: ishland <30385023+ishland@users.noreply.github.com> (cherry picked from commit 62a21e7)
Upstream has released updates that appear to apply and compile correctly Upstream Changes: 607e699 new: lithostitched support (dfc opts) (#571) 1277fad fix: remove prioritization selection on nvidia and platforms c3a6ae7 change: emit chunky.maxWorkingCount for heap sizes larger than 10G 030d0e1 new: workaround NVIDIA_LINUX_HANG_ON_TOO_MANY_BATCHES 92861d0 change: move device whitelist and blacklist before prioritization 3ff5525 Merge feat/dfc-overhaul-v2 79be1a7 fix: delay block entity loading for delayFullChunkEvents 88d32ad fix: apply behavior in delegate nodes
This pull request currently adds AST conversion and bytecode/dot/OCL emitters for all Lithostitched dfs except
FastNoiseDensityFunction. Eventually, it will also include natives accel forFastNoiseDensityFunction(using the C port of FastNoiseLite) and OpenCL accel support for the region system & biome injectors.Leaving as a draft while I work on this. Please let me know if I should keep this as a separate addon, or if it's better fit to implement on Lithostitched's side. Otherwise, I'll keep this here for feedback; once done, I'll convert to a regular PR and provide benchmarks + compat tests.