Skip to content

Add support for int64 for CSVParser#417

Merged
hcho3 merged 2 commits intodmlc:masterfrom
haojin2:csv_int64
Jun 27, 2018
Merged

Add support for int64 for CSVParser#417
hcho3 merged 2 commits intodmlc:masterfrom
haojin2:csv_int64

Conversation

@haojin2
Copy link
Copy Markdown
Contributor

@haojin2 haojin2 commented Jun 25, 2018

Same as title.
This PR adds support for parsing int64 data type in dmlc-core, so that mxnet could also support this type in CSVIter

@haojin2
Copy link
Copy Markdown
Contributor Author

haojin2 commented Jun 27, 2018

@tqchen @piiswrong @hcho3 ping for review.

@hcho3 hcho3 self-requested a review June 27, 2018 17:38
Copy link
Copy Markdown
Contributor

@hcho3 hcho3 left a comment

Choose a reason for hiding this comment

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

All look good to me. Can you take a look at the single comment I left on the code? Thanks.

Comment thread src/data/csv_parser.h
// If DType is all other types
} else {
LOG(FATAL) << "Only float32 and int32 are supported for the time being";
LOG(FATAL) << "Only float32, int32, and int64 are supported for the time being";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it reasonable to assume that int is 32-bit? I think we may want to replace int in CSVParser with int32_t. So for instance, the lines

typedef ParserFactoryReg<uint32_t, int> Reg32int;
typedef ParserFactoryReg<uint64_t, int> Reg64int;

would become

typedef ParserFactoryReg<uint32_t, int32_t> Reg32int32;
typedef ParserFactoryReg<uint64_t, int32_t> Reg64int32;

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.

Good catch, I'll make the change and update my PR.

@haojin2
Copy link
Copy Markdown
Contributor Author

haojin2 commented Jun 27, 2018

@hcho3 should be good for merge

@hcho3 hcho3 merged commit 649be18 into dmlc:master Jun 27, 2018
@haojin2 haojin2 deleted the csv_int64 branch June 27, 2018 22:50
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.

2 participants