openucx/ucc

Issues regarding ucc_coll_args::tag

nirandaperera opened this issue · 6 comments

The docs mention that a collective tag is a 64-bit integer.

to provide the “tag”, which is an unsigned 64-bit integer.

Butucc_coll_args.tag is a typedef uint16_t ucc_coll_id_t type. Do you know if this is a bug or intentional?

Also, should the tag be unique to the collective operation individually, or should it be unique to all collective operations globally?

Hi @nirandaperera, I think it's bug in documentation. Currently "tag" exists only in API, no TLs in UCC support it and it would be difficult to implement 64 bit tags. @manjugv can you please take a look.

@Sergei-Lebedev so does it mean that none of the tls currently support unordered collectives?

@Sergei-Lebedev so does it mean that none of the tls currently support unordered collectives?

yes, it was added to API for future use.

It seems like the tag value is used in the internal impl.
https://github.com/openucx/ucc/blob/master/src/components/tl/ucp/tl_ucp_coll.h#L339-L340

It seems to be copied to ucc_tl_ucp_task.tagged.tag value. And in the UCP impl, that seems to be used in creating the ucp tag. So, it seems to me that we can still use tagged/ unordered collectives, isn't it?

https://github.com/openucx/ucc/blob/master/src/components/tl/ucp/tl_ucp_tag.h#L16
This tells that a ucp message id is 15 bits long. So, I guess that uint16 type seems to be correct in the underneath impl

It seems like the tag value is used in the internal impl. https://github.com/openucx/ucc/blob/master/src/components/tl/ucp/tl_ucp_coll.h#L339-L340

It seems to be copied to ucc_tl_ucp_task.tagged.tag value. And in the UCP impl, that seems to be used in creating the ucp tag. So, it seems to me that we can still use tagged/ unordered collectives, isn't it?

Yes, this message tag is used to correctly schedule send/recv operations along with source rank and team id. TL UCP generates tag when user doesn't provide it. The idea is if user gives us a tag we don't generate but use whatever user gives us. Apparently it should work only with TL UCP.