mirror of
				https://github.com/ml-explore/mlx.git
				synced 2025-10-31 16:21:27 +08:00 
			
		
		
		
	Don't use make_unique to create shared_ptr (#902)
The code compiled because shared_ptr's constructor actually accepts unique_ptr.
This commit is contained in:
		| @@ -223,7 +223,7 @@ Let's re-implement our operation now in terms of our :class:`Axpby` primitive. | ||||
|             /* const std::vector<int>& shape = */ out_shape, | ||||
|             /* Dtype dtype = */ out_dtype, | ||||
|             /* std::unique_ptr<Primitive> primitive = */ | ||||
|             std::make_unique<Axpby>(to_stream(s), alpha, beta), | ||||
|             std::make_shared<Axpby>(to_stream(s), alpha, beta), | ||||
|             /* const std::vector<array>& inputs = */ broadcasted_inputs); | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Cheng
					Cheng