Skip to content

Commit

Permalink
[doc] Add doxygen commnet on getNumLoadedTensors
Browse files Browse the repository at this point in the history
Add doxygen comment on getNumLoadedTensors

**Self evaluation:**
1. Build test:	 [X]Passed [ ]Failed [ ]Skipped
2. Run test:	 [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Donghak PARK <[email protected]>
  • Loading branch information
DonghakPark committed Feb 11, 2025
1 parent 1da9b80 commit 97a7dcd
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Applications/SimpleFC/jni/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ void createAndRun(unsigned int epochs, unsigned int batch_size,

float input[1 * 1024];

for (uint j = 0; j < feature_size; ++j)
input[j] = (j / feature_size);
for (unsigned int j = 0; j < feature_size; ++j)
input[j] = (j / (float)feature_size);

std::vector<float *> in;
std::vector<float *> answer;
Expand Down Expand Up @@ -183,8 +183,8 @@ int main(int argc, char *argv[]) {
std::cout << "swap_on : " << swap_on << std::endl;
std::cout << "look_ahead : " << look_ahead << std::endl;

uint batch_size = 1;
uint epoch = 1;
unsigned int batch_size = 1;
unsigned int epoch = 1;

try {
createAndRun(epoch, batch_size, swap_on, look_ahead);
Expand Down
11 changes: 11 additions & 0 deletions nntrainer/graph/network_graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,18 @@ class NetworkGraph {
*/
bool isMixedPrecision() { return (!istrequal(tensor_dtype[1], "FP32")); }

/**
* @brief Get Number of Loaded WeightPool Tensor
*
* @return Number of Loaded WeightPool Tensor
*/
unsigned int getNumLoadedWeightPoolTensors();

/**
* @brief Get Number of Loaded TensorPool Tensor
*
* @return Number of Loaded TensorPool Tensor
*/
unsigned int getNumLoadedTensorPoolTensors();

private:
Expand Down
4 changes: 3 additions & 1 deletion nntrainer/layers/layer_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,9 @@ class LayerNode final : public ml::train::Layer, public GraphNode {
/**
* @brief read layer Weight & Bias data from file
* @param file input file stream
* @param bool read optimizer variables
* @param swap swap type
* @param mode Execution mode
* @param opt_var read optimizer variables
*/
void read(std::ifstream &file, bool opt_var = false,
ml::train::ExecutionMode mode = ml::train::ExecutionMode::TRAIN,
Expand Down
5 changes: 5 additions & 0 deletions nntrainer/tensor/cache_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ class CacheLoader {
*/
virtual int cancelAsync(int id);

/**
* @brief Get number of loaded tensors
*
* @return number of loaded tensors
*/
virtual unsigned int getNumLoadedTensors();

private:
Expand Down
5 changes: 5 additions & 0 deletions nntrainer/tensor/cache_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ class CachePool : public MemoryPool {
*/
virtual std::string getName() { return name; }

/**
* @brief Get number of loaded tensors
*
* @return number of loaded tensors
*/
virtual unsigned int getNumLoadedTensors();

protected:
Expand Down
10 changes: 10 additions & 0 deletions nntrainer/tensor/manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,18 @@ class Manager {
*/
bool isMixedPrecision() { return !istrequal(tensor_dtype[0], "FP32"); }

/**
* @brief Get Number of Loaded WeightPool Tensor
*
* @return Number of Loaded WeightPool Tensor
*/
unsigned int getNumLoadedWeightPoolTensors();

/**
* @brief Get Number of Loaded TensorPool Tensor
*
* @return Number of Loaded TensorPool Tensor
*/
unsigned int getNumLoadedTensorPoolTensors();

private:
Expand Down
5 changes: 5 additions & 0 deletions nntrainer/tensor/swap_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ class SwapDevice {
*/
const std::string getDevicePath() const { return dev_path; }

/**
* @brief Get number of loaded tensors
*
* @return number of loaded tensors
*/
unsigned int getNumLoadedTensors();

private:
Expand Down
5 changes: 5 additions & 0 deletions nntrainer/tensor/tensor_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,11 @@ class TensorPool {
*/
void loadCacheCancel(int id);

/**
* @brief Get number of loaded tensors
*
* @return number of loaded tensors
*/
unsigned int getNumLoadedTensors();

private:
Expand Down

0 comments on commit 97a7dcd

Please sign in to comment.