diff --git a/src/python/library/build_wheel.py b/src/python/library/build_wheel.py index 3be738086..73f727d0d 100755 --- a/src/python/library/build_wheel.py +++ b/src/python/library/build_wheel.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/src/python/library/tritonclient/utils/CMakeLists.txt b/src/python/library/tritonclient/utils/CMakeLists.txt index 178b0512b..94952efc7 100644 --- a/src/python/library/tritonclient/utils/CMakeLists.txt +++ b/src/python/library/tritonclient/utils/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2020-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/src/python/library/tritonclient/utils/shared_memory/__init__.py b/src/python/library/tritonclient/utils/shared_memory/__init__.py index 4c4ca2845..364b58b99 100755 --- a/src/python/library/tritonclient/utils/shared_memory/__init__.py +++ b/src/python/library/tritonclient/utils/shared_memory/__init__.py @@ -83,6 +83,8 @@ def create_shared_memory_region(triton_shm_name, shm_key, byte_size, create_only _key_mapping[shm_key] = [False, 0] _key_mapping[shm_key][1] += 1 except FileNotFoundError: + # File not found means the shared memory region has not been created, + # suppress the exception and attempt to create the region. pass if shm_handle._mpsm_handle is None: try: @@ -137,6 +139,8 @@ def set_shared_memory_region(shm_handle, input_values, offset=0): try: for input_value in input_values: + # numpy array of object type is "syntactic sugar" for the API, should + # be handled by accessing its item and treat as Python object if input_value.dtype == np.object_: byte_size = len(input_value.item()) shm_handle._mpsm_handle.buf[offset : offset + byte_size] = (