mirror of
				https://github.com/ml-explore/mlx.git
				synced 2025-10-25 20:58:13 +08:00 
			
		
		
		
	Fix the accelerate dispatch for the power op (#70)
- The exponent and base were swapped because accelerate is using exponent-base instead of base-exponent - Fix also the test for binary ops as it was testing op(x, x) which couldn't catch ordering errors like that
This commit is contained in:
		 Angelos Katharopoulos
					Angelos Katharopoulos
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							4e3bdb560c
						
					
				
				
					commit
					209404239b
				
			| @@ -494,7 +494,7 @@ void Power::eval_cpu(const std::vector<array>& inputs, array& out) { | ||||
|       b.flags().row_contiguous) { | ||||
|     int size = a.size(); | ||||
|     out.set_data(allocator::malloc_or_wait(out.nbytes())); | ||||
|     vvpowf(out.data<float>(), a.data<float>(), b.data<float>(), &size); | ||||
|     vvpowf(out.data<float>(), b.data<float>(), a.data<float>(), &size); | ||||
|   } else { | ||||
|     eval(inputs, out); | ||||
|   } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user