Rounding the corners of an SVG

I’m using a package that generates a rectangular Treemap with this structure:

  • svg (wrapper with width=100% and height=100%)
    • svg (the outer rectangle of the Treemap, also width=100% and height=100%)
      • g (one for each Treemap node)
        • rect
        • clipPath
        • text

enter image description here
I need to round the four corners of the entire Treemap (not the rx ry of each rect within).

Is it possible to do that by creating a clipPath either as a child of the wrapper or the inner svg that defines a rounded rectangle? If so, can it expose whatever the background color is behind the svg?