getVectorizationFactor returns min(vect factor of vectorizable_inputs_outputs). In #2146, due to the 3 inter-segment fp32 tensors dumped from the 1st outer reduction kernel, the max vectorization factor is limited to 4. The scheduler should be able to use vect = 8 for other fp16 inputs and outputs. For fp32 outputs (and inputs if exist) we can reduce to 4 and do R/W twice.
General Plan
(1) Extend getVectorizationFactor to also return unordered_map<IO Tv, Tv's max vectorization factor>
(2) For each scheduler do the following
select the vectorization factor it will use & change the corresponding schedule process
getVectorizationFactor
returnsmin(vect factor of vectorizable_inputs_outputs)
. In #2146, due to the 3 inter-segment fp32 tensors dumped from the 1st outer reduction kernel, the max vectorization factor is limited to 4. The scheduler should be able to use vect = 8 for other fp16 inputs and outputs. For fp32 outputs (and inputs if exist) we can reduce to 4 and do R/W twice.