moose icon indicating copy to clipboard operation
moose copied to clipboard

Consistent naming scheme for lowering inputs

Open mortendahl opened this issue 3 years ago • 0 comments

For lowering eg replicated inputs we currently change the argument name according to

{original_arg_name}/player{player_index}/share{share_index}

For wrapper types (say, host tensors) we reuse the original name. This issue is about making a decision on which naming scheme to use in general.

One suggestion might be to use named structs for all wrapping types instead of tuple structs, and use those names to expand the argument when lowering input. Concretely, if HostBitArray128 was rewritten as a named struct using eg bittensor for the underlying bit tensor, then input x: HostBitArray128 would be lowered to x/bittensor: HostBitTensor. Note that to be consistent with this, the above scheme for replicated inputs should be changed to

{original_arg_name}/player{player_index}_share{share_index}

(using _ between player and share instead of /, which is then reserved for wrapping).

mortendahl avatar Nov 05 '21 15:11 mortendahl