Skip to content

Commit 6660c84

Browse files
Merge pull request #135 from DSFans2014/fix/typo
fix: fix typos
2 parents 4057db0 + ffbf5d4 commit 6660c84

File tree

10 files changed

+23
-22
lines changed

10 files changed

+23
-22
lines changed

.github/workflows/style.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ jobs:
1212
- uses: actions/checkout@master
1313
- uses: reviewdog/action-cpplint@master
1414
with:
15-
github_token: ${{ secrets.github_token }}
15+
github_token: ${{ secrets.github_token }}
16+
args: --linelength=120

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ if(GIT_FOUND)
7070
#string(REPLACE "." "_" GIT_BRANCH ${GIT_BRANCH})
7171
string(REPLACE "-" "_" GIT_BRANCH ${GIT_BRANCH})
7272
string(REPLACE "/" "_" GIT_BRANCH ${GIT_BRANCH})
73-
message(STATUS "Git formated branch is ${GIT_BRANCH}")
73+
message(STATUS "Git formatted branch is ${GIT_BRANCH}")
7474
endif()
7575

7676
# Generate the static config header file

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ English | [中文](README_CN.md)
44

55
## Introduction
66

7-
HAMi-core is the in-container gpu resource controller, it has beed adopted by [HAMi](https://github.com/Project-HAMi/HAMi), [volcano](https://github.com/volcano-sh/devices)
7+
HAMi-core is the in-container gpu resource controller, it has been adopted by [HAMi](https://github.com/Project-HAMi/HAMi), [volcano](https://github.com/volcano-sh/devices)
88

99
<img src="./docs/images/hami-arch.png" width = "600" />
1010

1111
## Features
1212

1313
HAMi-core has the following features:
14-
1. Virtualize device meory
14+
1. Virtualize device memory
1515
2. Limit device utilization by self-implemented time shard
1616
3. Real-time device utilization monitor
1717

src/cuda/hook.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ extern fp_dlsym real_dlsym;
1010
cuda_entry_t cuda_library_entry[] = {
1111
/* Init Part */
1212
{.name = "cuInit"},
13-
/* Deivce Part */
13+
/* Device Part */
1414
{.name = "cuDeviceGetAttribute"},
1515
{.name = "cuDeviceGet"},
1616
{.name = "cuDeviceGetCount"},
@@ -331,7 +331,7 @@ void *find_symbols_in_table_by_cudaversion(const char *symbol,int cudaVersion)
331331
const char *real_symbol;
332332
real_symbol = get_real_func_name(symbol,cudaVersion);
333333
if (real_symbol == NULL) {
334-
// if not find in mulit func version def, use origin logic
334+
// if not find in multi func version def, use origin logic
335335
pfn = find_symbols_in_table(symbol);
336336
} else {
337337
pfn = find_real_symbols_in_table(real_symbol);

src/cuda/memory.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ uint64_t compute_3d_array_alloc_bytes(const CUDA_ARRAY3D_DESCRIPTOR* desc) {
6868
}
6969
bytes *= cuarray_format_bytes[desc->Format];
7070

71-
// TODO: take acount of alignment and etc
71+
// TODO: take account of alignment and etc
7272
// bytes ++ ???
7373
return bytes;
7474
}
@@ -87,7 +87,7 @@ uint64_t compute_array_alloc_bytes(const CUDA_ARRAY_DESCRIPTOR* desc) {
8787
}
8888
bytes *= cuarray_format_bytes[desc->Format];
8989

90-
// TODO: take acount of alignment and etc
90+
// TODO: take account of alignment and etc
9191
// bytes ++ ???
9292
return bytes;
9393
}
@@ -118,7 +118,7 @@ CUresult cuArrayCreate_v2(CUarray* arr, const CUDA_ARRAY_DESCRIPTOR* desc) {
118118

119119
CUresult cuArrayDestroy(CUarray arr) {
120120
CUDA_ARRAY3D_DESCRIPTOR desc;
121-
LOG_DEBUG("cuArrayDestory");
121+
LOG_DEBUG("cuArrayDestroy");
122122
CHECK_DRV_API(cuArray3DGetDescriptor(&desc, arr));
123123
/*uint64_t bytes*/
124124
compute_3d_array_alloc_bytes(&desc);
@@ -281,14 +281,14 @@ CUresult cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount ){
281281
}
282282

283283
CUresult cuPointerGetAttribute ( void* data, CUpointer_attribute attribute, CUdeviceptr ptr ){
284-
LOG_DEBUG("cuPointGetAttribue data=%p attribute=%d ptr=%llx",data,(int)attribute,ptr);
284+
LOG_DEBUG("cuPointGetAttribute data=%p attribute=%d ptr=%llx", data, (int)attribute,ptr);
285285
ENSURE_RUNNING();
286286
CUresult res = CUDA_OVERRIDE_CALL(cuda_library_entry,cuPointerGetAttribute,data,attribute,ptr);
287287
return res;
288288
}
289289

290290
CUresult cuPointerGetAttributes ( unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr ) {
291-
LOG_DEBUG("cuPointGetAttribue data=%p ptr=%llx",data,ptr);
291+
LOG_DEBUG("cuPointGetAttribute data=%p ptr=%llx", data, ptr);
292292
ENSURE_RUNNING();
293293
CUresult res = CUDA_OVERRIDE_CALL(cuda_library_entry,cuPointerGetAttributes,numAttributes,attributes,data,ptr);
294294
int cur=0;
@@ -307,7 +307,7 @@ CUresult cuPointerGetAttributes ( unsigned int numAttributes, CUpointer_attribu
307307
}
308308

309309
CUresult cuPointerSetAttribute ( const void* value, CUpointer_attribute attribute, CUdeviceptr ptr ){
310-
LOG_DEBUG("cuPointSetAttribue value=%p attribute=%d ptr=%llx",value,(int)attribute,ptr);
310+
LOG_DEBUG("cuPointSetAttribute value=%p attribute=%d ptr=%llx", value, (int)attribute, ptr);
311311
ENSURE_RUNNING();
312312
CUresult res = CUDA_OVERRIDE_CALL(cuda_library_entry,cuPointerSetAttribute,value,attribute,ptr);
313313
return res;
@@ -537,7 +537,7 @@ CUresult cuMipmappedArrayCreate(CUmipmappedArray* pHandle,
537537

538538
CUresult cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) {
539539
// TODO: compute bytesize
540-
LOG_DEBUG("cuMipmappedArrayDestory\n");
540+
LOG_DEBUG("cuMipmappedArrayDestroy\n");
541541
CUresult res = CUDA_OVERRIDE_CALL(cuda_library_entry,cuMipmappedArrayDestroy, hMipmappedArray);
542542
return res;
543543
}

src/cuda/stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ CUresult cuStreamCreate(CUstream *phstream, unsigned int flags){
77
}
88

99
CUresult cuStreamDestroy_v2 ( CUstream hStream ){
10-
LOG_DEBUG("cuStreamDestory_v2 %p",hStream);
10+
LOG_DEBUG("cuStreamDestroy_v2 %p",hStream);
1111
return CUDA_OVERRIDE_CALL(cuda_library_entry,cuStreamDestroy_v2,hStream);
1212
}
1313

src/include/libcuda_hook.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ typedef CUresult (*cuda_sym_t)();
4343
typedef enum {
4444
/* cuInit Part */
4545
CUDA_OVERRIDE_ENUM(cuInit),
46-
/* cuDeivce Part */
46+
/* cuDevice Part */
4747
CUDA_OVERRIDE_ENUM(cuDeviceGetAttribute),
4848
CUDA_OVERRIDE_ENUM(cuDeviceGet),
4949
CUDA_OVERRIDE_ENUM(cuDeviceGetCount),

src/include/nvml-subset.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ typedef enum nvmlGpuP2PCapsIndex_enum {
655655
/* P2P Capability Index Status*/
656656
typedef enum nvmlGpuP2PStatus_enum {
657657
NVML_P2P_STATUS_OK = 0,
658-
NVML_P2P_STATUS_CHIPSET_NOT_SUPPORED,
658+
NVML_P2P_STATUS_CHIPSET_NOT_SUPPORTED,
659659
NVML_P2P_STATUS_GPU_NOT_SUPPORTED,
660660
NVML_P2P_STATUS_IOH_TOPOLOGY_NOT_SUPPORTED,
661661
NVML_P2P_STATUS_DISABLED_BY_REGKEY,
@@ -808,7 +808,7 @@ typedef struct nvmlVgpuPgpuMetadata_st {
808808
char hostDriverVersion
809809
[NVML_SYSTEM_DRIVER_VERSION_BUFFER_SIZE]; //!< Host driver version
810810
unsigned int
811-
pgpuVirtualizationCaps; //!< Pgpu virtualizaion capabilities bitfileld
811+
pgpuVirtualizationCaps; //!< Pgpu virtualization capabilities bitfield
812812
unsigned int reserved[7]; //!< Reserved for internal use
813813
unsigned int opaqueDataSize; //!< Size of opaque data field in bytes
814814
char opaqueData[4]; //!< Opaque data
@@ -966,7 +966,7 @@ typedef enum nvmlVgpuVmCompatibility_enum {
966966
NVML_VGPU_VM_COMPATIBILITY_HIBERNATE =
967967
0x2, //!< vGPU is runnable from a hibernated state (ACPI S4)
968968
NVML_VGPU_VM_COMPATIBILITY_SLEEP =
969-
0x4, //!< vGPU is runnable from a sleeped state (ACPI S3)
969+
0x4, //!< vGPU is runnable from a slept state (ACPI S3)
970970
NVML_VGPU_VM_COMPATIBILITY_LIVE =
971971
0x8, //!< vGPU is runnable from a live/paused (ACPI S0)
972972
} nvmlVgpuVmCompatibility_t;
@@ -1093,7 +1093,7 @@ typedef enum nvmlVgpuVmIdType {
10931093
* Represents frame buffer capture session type
10941094
*/
10951095
typedef enum nvmlFBCSessionType_enum {
1096-
NVML_FBC_SESSION_TYPE_UNKNOWN = 0, //!< Unknwon
1096+
NVML_FBC_SESSION_TYPE_UNKNOWN = 0, //!< Unknown
10971097
NVML_FBC_SESSION_TYPE_TOSYS, //!< ToSys
10981098
NVML_FBC_SESSION_TYPE_CUDA, //!< Cuda
10991099
NVML_FBC_SESSION_TYPE_VID, //!< Vid

src/multiprocess/multiprocess_memory_limit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ int fix_lock_shrreg() {
415415
if (current_owner != 0) {
416416
int flag = 0;
417417
if (current_owner == region_info.pid) {
418-
LOG_INFO("Detect onwer pid = self pid (%d), "
418+
LOG_INFO("Detect owner pid = self pid (%d), "
419419
"indicates pid loopback or race condition", current_owner);
420420
flag = 1;
421421
} else {
@@ -568,7 +568,7 @@ void init_proc_slot_withlock() {
568568
}
569569
signal(SIGUSR2,sig_swap_stub);
570570
signal(SIGUSR1,sig_restore_stub);
571-
// If, by any means a pid of itself is found in region->proces, then it is probably caused by crashloop
571+
// If, by any means a pid of itself is found in region->process, then it is probably caused by crashloop
572572
// we need to reset it.
573573
int i,found=0;
574574
for (i=0; i<region->proc_num; i++) {

src/multiprocess/multiprocess_memory_limit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ void unlock_shrreg();
165165

166166
//Setspec of the corresponding device
167167
int setspec();
168-
//Remove quitted process
168+
//Remove quit process
169169

170170
void suspend_all();
171171
void resume_all();

0 commit comments

Comments
 (0)