Depends on what you programmed.
If you used OptiX 6 or 7 and did NOT use the built-in triangle primitives (via the GeometryTriangles primitives in OptiX 6 or the OptixBuildInputTriangleArray in OptiX 7) then only the BVH traversal is hardware accelerated, not the ray-triangle intersection.
More explanations using the OptiX 7 terminology here:
https://forums.developer.nvidia.com/t/leveraging-rtx-hardware-capabilities-with-optix-7-0/107733/2