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
193 stars 73 forks source link

Updating the backed for SDF calculation in STL module #159

Closed ktangsali closed 5 months ago

ktangsali commented 5 months 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 5 months 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 5 months ago

/blossom-ci

mnabian commented 5 months ago

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

ktangsali commented 5 months ago

/blossom-ci

ktangsali commented 5 months 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!