Skip to content

Commit

Permalink
[ trivial ] Fix typo & misspelled function param
Browse files Browse the repository at this point in the history
- intY -> incY (incremental index of Y)
- __scopy_kernel() only works for interested SIMD register width

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

Signed-off-by: skykongkong8 <[email protected]>
  • Loading branch information
skykongkong8 committed Dec 24, 2024
1 parent 3ac9404 commit 2f6997f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion nntrainer/tensor/blas_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ void scopy(const unsigned int N, const float *X, const int incX, float *Y,
}

void scopy(const unsigned int N, const uint8_t *X, const int incX, uint8_t *Y,
const int intY) {
const int incY) {
#ifdef USE_NEON
nntrainer::neon::copy_int8_or_int4(N, X, Y);
#else
Expand Down
8 changes: 4 additions & 4 deletions nntrainer/tensor/blas_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,23 +265,23 @@ void scopy(const unsigned int N, const void *X, const int incX, void *Y,
* @param[in] Y float * for Vector Y
*/
void scopy(const unsigned int N, const float *X, const int incX, float *Y,
const int intY);
const int incY);
/**
* @brief copy function : Y = X
* @param[in] N number of elements in X
* @param[in] X uint8_t * for Vector X
* @param[in] Y uint8_t * for Vector Y
*/
void scopy(const unsigned int N, const uint8_t *X, const int incX, uint8_t *Y,
const int intY);
const int incY);
/**
* @brief copy function : Y = X
* @param[in] N number of elements in X
* @param[in] X uint8_t * for Vector X
* @param[in] Y float * for Vector Y
*/
void scopy_int4_to_float32(const unsigned int N, const uint8_t *X,
const int incX, float *Y, const int intY);
const int incX, float *Y, const int incY);

/**
* @brief copy function : Y = X
Expand All @@ -290,7 +290,7 @@ void scopy_int4_to_float32(const unsigned int N, const uint8_t *X,
* @param[in] Y float * for Vector Y
*/
void scopy_int8_to_float32(const unsigned int N, const uint8_t *X,
const int incX, float *Y, const int intY);
const int incX, float *Y, const int incY);

/**
* @brief sdot computation : sum of all X * Y
Expand Down
2 changes: 1 addition & 1 deletion nntrainer/tensor/blas_neon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ void custom_scopy(const unsigned int N, const float *X, const int incX,
: "r"(&Y[i]), "r"(&X[i])
: "v0", "memory");
#else
__scopy_kernel(N, X + i, Y + i);
__scopy_kernel(X + i, Y + i);
#endif
}
for (unsigned int i = N4; i < N; ++i) {
Expand Down

0 comments on commit 2f6997f

Please sign in to comment.