mirror of
				https://github.com/ml-explore/mlx.git
				synced 2025-11-04 10:38:10 +08:00 
			
		
		
		
	Reset peak memory (#1074)
* reset peak memory * fix linux * nits in docs
This commit is contained in:
		@@ -35,8 +35,14 @@ void init_metal(nb::module_& m) {
 | 
			
		||||
      R"pbdoc(
 | 
			
		||||
      Get the peak amount of used memory in bytes.
 | 
			
		||||
 | 
			
		||||
      The maximum memory used is recorded from the beginning of the program
 | 
			
		||||
      execution.
 | 
			
		||||
      The maximum memory used recorded from the beginning of the program
 | 
			
		||||
      execution or since the last call to :func:`reset_peak_memory`.
 | 
			
		||||
      )pbdoc");
 | 
			
		||||
  metal.def(
 | 
			
		||||
      "reset_peak_memory",
 | 
			
		||||
      &metal::reset_peak_memory,
 | 
			
		||||
      R"pbdoc(
 | 
			
		||||
      Reset the peak memory to zero.
 | 
			
		||||
      )pbdoc");
 | 
			
		||||
  metal.def(
 | 
			
		||||
      "get_cache_memory",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user