Environment
- Jetson AGX Orin 32G
- L4T R35.2.1
- nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3
- https://repo.download.nvidia.com/jetson/common/pool/main/n/nsight-systems-2022.5.2/nsight-systems-2022.5.2_2022.5.2.120-32316741v0_arm64.deb
- dpkg -i nsight-systems-2022.5.2_2022.5.2.120-32316741v0_arm64.deb
Hello,
I installed nsight systems in the nvidia docker container - nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3
The nsight systems I installed is nsight-systems-2022.5.2_2022.5.2.120-32316741v0_arm64.deb
I installed nsight systems in the docker container. And I tried to test nsight systems in the container.
I got installer from here.
#include <stdio.h>
/*
* Host function to initialize vector elements. This function
* simply initializes each element to equal its index in the
* vector.
*/
void initWith(float num, float *a, int N)
{
for(int i = 0; i < N; ++i)
{
a[i] = num;
}
}
/*
* Device kernel stores into `result` the sum of each
* same-indexed value of `a` and `b`.
*/
__global__
void addVectorsInto(float *result, float *a, float *b, int N)
{
int index = threadIdx.x + blockIdx.x * blockDim.x;
int stride = blockDim.x * gridDim.x;
for(int i = index; i < N; i += stride)
{
result[i] = a[i] + b[i];
}
}
/*
* Host function to confirm values in `vector`. This function
* assumes all values are the same `target` value.
*/
void checkElementsAre(float target, float *vector, int N)
{
for(int i = 0; i < N; i++)
{
if(vector[i] != target)
{
printf("FAIL: vector[%d] - %0.0f does not equal %0.0f\n", i, vector[i], target);
exit(1);
}
}
printf("Success! All values calculated correctly.\n");
}
int main()
{
const int N = 2<<24;
size_t size = N * sizeof(float);
float *a;
float *b;
float *c;
cudaMallocManaged(&a, size);
cudaMallocManaged(&b, size);
cudaMallocManaged(&c, size);
for (int i = 0 ; i < 100 ; ++i) {
initWith(3, a, N);
initWith(4, b, N);
initWith(0, c, N);
size_t threadsPerBlock;
size_t numberOfBlocks;
/*
* nsys should register performance changes when execution configuration
* is updated.
*/
//threadsPerBlock = 1;
//numberOfBlocks = 1;
threadsPerBlock = 1024;
numberOfBlocks = (N + threadsPerBlock - 1) / threadsPerBlock;
printf("numberOfBlocks : %d\n", numberOfBlocks);
cudaError_t addVectorsErr;
cudaError_t asyncErr;
addVectorsInto<<<numberOfBlocks, threadsPerBlock>>>(c, a, b, N);
addVectorsErr = cudaGetLastError();
if(addVectorsErr != cudaSuccess) printf("Error: %s\n", cudaGetErrorString(addVectorsErr));
asyncErr = cudaDeviceSynchronize();
if(asyncErr != cudaSuccess) printf("Error: %s\n", cudaGetErrorString(asyncErr));
checkElementsAre(7, c, N);
}
cudaFree(a);
cudaFree(b);
cudaFree(c);
}
This is the code above.
nvcc -o 01 01.cu
The source code above produed an ELF named 01.
nsys profile --stats=true --force-overwrite=true -o 01-report ./01
This command outputs as shown below:
nsys profile --stats=true --force-overwrite=true -o 01-report ./01
WARNING: ARMv8 PMU is not available, enabling `sampling-trigger=perf` switch, software events will be used for CPU sampling.
numberOfBlocks : 32768
Success! All values calculated correctly.
numberOfBlocks : 32768
Success! All values calculated correctly.
numberOfBlocks : 32768
Success! All values calculated correctly.
........................................
numberOfBlocks : 32768
Success! All values calculated correctly.
numberOfBlocks : 32768
Success! All values calculated correctly.
numberOfBlocks : 32768
Success! All values calculated correctly.
numberOfBlocks : 32768
Success! All values calculated correctly.
numberOfBlocks : 32768
Success! All values calculated correctly.
numberOfBlocks : 32768
Success! All values calculated correctly.
numberOfBlocks : 32768
Success! All values calculated correctly.
numberOfBlocks : 32768
Success! All values calculated correctly.
FATAL ERROR: /dvs/p4/build/sw/devtools/Agora/Rel/QuadD_Tegra/QuadD/Common/GpuTraits/Src/GpuTicksConverter.cpp(376): Throw in function QuadDCommon::TimestampType GpuTraits::GpuTicksConverter::ConvertToCpuTime(const QuadDCommon::Uuid&, uint64_t&) const
Dynamic exception type: boost::wrapexcept<QuadDCommon::NotFoundException>
std::exception::what: NotFoundException
[QuadDCommon::tag_message*] = No GPU associated to the given UUID
Generating '/tmp/nsys-report-3988.qdstrm'
I think this is a problem.
Something went wrong but I donât realize what it is.
Could someone help me?
Didnât I install wrong nsight installer into the wrong place - in the container?