woq int4 fwd (#12711)
This commit is contained in:
		
							parent
							
								
									b62734748f
								
							
						
					
					
						commit
						54d6328b3c
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -273,7 +273,7 @@ def use_batch_forward(x: torch.Tensor, qtype: int, output_len: int):
 | 
				
			||||||
        and x.shape[1] % 128 == 0
 | 
					        and x.shape[1] % 128 == 0
 | 
				
			||||||
        and (
 | 
					        and (
 | 
				
			||||||
            (
 | 
					            (
 | 
				
			||||||
                qtype in [SYM_INT4, ASYM_INT4, FP8E5, FP8E4]
 | 
					                qtype in [SYM_INT4, ASYM_INT4, FP8E5, FP8E4, WOQ_INT4]
 | 
				
			||||||
                and (
 | 
					                and (
 | 
				
			||||||
                    batch_size <= 48
 | 
					                    batch_size <= 48
 | 
				
			||||||
                    or (
 | 
					                    or (
 | 
				
			||||||
| 
						 | 
					@ -284,7 +284,7 @@ def use_batch_forward(x: torch.Tensor, qtype: int, output_len: int):
 | 
				
			||||||
                )
 | 
					                )
 | 
				
			||||||
            )
 | 
					            )
 | 
				
			||||||
            or (
 | 
					            or (
 | 
				
			||||||
                qtype in [SYM_INT8, FP4, FP6, Q4_K, Q6_K]
 | 
					                qtype in [SYM_INT8, FP4, FP6, Q4_K, Q6_K, WOQ_INT4]
 | 
				
			||||||
                and batch_size <= 48
 | 
					                and batch_size <= 48
 | 
				
			||||||
                and device_name in ["arc", "pvc", "mtl", "arl"]
 | 
					                and device_name in ["arc", "pvc", "mtl", "arl"]
 | 
				
			||||||
                and x.shape[1] % 256 == 0
 | 
					                and x.shape[1] % 256 == 0
 | 
				
			||||||
| 
						 | 
					@ -297,8 +297,8 @@ def use_batch_forward(x: torch.Tensor, qtype: int, output_len: int):
 | 
				
			||||||
            batch_size > 1
 | 
					            batch_size > 1
 | 
				
			||||||
            or (device_name in ["arc"] and qtype in [SYM_INT8, FP4])
 | 
					            or (device_name in ["arc"] and qtype in [SYM_INT8, FP4])
 | 
				
			||||||
            or (device_name in ["arc", "mtl"] and qtype in [FP8E4])
 | 
					            or (device_name in ["arc", "mtl"] and qtype in [FP8E4])
 | 
				
			||||||
            or (device_name in ["lnl"] and qtype in [SYM_INT4] and x.shape[1] % 512 == 0)
 | 
					            or (device_name in ["lnl"] and qtype in [SYM_INT4, WOQ_INT4] and x.shape[1] % 512 == 0)
 | 
				
			||||||
            or (device_name in ["bmg"] and qtype in [SYM_INT4, FP8E5])
 | 
					            or (device_name in ["bmg"] and qtype in [SYM_INT4, WOQ_INT4, FP8E5])
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
    return False
 | 
					    return False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue