Open JolifantoBambla opened 2 years ago
Available GPU memory can't be queried, but vendor and device id may be available which could be used to query available memory from a predefined map of known devices to their GPU mem sizes.
this is configurable. querying gpu name and vendor is a safety issue and therefore only enabled with the appropriate developer flags enabled in the browser. however, checking for allocation errors and choosing a lower cache size in case of an error is an option
For now I'll use a cache of size
2048x2048x512
, but in the future this should be a parameter that's controllable by the user.for a volume of
8192x8192x200
and a brick size of128x128x128
I need 8532 bricks to represent the whole volume (1 channel!) (assuming no brick is empty w.r.t. thresholds / transfer functions) per resolution:4096x4096x200
2048x2048x200
1024x1024x200
512x512x200
128x128x200
(not sure ifbioformats2raw
currently scales down on Z axis - tool is still a bit limited)in a
1024x1024x1024
brick cache I can store 512 such bricks but takes 1.07 GBin a
2048x2048x512
brick cache I can store 1024 such bricks but takes 2.15 GBin a
2048x2048x2048
brick cache I can store 4096 such bricks but takes 8.59 GBMy laptop has ~4 GB GPU memory so
2048x2048x512
might be a good fit-> one parameter has to be max resolution
for dataset above only use lower 4 resolutions then 1 channel (532 bricks) would fit into cache, but 2 channels (1064 bricks), or 3 channels (1596 bricks) wouldn't (but that's not the goal anyway)
-> maybe make max resolution a per channel property