Jump to content

Should you use Wrangle SOPs whenever possible?


magneto

Recommended Posts

The kernel file is in $HFS/houdini/ocl/sim, so black (grey?) magic:


$hconfig -h HOUDINI_OCL_PATH
HOUDINI_OCL_PATH
The search path for OpenCL kernels. Setting this path will override the
default path of $HOUDINI_PATH/ocl/.
[/CODE]

Hey Joner, have you had a chance to look at implementing openCl for OsX10.9?

Link to comment
Share on other sites

How much performance improvement does OpenCL provide though? If it's 30%, I shouldn't go crazy about it :)

Is there any chance of having the Gas Wrangle to support OpenCL completely?

Opencl uses it's own language for kernel's, independent of vex. You would need a intermediary code interpreter.

  • Like 1
Link to comment
Share on other sites

How much performance improvement does OpenCL provide though? If it's 30%, I shouldn't go crazy about it :)

OpenCL can be a few times faster on the Intel CPU driver than the regular CPU path (even more on the GPU), but that's not the main reason to write an OpenCL version of an existing GasFieldVOP or Wrangle. You want an OpenCL version so that if you're using the OpenCL path for the Smoke or Pyro solver, you don't have to transfer all of your data from OpenCL memory to regular CPU memory before running VEX on it, which only runs on the CPU. That transfer is really expensive on the GPU, and even a bit expensive on the CPU.

So a GasFieldWrangle will work fine in the middle of an OpenCL sim, you're just paying for a lot of needless memory copying when you could be doing the work faster directly in OpenCL, assuming you're OK hand-porting the VEX to OpenCL once you've got the logic figured out.

Hey Joner, have you had a chance to look at implementing openCl for OsX10.9?

We haven't I'm afraid. IIRC, even when we could get them running, their previous drivers were fairly disappointing for performance in the Smoke / Pyro solvers, and we had all kinds of stability problems. But maybe they've gotten better with this release.

  • Like 1
Link to comment
Share on other sites

Thanks ikraus & johner. But do you need to install vcc, etc just like when you want to use inlinecpp? Because I find that not as portable.

As Tomas said, you don't need a compiler. Every OpenCL driver has a runtime compiler, which is why we can ship the kernels as source code and they will compile for the GPU or CPU depending on the driver.

I don't mind hand porting to OpenCL. Is there a chance of having OpenCL Wrangle or something similar? :)

An OpenCL Wrangle is possible, though unlikely. At the moment I don't believe you can even use a file embedded in an OTL; it has to be on the filesystem somewhere.

We're not advocating widespread use of OpenCL in lieu of VEX or anything. But if a studio has an internal toolset that contains some custom VEX field manipulation, and they want to take advantage of the OpenCL path for Smoke and Pyro, then it's worth looking at porting that code to an OpenCL DOP just to have a pure OpenCL pipeline. That's one of the reasons the OpenCL DOP exists; we needed some of the GasFieldVOP based operators in the Pyro pipeline available from OpenCL.

  • Like 1
Link to comment
Share on other sites

Thanks I see it now. For OpenCL Wrangle, maybe at each cook for the first time and each time the file is changed, maybe it would save it to a temp location on disk and then compile that? I don't know if this is bad.

Is it possible to completely convert Pyro, Smoke, Fluids into OpenCL? I assume it's not because of the type of operations? If so, how can someone know something is gonna bottleneck the sim if you use OpenCL somewhere in the DOP tree? Memory copying, etc.

Also these OpenCL toggles in certain nodes seem like too much micro management. Would you not want to turn all OpenCL toggles for the entire sim? I don't know if that would be better or worse.

I am not familiar with this so I might be very wrong :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...