NVIDIA / modulus-sym

Framework providing pythonic APIs, algorithms and utilities to be used with Modulus core to physics inform model training as well as higher level abstraction for domain experts
https://developer.nvidia.com/modulus
Apache License 2.0
137 stars 56 forks source link

Updating the backed for SDF calculation in STL module #159

Closed ktangsali closed 4 days ago

ktangsali commented 4 days ago

Modulus Pull Request

Description

Post this PR: https://github.com/NVIDIA/modulus/pull/389, we can switch to warp based backend for the STL SDF calculation inside Modulus. This also makes this utility more accessible to users not using Modulus docker container. Changes to Dockerfile have also been completed.

Checklist

Dependencies

ktangsali commented 4 days ago

Accuracy testing:

Top - older pysdf based calculation, middle - warp based calculation, bottom - error.

image

Validation error for the aneurysm example:

image

Perf comparisons:

Time per iteration for aneurysm training:

PySDF based: 276.58 ms, Warp based: 275.62 ms

ktangsali commented 4 days ago

/blossom-ci

mnabian commented 4 days ago

@ktangsali I think we also need to take out pysdf from the REAME, Dockerfile, and docs/conf.py

ktangsali commented 4 days ago

/blossom-ci

ktangsali commented 4 days ago

@ktangsali I think we also need to take out pysdf from the REAME, Dockerfile, and docs/conf.py

@mnabian , thanks! I was initially planning on addressing those in a separate PR, but I have done it in this itself. Please have a look, I also added install of warp-lang. The CI image has been updated using the dockerfile from this PR.

Finally I did some clean-up of the dockerfile - this was after discussion with @Alexey-Kamenev

Thanks!