Batching Non-Frame Work Items?

   5524   1   1
User Avatar
Member
39 posts
Joined: Feb. 2017
Offline
I have a customized attribute baking setup that needs to do some work in SOPs, pass a few UV sampled attributes to COPs and then write out that data as a UV tile image. Cooking this setup is very quick but I'm working with assets that have hundreds of UDIMs which I need to traverse tile-by-tile and I'd like to leverage PDG to automate things.

I have a network with two wedge nodes that accomplishes this:

wedge1 generates work items for each UDIM on the input asset


wedge2 generates work items for each attribute that needs to be parsed per UDIM


On the ropcomposite1 TOP node which saves the resulting image to disk, I have it set to cook all frames in a single batch, but as expected this doesn't work since my work items aren't actually "frames"


The result is that a new instance of hython is spun up for each work item, which is wildly inefficient compared to the actual cooking of the work items (60s to start hython, .5s to cook...).

I've tried partitioning by attribute but then I only get the first work item of each partition outputting to disk, though I may be missing something there.

What is the best way to structure this kind of setup to get the desired batching behavior?

Thanks for any ideas!

Attachments:
pcoip_client_2YI4dGMjzZ.png (114.5 KB)
pcoip_client_MvrGLcMJoZ.png (115.2 KB)
pcoip_client_nJngQFW7sT.png (120.6 KB)

User Avatar
Member
39 posts
Joined: Feb. 2017
Offline
After some more (better) searching I found this post, which makes me think this workflow just isn't really supported:
https://www.sidefx.com/forum/topic/81893/ [www.sidefx.com]

I built a workaround by switching to a generic generator that would create the total number of work items, then used SOP for-loops driven by expressions with $F in them to assign attributes to specific frames instead of with the wedges. With my work items spread out across the timeline I can use the regular ROP Fetch batch options and it works as expected. Total processing time for my test asset went from 30 minutes to about 1 minute.

It sounds like there is already a RFE for codifying this sort of non-frame batching, which I strongly support as this isn't the first time I've had to do a hack like this for generic workflows.
Edited by jedmitchell - July 28, 2022 10:28:51
  • Quick Links