Skip to content

Cache Descriptor Set Path #202

Merged
keirafadams merged 7 commits intodevelopfrom
fv_desc_set_caching
Jul 30, 2024
Merged

Cache Descriptor Set Path #202
keirafadams merged 7 commits intodevelopfrom
fv_desc_set_caching

Conversation

@keirafadams
Copy link
Copy Markdown
Contributor

Hey Folks,

This is a draft PR for the descriptor set path caching.

Currently, to the best of my knowledge, we can't actually delete a descriptor set after creation so this is a fairly minimal change.

It relies on the fact that a descriptor set path, as well as its dimensionality, will never change after creation. This lets us bypass the database query after the initial caching of the path and dimensions for a named set.

@keirafadams keirafadams changed the base branch from master to develop July 25, 2024 19:16
cwlacewe
cwlacewe previously approved these changes Jul 25, 2024
Copy link
Copy Markdown
Contributor

@cwlacewe cwlacewe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Minor removal of extra lines requested.

Copy link
Copy Markdown
Contributor

@s-gobriel s-gobriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it is necessary to also clear the cache when the index is deleted in

DescriptorSet::~DescriptorSet() { delete _set; }

@keirafadams
Copy link
Copy Markdown
Contributor Author

Do you think it is necessary to also clear the cache when the index is deleted in

DescriptorSet::~DescriptorSet() { delete _set; }

This is a concern of mine longer term, but it doesn't look like the "delete" is actually externally connected at the moment. i.e. I dont see any VDMS level logic that lets us fully remove an index. At most, with some gymnastics we might be able to remove the descriptor set reference from the graph database, but even thats a little murky.

@s-gobriel do you know if there's an example or call we can check to see if a client can actually trigger a delete of either the index or the referencing PMGD node?

formatting cleanup

Co-authored-by: Chaunte W. Lacewell <chaunte.w.lacewell@intel.com>
s-gobriel
s-gobriel previously approved these changes Jul 26, 2024
Copy link
Copy Markdown
Contributor

@s-gobriel s-gobriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct @ifadams. I checked the whole source and the memory resident index is never deleted, so I don't see a problem with the cached path.

cwlacewe
cwlacewe previously approved these changes Jul 26, 2024
@keirafadams keirafadams marked this pull request as ready for review July 26, 2024 17:23
@github-actions
Copy link
Copy Markdown
Contributor

Target CPP Coverage: 64.4418%
Source CPP Coverage: 64.3906%

Target Python Coverage: 98%
Source Python Coverage: 98%

@sys-vdms sys-vdms dismissed stale reviews from cwlacewe and s-gobriel via 85f9db2 July 26, 2024 17:51
@github-actions
Copy link
Copy Markdown
Contributor

Target CPP Coverage: 64.4418%
Source CPP Coverage: 64.3906%

Target Python Coverage: 98%
Source Python Coverage: 98%

src/RSCommand.h Outdated
const std::string _cmd_name;
std::map<std::string, int> _valid_params_map;

static tbb::concurrent_unordered_map<std::string, std::string>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to place this DescriptorSet specific cache in the base RSCommand class? Won't it be better placed in DescriptorsCommand class?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the time there was a specific reason (actually did the dev work weeks ago) and was having some compilation issues with it in the subclass.

I can't for the life of me remember the specifics though.... if its causing some heartburn I can try moving it back to the subclass. There's some vaguely potential value of having it in the super class for more general access for some hand-wavey other future dev but from a functional standpoint right now, meh

@github-actions
Copy link
Copy Markdown
Contributor

Target CPP Coverage: 64.4418%
Source CPP Coverage: 64.3906%

Target Python Coverage: 98%
Source Python Coverage: 98%

@github-actions
Copy link
Copy Markdown
Contributor

Target CPP Coverage: 64.4418%
Source CPP Coverage: 64.3906%

Target Python Coverage: 98%
Source Python Coverage: 98%

@github-actions
Copy link
Copy Markdown
Contributor

Target CPP Coverage: 64.4418%
Source CPP Coverage: 64.3906%

Target Python Coverage: 98%
Source Python Coverage: 98%

@github-actions
Copy link
Copy Markdown
Contributor

Target CPP Coverage: 64.4418%
Source CPP Coverage: 64.3906%

Target Python Coverage: 98%
Source Python Coverage: 98%

@keirafadams keirafadams merged commit 0555e37 into develop Jul 30, 2024
@cwlacewe cwlacewe added this to the v2.10.0 Tasks milestone Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Descriptor Set Optimizations: Cache Descriptor Set File Path from Metadata

5 participants